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 2024-09-24] [$125] Import categories - Error message for multiple GL code mappings displays "glCode" #48530

Closed
6 tasks done
IuliiaHerets opened this issue Sep 4, 2024 · 31 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Engineering External Added to denote the issue can be worked on by a contributor Weekly KSv2

Comments

@IuliiaHerets
Copy link

IuliiaHerets commented Sep 4, 2024

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: 9.0.29-0
Reproducible in staging?: Y
Reproducible in production?: N
Issue was found when executing this PR: #47827
Email or phone of affected tester (no customers): applausetester+kh010901@applause.expensifail.com
Issue reported by: Applause Internal Team

Action Performed:

  1. Go to staging.new.expensify.com
  2. Go to Control workspace settings > Categories.
  3. Click 3-dot menu.
  4. Click Import spreadsheet.
  5. Import a CSV file that has multiple columns.
  6. Map Name, Enabled.
  7. Map GL code a few times.
  8. Click Import.

Expected Result:

The error message for multiple GL code mappings will display "GL code".

Actual Result:

The error message for multiple GL code mappings displays "glCode".

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug6592371_1725411660394.20240904_074708.mp4

Bug6592371_1725411660406!Independent.-.Multi.Level.tags.csv

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~016b3b7ee11227810d
  • Upwork Job ID: 1831261318645362164
  • Last Price Increase: 2024-09-04
Issue OwnerCurrent Issue Owner: @mkhutornyi
@IuliiaHerets IuliiaHerets added DeployBlockerCash This issue or pull request should block deployment Bug Something is broken. Auto assigns a BugZero manager. labels Sep 4, 2024
Copy link

melvin-bot bot commented Sep 4, 2024

Triggered auto assignment to @greg-schroeder (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.

Copy link

melvin-bot bot commented Sep 4, 2024

Triggered auto assignment to @madmax330 (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

@melvin-bot melvin-bot bot added the Daily KSv2 label Sep 4, 2024
@github-actions github-actions bot added Engineering Hourly KSv2 and removed Daily KSv2 labels Sep 4, 2024
Copy link
Contributor

github-actions bot commented Sep 4, 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:

  1. Identify the pull request that introduced this issue and revert it.
  2. Find someone who can quickly fix the issue.
  3. Fix the issue yourself.

@IuliiaHerets
Copy link
Author

We think that this bug might be related to #wave-control

@daledah
Copy link
Contributor

daledah commented Sep 4, 2024

Proposal

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

The error message for multiple GL code mappings displays "glCode".

What is the root cause of that problem?

In Onyx, columns are stored as column values, not column text:

Screenshot 2024-09-04 at 16 16 10

Then in

const columns = Object.values(spreadsheet?.columns ?? {});

and

} else {
const duplicate = findDuplicate(columns);
if (duplicate) {
errors.duplicates = translate('spreadsheet.singleFieldMultipleColumns', duplicate);
} else {
errors = {};
}
}

We use column value to display duplicate error instead of column text, which result in the error displayed as glCode, meanwhile when displaying missing column error in

if (!requiredColumns.every((requiredColumn) => columns.includes(requiredColumn.value))) {
// eslint-disable-next-line rulesdir/prefer-early-return
requiredColumns.forEach((requiredColumn) => {
if (!columns.includes(requiredColumn.value)) {
errors.required = translate('spreadsheet.fieldNotMapped', requiredColumn.text);
}
});

we use column text, which results in correct message.

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

Get column text from the column value using columnRoles here

Change this:

errors.duplicates = translate('spreadsheet.singleFieldMultipleColumns', duplicate);

to:

        const duplicateColumn = columnRoles.find((role) => role.value === duplicate);
        errors.duplicates = translate('spreadsheet.singleFieldMultipleColumns', duplicateColumn?.text ?? '');

What alternative solutions did you explore? (Optional)

@madmax330 madmax330 added the External Added to denote the issue can be worked on by a contributor label Sep 4, 2024
Copy link

melvin-bot bot commented Sep 4, 2024

Job added to Upwork: https://www.upwork.com/jobs/~016b3b7ee11227810d

@melvin-bot melvin-bot bot changed the title Import categories - Error message for multiple GL code mappings displays "glCode" [$250] Import categories - Error message for multiple GL code mappings displays "glCode" Sep 4, 2024
@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Sep 4, 2024
Copy link

melvin-bot bot commented Sep 4, 2024

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

@madmax330
Copy link
Contributor

@daledah can you find the offending PR?

@shubham1206agra
Copy link
Contributor

@madmax330 It is #47827
cc @filip-solecki @rushatgabhane.

I think this feature is behind beta. Can someone confirm?

@mountiny
Copy link
Contributor

mountiny commented Sep 4, 2024

cc @filip-solecki @rushatgabhane @rlinoz coming from the import spreadsheet PR

@mountiny mountiny added Daily KSv2 and removed DeployBlockerCash This issue or pull request should block deployment Hourly KSv2 labels Sep 4, 2024
@mountiny
Copy link
Contributor

mountiny commented Sep 4, 2024

This feels super minor so demoting

@mountiny mountiny changed the title [$250] Import categories - Error message for multiple GL code mappings displays "glCode" [$125] Import categories - Error message for multiple GL code mappings displays "glCode" Sep 4, 2024
Copy link

melvin-bot bot commented Sep 4, 2024

Upwork job price has been updated to $125

@madmax330
Copy link
Contributor

@rushatgabhane seems like you are familiar with this, can you chime in here?

@greg-schroeder
Copy link
Contributor

Waiting to see what Rushat has to say!

@rushatgabhane
Copy link
Member

yeah this seems very minor.

@daledah's proposal should work

@rushatgabhane
Copy link
Member

cc: @madmax330

Copy link

melvin-bot bot commented Sep 10, 2024

📣 @daledah You have been assigned to this job!
Please apply to the Upwork job and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
Once you apply to this job, your Upwork ID will be stored and you will be automatically hired for future jobs!
Keep in mind: Code of Conduct | Contributing 📖

@daledah
Copy link
Contributor

daledah commented Sep 10, 2024

@rushatgabhane PR is ready.

@trjExpensify
Copy link
Contributor

CSV import is a #wave-control project, moving this over.

@greg-schroeder
Copy link
Contributor

Oops. sorry, thanks @trjExpensify

@greg-schroeder
Copy link
Contributor

PR is merged and has been deployed to staging. awaiting deploy to prod

@greg-schroeder greg-schroeder added Awaiting Payment Auto-added when associated PR is deployed to production and removed Reviewing Has a PR in review labels Sep 19, 2024
@greg-schroeder greg-schroeder changed the title [$125] Import categories - Error message for multiple GL code mappings displays "glCode" [HOLD for payment 2024-09-24] [$125] Import categories - Error message for multiple GL code mappings displays "glCode" Sep 19, 2024
@greg-schroeder
Copy link
Contributor

Prod automation didn't work, updated title/payment date

@greg-schroeder
Copy link
Contributor

greg-schroeder commented Sep 23, 2024

Payment summary:

Contributor: @daledah - $125 - Will be paid via Upwork on 9/24
C+: @rushatgabhane - $125 - Can make a manual request on ND on 9/24

@garrettmknight
Copy link
Contributor

$125 approved for @rushatgabhane

Copy link

melvin-bot bot commented Sep 24, 2024

Payment Summary

Upwork Job

BugZero Checklist (@greg-schroeder)

  • I have verified the correct assignees and roles are listed above and updated the neccesary manual offers
  • I have verified that there are no duplicate or incorrect contracts on Upwork for this job (https://www.upwork.com/ab/applicants/1831261318645362164/hired)
  • I have paid out the Upwork contracts or cancelled the ones that are incorrect
  • I have verified the payment summary above is correct

@greg-schroeder
Copy link
Contributor

greg-schroeder commented Sep 25, 2024

@daledah can you please follow the requested steps here so I can pay you? thanks

@greg-schroeder
Copy link
Contributor

NVM, offer sent via Upwork, I believe I found your profile. Will pay ASAP once you accept

@daledah
Copy link
Contributor

daledah commented Sep 25, 2024

Will pay ASAP once you accept

@greg-schroeder Done that thanks

@greg-schroeder
Copy link
Contributor

paid

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. Engineering External Added to denote the issue can be worked on by a contributor Weekly KSv2
Projects
Archived in project
Development

No branches or pull requests