Repository navigation
Description
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: 1.3.84.0
Reproducible in staging?: y
Reproducible in production?: y
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: @dhanashree-sawant
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1697192437355139
Action Performed:
Action Performed:
- Open the app
- Open any report which has distance request message in it or raise one and open that report
- Click on distance request message, it should open page with pay button in header
- Send any image in it
- Open the sent image in preview by clicking on it
- Click on previous arrow and observe that it displays map for sometime and after it displays Hmm its not here
Expected Result:
App should either not display map image in preview or display it without error
Actual Result:
App displays Hmm its not here on map image in attachment preview when accessing the image by navigating from another image
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
- Android: Native
- Android: mWeb Chrome
- iOS: Native
- iOS: mWeb Safari
- MacOS: Chrome / Safari
- MacOS: Desktop
Screenshots/Videos
Android: Native
Android.native.hmm.it.s.not.here.map.image.mp4
Android: mWeb Chrome
Android.chrome.hmm.it.s.not.here.map.imagr.mp4
iOS: Native
ios.native.hmm.its.not.here.map.page.mov
iOS: mWeb Safari
ios.safari.hmm.its.not.here.map.page.mov
MacOS: Chrome / Safari
windows.chrome.hmm.its.not.here.map.image.mp4
mac.chrome.hmm.its.not.here.map.image.mov
Recording.4988.mp4
MacOS: Desktop
mac.desktop.hmm.its.not.here.map.image.mov
Upwork Automation - Do Not Edit
- Upwork Job URL: https://www.upwork.com/jobs/~01fc9adefd366e0b5b
- Upwork Job ID: 1713200291476987904
- Last Price Increase: 2023-10-14
Activity
[-]Chat - Hmm its not here displayed on map image[/-][+][$500] Chat - Hmm its not here displayed on map image[/+]melvin-bot commentedon Oct 14, 2023
Triggered auto assignment to @miljakljajic (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.melvin-bot commentedon Oct 14, 2023
Job added to Upwork: https://www.upwork.com/jobs/~01fc9adefd366e0b5b
melvin-bot commentedon Oct 14, 2023
Bug0 Triage Checklist (Main S/O)
Platformsin OP are ✅)melvin-bot commentedon Oct 14, 2023
Triggered auto assignment to Contributor-plus team member for initial proposal review - @thesahindia (
External)abdel-h66 commentedon Oct 14, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
In an Expense report with a receipt, the map is considered as an Attachment and viewing it causes
Hmm its not hereto be shownWhat is the root cause of that problem?
The distance receipt attachment(or any receipt for that matter) is attached to its own chat report. But when viewing the attachments of the parent expense report, those receipts are considered part of it.
Coming from this check here
App/src/components/Attachments/AttachmentCarousel/extractAttachmentsFromReport.js
Line 48 in dc1ff84
This will return URLs that are of type
/receiptwhich are only accessible from the parent report.Exmaple:
Expense
report ID = 7912337812520815We get the following attachments
r/7912337812520815/attachment?source=/chat-attachments/3179016481252166829/w_10b395181b117114c949bf123f30187c010dab65.pngr/7912337812520815/attachment?source=/receipts/w_2d351cf5c9f1c61c66bf3780c4a68342bbeb1a3d.pngBut the receipt resource is only available from the context of actual chat report ID, which is
reportID=8768068978200431What changes do you think we should make in order to solve the problem?
We can enforce the above check by making sure we are the chat report is type of chat s follow
if (ReportActionsUtils.isMoneyRequestAction(action) && report.type === CONST.REPORT.TYPE.CHAT) {This will ignore all the receipts from being included as attachments in the expense reports. Then those receipts can be viewed separately, by clicking the chat report related to the money request.
What alternative solutions did you explore? (Optional)
If we want to make attachment or receipts accessible from other reports, we might need to introduce a new URL parameter that explicitly sets the
reportIDin the URL,let's take the above example again. in this case the
extractAttachmentsFromReportshould returnr/7912337812520815/attachment?source=/chat-attachments/3179016481252166829/w_10b395181b117114c949bf123f30187c010dab65.png&reportID=7912337812520815r/7912337812520815/attachment?source=/receipts/w_2d351cf5c9f1c61c66bf3780c4a68342bbeb1a3d.png&reportID=8768068978200431N/A
paultsimura commentedon Oct 16, 2023
It might be worth waiting for #28640 to be merged first. The Receipt + Attachments combinations are pretty unstable before that issue is resolved.
miljakljajic commentedon Oct 17, 2023
I think this is worth closing for now and then re-opening if it's still occurring when fix image receipt is merged.