Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[HOLD for payment 2023-11-29] [HOLD for payment 2023-11-22] [$500] [Wave 6: Tags] - System message displays 'tag' when a custom name is set for Tag #30377

Closed
6 tasks done
lanitochka17 opened this issue Oct 25, 2023 · 38 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor

Comments

@lanitochka17
Copy link

lanitochka17 commented Oct 25, 2023

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Version Number: 1.3.91-1
Reproducible in staging?: Yes
Reproducible in production?: Yes
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:

Precondition:

  • User has created a custom name for Tag
  • User has created a workspace expense with tag
  1. Go to Go to staging.new.expensify.com
  2. Go to the workspace expense details page
  3. Click on the Tag
  4. Select a different tag

Expected Result:

The system message will display the custom name for Tag

Actual Result:

The system message displays tag instead of the custom name for Tag

Workaround:

Unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • Windows: Chrome
  • MacOS: Desktop

Screenshots/Videos

Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
Windows: Chrome
Bug6250535_1698251560558.bandicam_2023-10-25_19-05-51-342.mp4
MacOS: Desktop

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01825cd86d92e38aaf
  • Upwork Job ID: 1717253370651332608
  • Last Price Increase: 2023-11-01
  • Automatic offers:
    • GItGudRatio | Contributor | 27537843
@lanitochka17 lanitochka17 added External Added to denote the issue can be worked on by a contributor Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Oct 25, 2023
@melvin-bot melvin-bot bot changed the title Tag - System message displays 'tag' when a custom name is set for Tag [$500] Tag - System message displays 'tag' when a custom name is set for Tag Oct 25, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 25, 2023

Job added to Upwork: https://www.upwork.com/jobs/~01825cd86d92e38aaf

@melvin-bot
Copy link

melvin-bot bot commented Oct 25, 2023

Triggered auto assignment to @bfitzexpensify (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Oct 25, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 25, 2023

Bug0 Triage Checklist (Main S/O)

  • This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
  • This bug is not a duplicate report (check E/App issues and #expensify-bugs)
    • If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
  • This bug is reproducible using the reproduction steps in the OP. S/O
    • If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
    • If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
  • This issue is filled out as thoroughly and clearly as possible
    • Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
  • I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync

@melvin-bot
Copy link

melvin-bot bot commented Oct 25, 2023

Triggered auto assignment to Contributor-plus team member for initial proposal review - @rushatgabhane (External)

@GItGudRatio
Copy link
Contributor

Proposal

Please re-state the problem that we are trying to solve in this issue.

System message displays 'tag' when a custom name is set for Tag

What is the root cause of that problem?

We use common.tag for the system message here, even if custom tags are set:

return getProperSchemaForModifiedExpenseMessage(reportActionOriginalMessage.tag, reportActionOriginalMessage.oldTag, Localize.translateLocal('common.tag'), true);

What changes do you think we should make in order to solve the problem?

In order to solve this issue, we need to pass the custom tag if custom tags are set. To do this,

  1. We need to obtain the report from the reportAction. This can be done using the getReport method.
  2. Once we have the report, we use the policyID to get the policy tags from the POLICY_TAGS_ onyx key. To do this, We can create a new method in ReportActionsUtils that fetches the policy tags OR create a method in IOU.js.
  3. Using the policy tags object, we can use the PolicyUtils.getTag method to get the custom name for the tag.
  4. Depending on the policy tag name, use the tag name or the default "Tag".
    let allPolicyTags = {};
    Onyx.connect({
    key: ONYXKEYS.COLLECTION.POLICY_TAGS,
    waitForCollectionCallback: true,
    callback: (value) => {
    if (!value) {
    allPolicyTags = {};
    return;
    }
    allPolicyTags = value;
    },
    });
Fix video
2023-10-26.02-01-38.mp4
### What alternative solutions did you explore? (Optional)

@dukenv0307
Copy link
Contributor

Proposal

Please re-state the problem that we are trying to solve in this issue.

System message displays 'tag' when a custom name is set for Tag

What is the root cause of that problem?

We pass valueName for modified tag message param to getProperSchemaForModifiedExpenseMessage function as a constant common.tag

return getProperSchemaForModifiedExpenseMessage(reportActionOriginalMessage.tag, reportActionOriginalMessage.oldTag, Localize.translateLocal('common.tag'), true);

So it's always display tag even the custom name is set for Tag

What changes do you think we should make in order to solve the problem?

We should get the custom tag name from policyTags of the policy of the report.

  1. In ReportUtils, subcribe policyTags from Onyx
let allPolicyTags;
Onyx.connect({
    key: ONYXKEYS.COLLECTION.POLICY_TAGS,
    waitForCollectionCallback: true,
    callback: (val) => (allPolicyTags = val),
});
  1. For the tag case, get the tagName base on reportAction by using getTagListName function and pass it as valueName to getProperSchemaForModifiedExpenseMessage function.

OPTIONAL: If the tagName is default we can pass common.tag to use for translation but I think we shouldn't pass translation key for tag case because it's the tag name.

const report = getReport(reportAction.reportID);
const tagName = PolicyUtils.getTagListName(allPolicyTags[`${ONYXKEYS.COLLECTION.POLICY_TAGS}${report.policyID}`])
return getProperSchemaForModifiedExpenseMessage(reportActionOriginalMessage.tag, reportActionOriginalMessage.oldTag, tagName, true);

if (hasModifiedTag) {

What alternative solutions did you explore? (Optional)

@bfitzexpensify
Copy link
Contributor

Couple of proposals ready for review @rushatgabhane - thank you!

@melvin-bot melvin-bot bot added the Overdue label Oct 30, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 31, 2023

@rushatgabhane, @bfitzexpensify Whoops! This issue is 2 days overdue. Let's get this updated quick!

@bfitzexpensify
Copy link
Contributor

Bump for review @rushatgabhane - thanks!

@melvin-bot melvin-bot bot removed the Overdue label Oct 31, 2023
Copy link

melvin-bot bot commented Nov 1, 2023

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

@rushatgabhane
Copy link
Member

I like @GItGudRatio's proposal

🎀 👀 🎀

Copy link

melvin-bot bot commented Nov 3, 2023

Triggered auto assignment to @lakchote, see https://stackoverflow.com/c/expensify/questions/7972 for more details.

@lakchote
Copy link
Contributor

lakchote commented Nov 6, 2023

@GItGudRatio's proposal LGTM.

@melvin-bot melvin-bot bot removed the Overdue label Nov 6, 2023
@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Nov 6, 2023
Copy link

melvin-bot bot commented Nov 6, 2023

📣 @rushatgabhane Please request via NewDot manual requests for the Reviewer role ($500)

Copy link

melvin-bot bot commented Nov 6, 2023

📣 @GItGudRatio 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job
Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
Keep in mind: Code of Conduct | Contributing 📖

@bfitzexpensify bfitzexpensify added Daily KSv2 and removed Weekly KSv2 labels Nov 21, 2023
@melvin-bot melvin-bot bot added Weekly KSv2 and removed Daily KSv2 labels Nov 22, 2023
@melvin-bot melvin-bot bot changed the title [HOLD for payment 2023-11-22] [$500] [Wave 6: Tags] - System message displays 'tag' when a custom name is set for Tag [HOLD for payment 2023-11-29] [HOLD for payment 2023-11-22] [$500] [Wave 6: Tags] - System message displays 'tag' when a custom name is set for Tag Nov 22, 2023
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Nov 22, 2023
Copy link

melvin-bot bot commented Nov 22, 2023

Reviewing label has been removed, please complete the "BugZero Checklist".

Copy link

melvin-bot bot commented Nov 22, 2023

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.1-13 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-11-29. 🎊

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

For reference, here are some details about the assignees on this issue:

Copy link

melvin-bot bot commented Nov 22, 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:

  • [@rushatgabhane] The PR that introduced the bug has been identified. Link to the PR:
  • [@rushatgabhane] 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:
  • [@rushatgabhane] 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:
  • [@rushatgabhane] Determine if we should create a regression test for this bug.
  • [@rushatgabhane] 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.
  • [@bfitzexpensify] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@melvin-bot melvin-bot bot added Daily KSv2 Overdue and removed Weekly KSv2 labels Nov 22, 2023
@lakchote
Copy link
Contributor

@rushatgabhane please complete the checklist, thanks!

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Nov 24, 2023
@lakchote
Copy link
Contributor

Asked on Slack here

@bfitzexpensify
Copy link
Contributor

Payment summary:

Contributor: @GItGudRatio to be paid $500 via Upwork ✅
C+: @rushatgabhane to be paid $500 via manual request

@rushatgabhane also another bump for the BZ checklist - thanks!

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Nov 29, 2023
@lakchote
Copy link
Contributor

lakchote commented Dec 4, 2023

@rushatgabhane can you complete the BZ checklist?

@melvin-bot melvin-bot bot removed the Overdue label Dec 4, 2023
@rushatgabhane
Copy link
Member

rushatgabhane commented Dec 4, 2023

  1. The PR that introduced the bug has been identified. Link to the PR: #26793: Edit a tag in a money request #27950

  2. 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/27950/files#r1415358482

  3. 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: N.A.

  4. Determine if we should create a regression test for this bug. No

  5. 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 - N.A.

@rushatgabhane
Copy link
Member

manual request here https://staging.new.expensify.com/r/2152289096273390

@bfitzexpensify
Copy link
Contributor

All done here, thanks everyone.

@JmillsExpensify
Copy link

$500 payment approved for @rushatgabhane based on this comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor
Projects
No open projects
Development

No branches or pull requests

8 participants