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 2025-02-05] [$250] Task - Task assignee is not assigned when creating task via [] @email <task name> #55564
Version Number: 9.0.88-4 Reproducible in staging?: Y Reproducible in production?: Y If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: N/A If this was caught during regression testing, add the test name, ID and link from TestRail: N/A Issue reported by: Applause - Internal Team
Please re-state the problem that we are trying to solve in this issue.
The task regex doesn't work.
What is the root cause of that problem?
This starts happening after this PR. In that PR, we want to add the task title length validation, so the PR moves the regex to CONST to make it reusable.
The regex concatenates with the EMAIL_WITH_OPTIONAL_DOMAIN. However, the way it's being concatenated is wrong. If we see the code where the concatenation is first added, we take the regex source and concatenate it into the string instead of the whole regex object.
Notice from the image above, on the left (which is the current regex) has the /.
What changes do you think we should make in order to solve the problem?
Update the regex so it only concatenates with the EMAIL_WITH_OPTIONAL_DOMAIN source.
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
To be able to test it easily, I think we should move this logic to a util and test that util which returns the task title and/or assignee. Since there are a lot of cases, we will just handle the case of task regex with mention and title.
changed the title [-]Task - Task assignee is not assigned when creating task via [] @email <task name>[/-][+][$250] Task - Task assignee is not assigned when creating task via [] @email <task name>[/+]on Jan 23, 2025
changed the title [-][$250] Task - Task assignee is not assigned when creating task via [] @email <task name>[/-][+][HOLD for payment 2025-02-05] [$250] Task - Task assignee is not assigned when creating task via [] @email <task name>[/+]on Jan 29, 2025
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.90-6 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
@eh2077@kadiealexander@eh2077 The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source 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: NA
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.
[BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.
Activity
melvin-bot commentedon Jan 21, 2025
Triggered auto assignment to @kadiealexander (
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.Tony-MK commentedon Jan 21, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
Task - Task assignee is not assigned when creating task via [] @email
What is the root cause of that problem?
The
CONST.REGEX.TASK_TITLE_WITH_OPTONAL_SHORT_MENTIONregex does not properly match the groups in the text.App/src/pages/home/report/ReportFooter.tsx
Line 128 in 85c646c
What changes do you think we should make in order to solve the problem?
Firstly, update the
CONST.REGEX.TASK_TITLE_WITH_OPTONAL_SHORT_MENTIONregex to the one below.Secondly, retrieve the mentioned text from the third, not the fourth group, and handle the extra
@character.App/src/pages/home/report/ReportFooter.tsx
Line 137 in 85c646c
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
Test
CONST.REGEX.TASK_TITLE_WITH_OPTONAL_SHORT_MENTIONwith some examples of comments that expect a task to be created.bernhardoj commentedon Jan 22, 2025
Proposal
Please re-state the problem that we are trying to solve in this issue.
The task regex doesn't work.
What is the root cause of that problem?
This starts happening after this PR. In that PR, we want to add the task title length validation, so the PR moves the regex to CONST to make it reusable.
App/src/CONST.ts
Line 3127 in 0190b0a
The regex concatenates with the
EMAIL_WITH_OPTIONAL_DOMAIN. However, the way it's being concatenated is wrong. If we see the code where the concatenation is first added, we take the regex source and concatenate it into the string instead of the whole regex object.Notice from the image above, on the left (which is the current regex) has the
/.What changes do you think we should make in order to solve the problem?
Update the regex so it only concatenates with the
EMAIL_WITH_OPTIONAL_DOMAINsource.App/src/CONST.ts
Line 3127 in 0190b0a
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
To be able to test it easily, I think we should move this logic to a util and test that util which returns the task title and/or assignee. Since there are a lot of cases, we will just handle the case of task regex with mention and title.
App/src/pages/home/report/ReportFooter.tsx
Lines 128 to 157 in 0190b0a
[-]Task - Task assignee is not assigned when creating task via [] @email <task name>[/-][+][$250] Task - Task assignee is not assigned when creating task via [] @email <task name>[/+]melvin-bot commentedon Jan 23, 2025
Job added to Upwork: https://www.upwork.com/jobs/~021882302358350245599
melvin-bot commentedon Jan 23, 2025
Triggered auto assignment to Contributor-plus team member for initial proposal review - @eh2077 (
External)eh2077 commentedon Jan 23, 2025
I think we should go with @bernhardoj 's proposal. I agree with their diagnosis of the issue and the test plan also looks good to me.
🎀👀🎀 C+ reviewed
13 remaining items
[-][$250] Task - Task assignee is not assigned when creating task via [] @email <task name>[/-][+][HOLD for payment 2025-02-05] [$250] Task - Task assignee is not assigned when creating task via [] @email <task name>[/+]melvin-bot commentedon Jan 29, 2025
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon Jan 29, 2025
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.90-6 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 2025-02-05. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon Jan 29, 2025
@eh2077 @kadiealexander @eh2077 The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]
eh2077 commentedon Feb 4, 2025
BugZero Checklist:
Bug classification
Source of bug:
Where bug was reported:
Who reported the bug:
[Contributor] 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: https://github.com/Expensify/App/pull/52941/files#r1941178581
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source 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: NA
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.
[BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.
Link to issue: https://github.com/Expensify/Expensify/issues/467738
Regression Test Proposal
Precondition:
NA
Test:
Do we agree 👍 or 👎
melvin-bot commentedon Feb 5, 2025
Payment Summary
Upwork Job
BugZero Checklist (@kadiealexander)
bernhardoj commentedon Feb 6, 2025
Requested in ND.
JmillsExpensify commentedon Feb 10, 2025
$250 approved for @bernhardoj
JmillsExpensify commentedon Feb 13, 2025
$250 approved for @eh2077