Open kavimuru opened 6 months ago
Triggered auto assignment to @strepanier03 (Bug
), see https://stackoverflow.com/c/expensify/questions/14418 for more details.
:wave: 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:
Triggered auto assignment to @marcaaron (Engineering
), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.
@marcaaron 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.
We think this bug might be related to #vip-vsb. cc @quinthar
### Please re-state the problem that we are trying to solve in this issue. Thread header and LHN for task assignee system message is missing the assignee
The message in parentReportAction
says something like this: assigned to <mention-user accountID=16485686></mention-user>
and the final message only remains 'assigned to' on both header and and LHN.
https://github.com/Expensify/App/blob/9132e058fe27119906e027579ea9b36be5a57400/src/libs/ReportUtils.ts#L2616-L2620
We need to first check if message has accountId, and if it has then we get the display name for the participant.
const participantAccountId = doesMessageHasAccountId()
if(parentReportAction.actionName === CONST.REPORT.ACTIONS.TYPE.TASKEDITED && participantAccountId) {
parentReportActionMessage = parentReportActionMessage + ' ' + + getDisplayNameForParticipant(participantAccountId, undefined, undefined, true);
}
return parentReportActionMessage;
Here doesMessageHasAccountId()
is simple utility function which will check if message has accountId and it has then it will return that accountId. Also in above condition CONST.REPORT.ACTIONS.TYPE.TASKEDITED
represents that task is edited and we are opening that (edited) system message
I am thinking if this is a new feature then we probably don't need to make this a blocker.
I am thinking if this is a new feature then we probably don't need to make this a blocker
I think we should treat this as a blocker, because it's available to any new user and looks pretty obviously broken
Cool. These are the PRs related to tasks...
https://github.com/Expensify/App/pull/37991 https://github.com/Expensify/App/pull/36768 <- this looks like something new https://github.com/Expensify/App/pull/35484
@thienlnam might know which one this could be related to?
I am still leaning towards non blocker because creating a thread off a system message seems like a weird action for a user to take. And I'm not sure how that should work at all. 🤔
I am still leaning towards non blocker because creating a thread off a system message seems like a weird action for a user to take.
I agree with this. I don't think a customer would create a thread off a system message. If they questioned it, they'd like be making a new comment after the system message instead of threading off it. I don't think this is a blocker either.
Well I don't feel that strongly but it seems to me that a system message is a message so should work just like any other 🤷🏼
Oh, this looks related to this issue https://github.com/Expensify/App/issues/38000.
This PR added the system messages, so now you have the ability to thread from them.
I also agree this shouldn't block deploy - it kind of relies on you creating a task, changing the assignee and then deciding to thread off the system message which doesn't seem that common in the first place
sounds like there's more votes in favor of demoting this. I do think creating a thread off a system message should work, but agree it's an edge case so doesn't necessarily need to block deploy.
If this is not urgent – I would recommend putting this on hold for https://github.com/Expensify/Expensify/issues/374470 similar to how we did with https://github.com/Expensify/App/issues/37943 – that PR should introduce a more robust originalMessage
to the TASKEDITED
report actions, and it will allow building the thread name without workarounds (like parsing the message etc.)
Demoting based on the discussion above.
On Hold for #374470.
When opening a thread under the "Reassigned task" action, the title in Header and LHN are incorrect.
We do not handle the TASKEDITED parent actions in a special way – only using the built parentReportAction.message:
First, we should wait for #374470 – it should introduce a rich originalMessage
structure for the TASKEDITED
actions.
Second, I would say it's better to hold for https://github.com/Expensify/App/issues/37943#issuecomment-1985843265 – in that proposal, I've described in details the process of leveraging the new originalMessage
structure for building the localized messages based on the data that was modified (if we don't want to hold, we can implement the same changes I suggested in that proposal).
After that, we should modify the ReportUtils.getReportName
to handle the case when the parent report action is the Task action (including the "marked as complete/incomplete). The reason to include these actions as well is this: when we open a thread from one of these older-format task actions, the title seems to be correct, but it's not localizable:
So the final code will look like this:
function getReportName(report: OnyxEntry<Report>, policy: OnyxEntry<Policy> = null): string {
let formattedName: string | undefined;
const parentReportAction = ReportActionsUtils.getParentReportAction(report);
if (isChatThread(report)) {
if (!isEmptyObject(parentReportAction) && ReportActionsUtils.isTransactionThread(parentReportAction)) {
formattedName = getTransactionReportName(parentReportAction);
if (isArchivedRoom(report)) {
formattedName += ` (${Localize.translateLocal('common.archived')})`;
}
return formattedName;
}
if (parentReportAction?.message?.[0]?.isDeletedParentAction) {
return Localize.translateLocal('parentReportAction.deletedMessage');
}
+ if (ReportActionUtils.isTaskAction(parentReportAction)) {
+ return TaskUtils.getTaskReportActionMessage(parentReportAction).text;
+ }
...
This will allow to have the LHN and Title text for task-related actions both properly built and localized.
Hold PR is still open.
I see this issue is on HOLD and waiting for #374470, but also see that #374470 has not had much progress. Should we continue to leave this open? 🤔
@thienlnam any chance you can give us an ETA on when those changes might be live? We could adjust the priority here based on that. Thanks!
@thienlnam - Any chance you have an eta on those changes?
Ah sorry, didn't see this. I'm not working on those at this time since they're not part of a release. I would throw a monthly on this until we decide to reprioritize
Sounds good, thanks for the context and advice.
Going OOO so gonna unassign this one for now. This one has been open for a while and there's not really anything actionable for me to do here.
Not prioritized right now.
Not prioritized currently.
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Version Number: 1.4.49-0 Reproducible in staging?: y Reproducible in production?: NO - new feature (system message) 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 Expensify/Expensify Issue URL: Issue reported by: applause internal team Slack conversation:
Action Performed:
Expected Result:
The thread header and LHN title will show assignee name.
Actual Result:
The thread header and LHN title do not show assignee name.
Also, The email in system message is also not copied when copied to clipboard.
Workaround:
unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
https://github.com/Expensify/App/assets/43996225/95d8bd56-c3da-4238-b00e-c21193ce2fc8
View all open jobs on GitHub