Remove report.ownerEmails that slipped through or were recently added#22559
Conversation
|
@madmax330 Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
Reviewer Checklist
Screenshots/Videos |
| @@ -107,7 +107,6 @@ function MoneyRequestAction(props) { | |||
| }), | |||
| '', | |||
| CONST.POLICY.OWNER_EMAIL_FAKE, | |||
There was a problem hiding this comment.
Why are we not removing this?
There was a problem hiding this comment.
That param is for the optimistic policyID - it was like that before so I'm keeping it :D
The below line was for the optimistic ownerEmail
| CONST.REPORT.NOTIFICATION_PREFERENCE.DAILY, | ||
| ); | ||
| const createdReportAction = ReportUtils.buildOptimisticCreatedReportAction(policyReport.ownerEmail); | ||
| const createdReportAction = ReportUtils.buildOptimisticCreatedReportAction(CONST.POLICY.OWNER_EMAIL_FAKE); |
There was a problem hiding this comment.
How is this supposed to work?
There was a problem hiding this comment.
Sorry can you clarify your question? Like why is it appropriate to set CONST.POLICY.OWNER_EMAIL_FAKE here?
If that's your question, here's my answer: Because previously, we were passing CONST.REPORT.OWNER_EMAIL_FAKE, into ReportUtils.buildOptimisticChatReport( above which would set that fake email as the ownerEmail. However, now that we're removing policyReport.ownerEmail, we can now just directly pass the fake email here.
However, if you're asking something like "isn't it weird to pass a FAKE email (__FAKE__) to buildOptimisticCreatedReportAction since that function will just add the fake email into the message property in some weird way"...
My answer is "yes that seems pretty weird, but it's how it worked before so I don't think we'll break anything with this change - and in the future it def would make sense to clean that up somehow, if possible - like maybe in this case we don't even need a message prop?
|
The workspace members are not shown in the announce room. Screen.Recording.2023-07-11.at.9.35.55.PM.mov |
|
The WorkspaceInviteMessagePage prop type error was actually being fixed here - #21201 but I may move that fix to this PR just to have it all in 1 |
|
@allroundexperts it would be great if you could super clear how to reproduce those issues you saw :D But I will play around to try to reproduce! It looks like some of those things you tested while offline? |
@allroundexperts I tried reproducing like this, but I saw the new member in the announce room:
|
Were you offline during all of this? |
|
@allroundexperts nope was online 😅 I just briefly tried offline and I basically only see failing pusher requests in the console teehee - I'll try again in about 1/2 hour |
|
@allroundexperts ok so I did a bit more testing of the flow in staging and here's what I saw: For an account where I am 99% sure I already had personal details in onyx: Screen.Recording.2023-07-12.at.3.54.41.PM.movFor an account where I definitely didn't have personal details in Onyx: Screen.Recording.2023-07-12.at.3.55.32.PM.movThis was on staging so YES we definitely need to get it fixed (seems like another case of needing to store the optimistic data in Onyx, then clear it on success) BUT it's not related to changes in this PR |
|
If you find any more bugs from testing this PR can you please also test if those bugs exist in staging?? 🙏 Thanks 👍 |
I'm sure I tested both the bugs on staging as well. I'll re-test and from now on, will try to post staging vides as well! |
|
@allroundexperts Innnnnnteresting, I wonder why we seem to have had different results - you're saying you previously didn't reproduce those on staging? I'm quite interested to know if you can today 🙃 |
I'm unsure myself what happened. It might have been different accounts that I used on staging vs testing this PR. I can now confirm that these are currently on staging as well. |
|
Found another bug.
Video for this PR: Screen.Recording.2023-07-13.at.4.56.43.AM.movVideo for staging: Screen.Recording.2023-07-13.at.4.57.41.AM.mov |
|
@allroundexperts that bug that you just found loooooks like it's the same as this issue: #21706 Do you agree or disagree? 🤔 |
I agree. Can you try this on staging and confirm if this happens there or not? I'm doing the exact same steps in the video I posted and was not able to reproduce. |
|
WTH that's weird you can't reproduce! I took this vid earlier today on staging: Screen.Recording.2023-07-13.at.11.36.11.AM.mov |
|
Weird. I'll continue my tests then. |
allroundexperts
left a comment
There was a problem hiding this comment.
Testing well. I wasn't able to find anything other than what was on staging as well!
|
@youssef-lr Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
|
@youssef-lr removing you being requested for review since @madmax330 is already assigned to review, but feel free to review if you'd like :D @madmax330 ready for your review if you have a chance today 🙏 |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/madmax330 in version: 1.3.42-0 🚀
|
|
🚀 Deployed to production by https://github.com/jasperhuangg in version: 1.3.42-26 🚀
|
| * @param {String} editedTask.assignee | ||
| * @param {Number} editedTask.assigneeAccountID | ||
| */ | ||
| function editTaskAndNavigate(report, ownerEmail, ownerAccountID, {title, description, assignee = '', assigneeAccountID = 0}) { |
There was a problem hiding this comment.
I think there is a problem here, when we create a new task we don't store ownerEmail, so after the first creation we edit the task title or description we won't pass the assgnee. then the task will be treated as unassigned. what do you think @Beamanator





























Details
Follow-up to #22075 where we're working on removing many uses of
emailswhere we now haveaccountIDs. Here specifically we're removing remaining uses ofreport.ownerEmail.Fixed Issues
$ Related to https://github.com/Expensify/Expensify/issues/294647
Tests
To cover our bases, let's create new accounts while performing these tasks:
For each of ^ tests, verify:
Finally log in to a brand new account, make sure everything works well
Offline tests
All of the above should be able to be done offline too, except logging in to a brand new account
QA Steps
Same as above
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodWaiting for Copylabel for a copy review on the original GH to get the correct copy.STYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)/** comment above it */thisproperly so there are no scoping issues (i.e. foronClick={this.submit}the methodthis.submitshould be bound tothisin the constructor)thisare necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);ifthis.submitis never passed to a component event handler likeonClick)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Web
Mobile Web - Chrome
Mobile Web - Safari
Desktop
iOS
Android