-
Notifications
You must be signed in to change notification settings - Fork 3k
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 2022-09-16] [$250] The file extension shows up twice in the file name reported by @Tushu17 #10579
Comments
Triggered auto assignment to @sonialiap ( |
Hi, I have been able to reproduce this and fix it successfully. |
ProposalThere are two extensions because we aren't removing the extension from file name and we are adding the extension here too App/src/components/AttachmentModal.js Line 241 in d5b1c82
The above proposal doesn't work great when a file name has periods in it. It will take the text before the period so the file name will be incomplete. |
@sonialiap Whoops! This issue is 2 days overdue. Let's get this updated quick! |
Triggered auto assignment to @johnmlee101 ( |
Opening for external, seems like a very easy fix based off of the two proposals already |
Triggered auto assignment to @arielgreen ( |
I believe when Puneet is suggesting here might be an extension to this issue and could be a new ticket. However, my proposal above completely fixes the actual issue here which is that the extension are being repeated twice. |
It's not an extension, your proposal fixes the issue but breaks the file name when there are periods in it, if a solution breaks something then it's not a good solution |
Proposal App/src/components/AttachmentModal.js Lines 115 to 120 in 479ca44
Solution: As fileExtension is already popped from splitFileName , we can join splitFileName with '.' to get fileName without extension.
splitExtensionFromFileName(fullFileName) {
const fileName = fullFileName.trim();
const splitFileName = fileName.split('.');
const fileExtension = splitFileName.pop();
- return {fileName, fileExtension};
+ return {fileName: splitFileName.join('.'), fileExtension};
} |
ProposalIn We should return this instead - I think this code more readable. App/src/components/AttachmentModal.js Lines 115 to 120 in 479ca44
|
Triggered auto assignment to Contributor-plus team member for initial proposal review - @parasharrajat ( |
Triggered auto assignment to @Luke9389 ( |
Regression caused by #10118. @sobitneupane 's proposal looks good to me. cc: @Luke9389 🎀 👀 🎀 C+ reviewed |
I agree that we should go with @sobitneupane's proposal. Go ahead and create a PR @sobitneupane. @Puneet-here your proposal would work, but I like that @sobitneupane's fixes the problem at the source (the @theTrozen77 & @Puneet-here, please try to refrain from openly criticizing each others' proposals. If a proposal is chosen and you disagree with the result, that's the time to talk about the flaws you see. |
Cool, will remember next time. |
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.1.98-1 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 2022-09-16. 🎊 |
@sobitneupane @Tushu17 @parasharrajat Please check your Upwork inboxes! |
just waiting on payment to close this out melvin. |
@parasharrajat, @arielgreen, @Luke9389 Whoops! This issue is 2 days overdue. Let's get this updated quick! |
Bump @arielgreen, this is awaiting payment for a long time. Can we please remove the |
thanks @parasharrajat resent |
Paid. |
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:
Expected Result:
Extension shouldn't get repeated.
Actual Result:
It shows up twice.
Workaround:
Unknown
Platform:
Where is this issue occurring?
Version Number: 1.1.91-0
Reproducible in staging?: Y
Reproducible in production?: Y
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos:
Expensify/Expensify Issue URL:
Issue reported by: @Tushu17
Slack conversation:
View all open jobs on GitHub
The text was updated successfully, but these errors were encountered: