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
[$250] Thread – Unable to leave thread in a task detail. #44964
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
Identify the pull request that introduced this issue and revert it.
@abekkala FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors
Previously, we had a 3-dot button that shows the leave option for the thread, but now it's removed, but the leave button condition isn't updated yet.
What changes do you think we should make in order to solve the problem?
I propose that we just use ReportUtils.canLeaveChat function to check whether we can leave a report or not. Then, we can move the other current conditions to canLeaveChat.
const shouldShowLeaveButton = ReportUtils.canLeaveChat(report, policy)
function canLeaveChat(report: OnyxEntry<Report>, policy: OnyxEntry<Policy>): boolean {
if (isGroupChat) return true;
if (isPolicyExpenseChat && !report.isOwnPolicyExpenseChat && !isPolicyAdmin) return true;
...
Last, we need to update the leaveChat logic so that leaving a thread will call leaveRoom instead of leaveGroupChat.
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:
[@akinwale] The PR that introduced the bug has been identified. Link to the PR:
[@akinwale] 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:
[@akinwale] 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:
[@akinwale] Determine if we should create a regression test for this bug.
[@akinwale] 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.
Regression Test Steps
Launch Expensify
Open a chat report
Send a message
Reply in the thread of the message that was sent
Click or tap on the chat header
Verify that the Leave option is displayed in the menu
Activity
melvin-bot commentedon Jul 8, 2024
Triggered auto assignment to @puneetlath (
DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.melvin-bot commentedon Jul 8, 2024
Triggered auto assignment to @abekkala (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.github-actions commentedon Jul 8, 2024
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
m-natarajan commentedon Jul 8, 2024
@abekkala FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors
m-natarajan commentedon Jul 8, 2024
We think that this bug might be related to #vip-vsb
bernhardoj commentedon Jul 8, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
There is no option to leave thread in report details page.
What is the root cause of that problem?
The condition of showing the leave button requires the report to not be a thread.
App/src/pages/ReportDetailsPage.tsx
Lines 243 to 244 in e0ccba5
Previously, we had a 3-dot button that shows the leave option for the thread, but now it's removed, but the leave button condition isn't updated yet.
What changes do you think we should make in order to solve the problem?
I propose that we just use
ReportUtils.canLeaveChatfunction to check whether we can leave a report or not. Then, we can move the other current conditions tocanLeaveChat.Last, we need to update the
leaveChatlogic so that leaving a thread will callleaveRoominstead ofleaveGroupChat.App/src/pages/ReportDetailsPage.tsx
Lines 224 to 232 in e0ccba5
We can do that by switching the check.
16 remaining items
puneetlath commentedon Jul 9, 2024
Sounds good. I like consolidating the logic into ReportUtils.canLeaveChat.
bernhardoj commentedon Jul 10, 2024
PR is ready
cc: @akinwale
abekkala commentedon Jul 11, 2024
waiting on PR Review @akinwale
melvin-bot commentedon Jul 22, 2024
If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.
If a regression has occurred and you are the assigned CM follow the instructions here.
If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.
melvin-bot commentedon Jul 22, 2024
If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.
If a regression has occurred and you are the assigned CM follow the instructions here.
If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.
abekkala commentedon Jul 24, 2024
deployed to production Jul 23
akinwale commentedon Jul 30, 2024
This was a regression from #44252.
Regression Test Steps
Do we agree 👍 or 👎?
abekkala commentedon Jul 30, 2024
PAYMENT SUMMARY FOR JULY 30
abekkala commentedon Jul 30, 2024
@akinwale payment sent and contract ended - thank you!
bernhardoj commentedon Jul 30, 2024
Requested in ND.
JmillsExpensify commentedon Jul 30, 2024
$250 approved for @bernhardoj