You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[HOLD for payment 2023-07-26] [$1000] Green dot doesn't appear automatically when assigning task to self repeatedly #22149
The green dot in LHN should be visible automatically when assigned to self.
Actual Result:
The green dot in LHN is only visible when clicked on another report in LHN.
Workaround:
Can the user still use Expensify without this being fixed? Have you informed them of the workaround?
Platforms:
Which of our officially supported platforms is this issue occurring on?
Android / native
Android / Chrome
iOS / native
iOS / Safari
MacOS / Chrome / Safari
MacOS / Desktop
Version Number: 1.3.36-2 Reproducible in staging?: y Reproducible in production?: y If this was caught during regression testing, add the test name, ID and link from TestRail: Email or phone of affected tester (no customers): Logs:https://stackoverflow.com/c/expensify/questions/4856 Notes/Photos/Videos: Any additional supporting documentation
Green dot doesn't appear automatically when assigning task to self repeatedly.
What is the root cause of that problem?
The root cause is that the OptionRowLHN (the component which displays the green dot) doesn't get updated when we assign task to self. Now the question arises that when we un-assign ourselves, the component does update but doesn't when we assign it to ourselves.
The answer lies here in the function Task.setAssigneeValue:
Here you can see that we are explicitly checking if the assigned user is current user and this is what causes this disparity of updation while un-assigning but no updation when assigning. The line that does the updating is Report.openReport on line 498 and as you can see it isn't called when we are setting the assignee to current user.
What changes do you think we should make in order to solve this problem?
The use of Report.openReport I think it to make sure the LHN is updated with the latest assignee chat having their assignment message in the subtitle, but obviously we can't use that for the current user as the current user has no report.
Notice that after calling setAssigneeValue, we are also calling another function called editTaskAndNavigate
@esh-g okay I was able to reproduce, but I was also able to reproduce on MacOS desktop. Can we please confirm all the platforms in which this is happening to ensure parity across all? cc @kavimuru
Please re-state the problem that we are trying to solve in this issue.
Green dot doesn't appear automatically when assigning task to self repeatedly.
What is the root cause of that problem?
The root cause is that LHN does not re-render when assigning task to self.
If assigning task to self, BE responds only one task report that has managerEmail.
And if assigning task to others, BE will respond two reports.
One is a task report, and another is a assignee's chat report that has a lastMessageText.
SidebarLinks retrieve reports with using chatReportSelector, and in this function there is no managerEmail.
So when assigning task to self, side bar will not be re-render, so does not appear green dot automatically.
And when assigning task to others, since there is a another chat report which has a lastMessageText, side bar will be re-render, and green dot will be disappear.
What changes do you think we should make in order to solve the problem?
We can add managerEmail property to chatReportSelector as below.
@esh-g also, I think we don't have to specify "repeatedly". It happens when you assign to self after not self-assigning after the first go around when creating the task - but can you please confirm that on your end?
@NicMendonca Yes, it almost always happens when assigning yourself but there was one time that it did update, so I thought of adding repeatedly but I don't think its required... It was mostly just to assure the reproduction of this bug
changed the title [-]Green dot doesn't appear automatically when assigning task to self repeatedly[/-][+][$1000] Green dot doesn't appear automatically when assigning task to self repeatedly[/+]on Jul 7, 2023
changed the title [-][$1000] Green dot doesn't appear automatically when assigning task to self repeatedly[/-][+][HOLD for payment 2023-07-26] [$1000] Green dot doesn't appear automatically when assigning task to self repeatedly[/+]on Jul 19, 2023
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.42-26 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
If no regressions arise, payment will be issued on 2023-07-26. 🎊
After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.
External issue reporter
Contributor that fixed the issue
Contributor+ that helped on the issue and/or PR
As a reminder, here are the bonuses/penalties that should be applied for any External issue:
Merged PR within 3 business days of assignment - 50% bonus
Merged PR more than 9 business days after assignment - 50% penalty
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
[@mollfpr] The PR that introduced the bug has been identified. Link to the PR:
[@mollfpr] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:
[@mollfpr] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:
[@mollfpr] Determine if we should create a regression test for this bug.
[@mollfpr] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
[@NicMendonca] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:
[@mollfpr] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:
[@mollfpr] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:
The regression step should be enough.
[@mollfpr] Determine if we should create a regression test for this bug.
[@mollfpr] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
Activity
melvin-bot commentedon Jul 4, 2023
Triggered auto assignment to @NicMendonca (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.melvin-bot commentedon Jul 4, 2023
Bug0 Triage Checklist (Main S/O)
Platformsin OP are ✅)dukenv0307 commentedon Jul 5, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
Green dot doesn't appear automatically when assigning task to self repeatedly
What is the root cause of that problem?
SideLink doesn’t update after assign task to self because managerEmail is lack from chatReportSelector
What changes do you think we should make in order to solve the problem?
In src/pages/home/sidebar/SidebarLinks.js, We should add managerEmail in chatReportSelector function
What alternative solutions did you explore? (Optional)
esh-g commentedon Jul 5, 2023
Proposal
Please re-state the problem
Green dot doesn't appear automatically when assigning task to self repeatedly.
What is the root cause of that problem?
The root cause is that the
OptionRowLHN(the component which displays the green dot) doesn't get updated when we assign task to self. Now the question arises that when we un-assign ourselves, the component does update but doesn't when we assign it to ourselves.The answer lies here in the function
Task.setAssigneeValue:App/src/libs/actions/Task.js
Lines 486 to 500 in 11b8908
Here you can see that we are explicitly checking if the assigned user is current user and this is what causes this disparity of updation while un-assigning but no updation when assigning. The line that does the updating is
Report.openReporton line498and as you can see it isn't called when we are setting the assignee to current user.What changes do you think we should make in order to solve this problem?
The use of
Report.openReportI think it to make sure the LHN is updated with the latest assignee chat having their assignment message in the subtitle, but obviously we can't use that for the current user as the current user has no report.Notice that after calling
setAssigneeValue, we are also calling another function callededitTaskAndNavigateApp/src/pages/tasks/TaskAssigneeSelectorModal.js
Lines 166 to 172 in f9a8529
And in
editTaskAndNavigate, we can see that we are dismissing the task modal in the end.App/src/libs/actions/Task.js
Line 413 in f9a8529
Since we are already dismissing the modal, we can also make sure that the report updates by adding the following line after this:
What other alternative approach did you explore (Optional)
N/A
NicMendonca commentedon Jul 5, 2023
Trying to reproduce this now
NicMendonca commentedon Jul 5, 2023
@esh-g okay I was able to reproduce, but I was also able to reproduce on MacOS desktop. Can we please confirm all the platforms in which this is happening to ensure parity across all? cc @kavimuru
StevenKKC commentedon Jul 6, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
Green dot doesn't appear automatically when assigning task to self repeatedly.
What is the root cause of that problem?
The root cause is that LHN does not re-render when assigning task to self.
If assigning task to self, BE responds only one task report that has

managerEmail.And if assigning task to others, BE will respond two reports.

One is a task report, and another is a assignee's chat report that has a
lastMessageText.SidebarLinks retrieve reports with using
chatReportSelector, and in this function there is nomanagerEmail.App/src/pages/home/sidebar/SidebarLinks.js
Lines 365 to 368 in 01a18f0
App/src/pages/home/sidebar/SidebarLinks.js
Lines 282 to 302 in 01a18f0
So when assigning task to self, side bar will not be re-render, so does not appear green dot automatically.
And when assigning task to others, since there is a another chat report which has a
lastMessageText, side bar will be re-render, and green dot will be disappear.What changes do you think we should make in order to solve the problem?
We can add
managerEmailproperty tochatReportSelectoras below.What alternative solutions did you explore? (Optional)
None.
NicMendonca commentedon Jul 7, 2023
@esh-g also, I think we don't have to specify "repeatedly". It happens when you assign to self after not self-assigning after the first go around when creating the task - but can you please confirm that on your end?
esh-g commentedon Jul 7, 2023
@NicMendonca Yes, it almost always happens when assigning yourself but there was one time that it did update, so I thought of adding
repeatedlybut I don't think its required... It was mostly just to assure the reproduction of this bug[-]Green dot doesn't appear automatically when assigning task to self repeatedly[/-][+][$1000] Green dot doesn't appear automatically when assigning task to self repeatedly[/+]melvin-bot commentedon Jul 7, 2023
Job added to Upwork: https://www.upwork.com/jobs/~01d5e85cd8d7e7f90a
29 remaining items
[-][$1000] Green dot doesn't appear automatically when assigning task to self repeatedly[/-][+][HOLD for payment 2023-07-26] [$1000] Green dot doesn't appear automatically when assigning task to self repeatedly[/+]melvin-bot commentedon Jul 19, 2023
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.42-26 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
If no regressions arise, payment will be issued on 2023-07-26. 🎊
After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.
As a reminder, here are the bonuses/penalties that should be applied for any External issue:
melvin-bot commentedon Jul 19, 2023
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
mollfpr commentedon Jul 25, 2023
#20808
https://github.com/Expensify/App/pull/20808/files#r1272970129
The regression step should be enough.
mollfpr commentedon Jul 25, 2023
@dukenv0307 is eligible for the bonus speed. The assignment is on Jul 13, and my approval of the PR is on Jul 14.
NicMendonca commentedon Jul 26, 2023
NicMendonca commentedon Jul 26, 2023
@esh-g can you please apply to the job? https://www.upwork.com/jobs/~01d5e85cd8d7e7f90a
NicMendonca commentedon Jul 26, 2023
@dukenv0307 you've been paid 🎉
mollfpr commentedon Jul 26, 2023
@NicMendonca Yeah, the payment still in Upwork.
NicMendonca commentedon Jul 26, 2023
@mollfpr you've been paid!
esh-g commentedon Jul 26, 2023
@NicMendonca Applied!
NicMendonca commentedon Jul 27, 2023
@esh-g paid!