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

Chat - Non-Roman Alphabet file name of the Word document replaced with underscores in the chat #19616

Closed
6 tasks done
kbecciv opened this issue May 25, 2023 · 13 comments
Closed
6 tasks done
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering Internal Requires API changes or must be handled by Expensify staff

Comments

@kbecciv
Copy link

kbecciv commented May 25, 2023

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Action Performed:

  1. Create a Word document with a Non-Roman Alphabet file name (eg: Щенок.docx)
  2. Go to URL https://staging.new.expensify.com/
  3. Login with any account
  4. Go to any chat
  5. Drag and drop a document with Non-Roman Alphabet file name

Expected Result:

The Non-Roman Alphabet file name of the Word document is visible in the preview and in the chat

Actual Result:

The Non-Roman Alphabet file name of the Word document is visible in the preview (eg: Щенок.docx), but not in the chat. In the chat, the filename is replaced with underscores (eg: _____.docx)

Workaround:

Unknown

Platforms:

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

  • Android / native
  • Android / Chrome
  • iOS / native
  • iOS / Safari
  • MacOS / Chrome / Safari
  • MacOS / Desktop

Version Number: 1.3.18.2

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

Notes/Photos/Videos: Any additional supporting documentation

https://platform.applause.com/services/links/v1/external/4ac54105bdde2c9fa5e19899833a32bdda7a33eb9b87abf81b444fa0a15220d9

https://platform.applause.com/services/links/v1/external/877d86acf3d128c0e536c122120b0c93061351a6508a04506b5e5e2a109a04ef
https://platform.applause.com/services/links/v1/external/997d7e9b002cee4da49a64c07db89591e474b86733161cead6efbe09b3e678b2

Expensify/Expensify Issue URL:

Issue reported by: Applause - Internal Team

Slack conversation:

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~013bf8b1c16439107d
  • Upwork Job ID: 1661820637327372288
  • Last Price Increase: 2023-05-25
@kbecciv kbecciv added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels May 25, 2023
@melvin-bot
Copy link

melvin-bot bot commented May 25, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented May 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

@bogoroh
Copy link
Contributor

bogoroh commented May 25, 2023

Proposal

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

Non english filenames are getting transformed and should remain as is.

What is the root cause of that problem?

The root cause of this problem sits somewhere on the database side. From the front end we're correctly sending the information in a non translated text. Please see attachment below:
Screenshot 2023-05-25 at 12 37 43 PM

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

We probably have this function somewhere on the backend/database as well that replaces special characters with underscores. We should not let the fileName run through that function

The function would look something like this:

function cleanFileName(fileName) {
return fileName.replace(/[^a-zA-Z0-9\-._]/g, '_');
}

What alternative solutions did you explore? (Optional)

@conorpendergrast conorpendergrast changed the title Chat - Not English title of the Word document does not display in the chat Chat - Non-Roman Alphabet file name of the Word document does not display in the chat May 25, 2023
@conorpendergrast conorpendergrast changed the title Chat - Non-Roman Alphabet file name of the Word document does not display in the chat Chat - Non-Roman Alphabet file name of the Word document replaced with underscores in the chat May 25, 2023
@conorpendergrast
Copy link
Contributor

Reproduced. I'm going to move this internally for now, as a quick sense-check

@conorpendergrast conorpendergrast added Engineering Internal Requires API changes or must be handled by Expensify staff labels May 25, 2023
@melvin-bot
Copy link

melvin-bot bot commented May 25, 2023

Triggered auto assignment to @stitesExpensify (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.

@melvin-bot
Copy link

melvin-bot bot commented May 25, 2023

Job added to Upwork: https://www.upwork.com/jobs/~013bf8b1c16439107d

@melvin-bot
Copy link

melvin-bot bot commented May 25, 2023

Triggered auto assignment to Contributor Plus for review of internal employee PR - @thesahindia (Internal)

@conorpendergrast
Copy link
Contributor

@stitesExpensify I can't think of a risk to no longer replacing non-Roman Alphabet characters in filenames with underscores, can you?

@stitesExpensify
Copy link
Contributor

Hmm, it could be a technical requirement of AWS or something, I'm not really sure. Let me check in #infra

@stitesExpensify
Copy link
Contributor

I found where we added that code, I reached out to @thienlnam to find out why

@melvin-bot melvin-bot bot added the Overdue label May 29, 2023
@stitesExpensify
Copy link
Contributor

So I talked to Jack and he thinks it's likely a restriction of the PDF server. I can try removing the code that does this, but if it doesn't work then I think we should just close the issue for now. It's not technically a bug, more of an inconvenience

@melvin-bot melvin-bot bot removed the Overdue label May 29, 2023
@stitesExpensify
Copy link
Contributor

Looks like this was changed on the front end as well so now the preview shows ___ too. I think we should close this as a feature request for now and come back to it when we focus more on internationalization. Thoughts @conorpendergrast ?

@conorpendergrast
Copy link
Contributor

Sounds good to me: not a bug, but a feature request to support a wider variety of alphabets 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering Internal Requires API changes or must be handled by Expensify staff
Projects
None yet
Development

No branches or pull requests

5 participants