Expensify / App

Welcome to New Expensify: a complete re-imagination of financial collaboration, centered around chat. Help us build the next generation of Expensify by sharing feedback and contributing to the code.
https://new.expensify.com
MIT License
3.51k stars 2.86k forks source link

[$250] Send invoice - System message for invoice edit is missing "Reply in thread" for invoice sender #43797

Closed lanitochka17 closed 1 month ago

lanitochka17 commented 4 months ago

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.4.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: N/A Issue reported by: Applause - Internal Team

Action Performed:

  1. Go to staging.new.expensify.com
  2. Go to FAB > Send invoice
  3. Send invoice to User B
  4. Go to transaction thread
  5. Edit Amount
  6. [User A and User B] Right click on the system message
  7. Note that "Reply in thread" is missing for invoice sender but present for invoice receiver
  8. [User B] Send a reply to the system message
  9. [User A] Open the reply in thread
  10. {User A] Click on the thread header subtitle
  11. {User A] Click on the thread header subtitle again

Expected Result:

In Step 7, "Reply in thread" should be available for both invoice sender and receiver In Step 10, the invoice thread should have no visual issue In Step 11, user should be navigated to the main chat

Actual Result:

In Step 7, "Reply in thread" is missing for invoice sender but present for invoice receiver In Step 10, the invoice details appear broken above existing invoice details In Step 11, user is navigated to the same invoice thread instead of the main chat

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Add any screenshot/video evidence

https://github.com/Expensify/App/assets/78819774/650bc6bb-7e6a-401d-91ae-12d5bfbb759c

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0111ac375ebfe2baa1
  • Upwork Job ID: 1803175554822916116
  • Last Price Increase: 2024-08-08
  • Automatic offers:
    • rayane-djouah | Reviewer | 103213577
    • truph01 | Contributor | 103213579
Issue OwnerCurrent Issue Owner: @dylanexpensify
truph01 commented 3 months ago

Also, I found out another bug: The OpenReport API return 2 created action in invoice room

rayane-djouah commented 3 months ago

@cristipaval - Could you please provide us with the exact names of the parameters that you added to the endpoint?

cristipaval commented 3 months ago

@cristipaval - Could you please provide us with the exact names of the parameters that you added to the endpoint?

Screenshot 2024-07-29 at 15 16 14
rayane-djouah commented 3 months ago

Okay, thanks! We need to add createdIOUReportActionID and createdReportActionIDForThread to the frontend (cc @truph01)

truph01 commented 3 months ago

Also, I found out another bug: The OpenReport API return 2 created action in invoice room

@cristipaval Have you checked this bug?

FYI, it leads to the behavior:

image

truph01 commented 3 months ago

Also, the step 11:

In Step 11, user is navigated to the same invoice thread instead of the main chat

I believe this is expected behavior. We have previously closed similar issues related to the one transaction report flow. Since the system message thread is a child of the transaction thread report, clicking on the subtitle header in step 11 should navigate to the transaction thread report.

truph01 commented 3 months ago

Bump @cristipaval about my comment above

cristipaval commented 3 months ago

I haven't yet, but I'm getting closer to wrapping up my other projects and then jump again into Invoicing stuff

truph01 commented 2 months ago

@cristipaval Do you have any update on it?

melvin-bot[bot] commented 2 months ago

@cristipaval, @dylanexpensify, @rayane-djouah, @truph01 Eep! 4 days overdue now. Issues have feelings too...

cristipaval commented 2 months ago

I'll investigate this one later today

melvin-bot[bot] commented 2 months ago

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

cristipaval commented 2 months ago

Also, I found out another bug: The OpenReport API return 2 created action in invoice room

@cristipaval Have you checked this bug?

@truph01, I think you get 2 CREATED report actions when you click a preview of an invoice from the invoice room, correct? It is the expected behavior. It happens the same when you open an expense report with a single expense on it. Because the invoice has 1 transaction on it, the user is navigated straight to the transaction thread and the OpenReport API command returns the report actions of both the invoice report and the transaction thread report.

rayane-djouah commented 2 months ago

@truph01 - Friendly reminder 😄

truph01 commented 2 months ago

@cristipaval I checked and saw that for exepnse report when it only has one transaction, BE still returns only one CREATED action. About the report actions in combine report, we will merge the actions from the money request report and transaction thread report here

cristipaval commented 2 months ago

Ok, I haven't found any backend logic to return only one CREATED action when merging the actions from the expense report and transaction thread. I'll investigate again today.

truph01 commented 2 months ago

@cristipaval Do you have any updates on this?

cristipaval commented 2 months ago

I investigated and I don't see code in the backend to filter out any CREATED action. I also tested with the App and verified that when you open an expense report with only one transaction, you get the CREATED action for both the expense report and the transaction thread report as well. cc @NikkiWines as I know you worked on merging the transaction thread with the expense report.

NikkiWines commented 2 months ago

Hmm, yeah all the filtering done for the oneTransactionReport view is done in the front-end afaik

cristipaval commented 2 months ago

Thanks @NikkiWines! So @truph01, let me know if you need anything else from the backend in order to move with the implementation for this issue.

truph01 commented 2 months ago

@cristipaval

image

image

cristipaval commented 2 months ago

You are talking about the invoice room, but you are showing screenshots of the invoice report. Now I understand the issue. There are 2 CREATED report actions for the invoice report PLUS the one that belongs to the transaction thread. I could reproduce.

Pushing a fix asap.

For your clarity:

truph01 commented 2 months ago

@cristipaval Thanks for your information.

cristipaval commented 2 months ago

Thanks for bearing with me! I'll let you know when the backend is ready

cristipaval commented 2 months ago

Also, could you please give me a list of the IDs of the invoice reports that you created with 2 CREATED actions? I would run a query to remove the duplicates.

truph01 commented 2 months ago

@cristipaval The invoice report ID with 2 CREATED actions is 7477380290328742

cristipaval commented 2 months ago

Adding @madmax330 to this issue to keep him in the loop, as I might disappear on parental leave anytime soon

cristipaval commented 2 months ago

TLDR:

cristipaval commented 2 months ago

We are waiting for the Auth PR to be deployed.

cristipaval commented 2 months ago

@truph01, the backend is ready. Just to let you know, this is fixed for the new invoice rooms. The old ones with 2 CREATED report actions still need to be cleaned up.

truph01 commented 2 months ago
  1. Click on report preview to open the invoice report. Observe that there are 2 CREATED report actions in here. (Bug)

  2. Go to Troubleshoot > Clear cache and restart.

  3. Open the invoice report again. Observer that there is 1 CREATED report actions in here.

image

rayane-djouah commented 2 months ago

@truph01 - Could you please push the latest changes in the draft PR to make debugging easier

truph01 commented 2 months ago

@rayane-djouah I push the latest changes in the draft PR.

Also, I updated comment to include my suggestion changes.

rayane-djouah commented 2 months ago

@truph01 - I see in the draft PR that you're not sending createdIOUReportActionID and createdReportActionIDForThread correctly to the BE according to https://github.com/Expensify/App/issues/43797#issuecomment-2255774662 https://github.com/Expensify/App/issues/43797#issuecomment-2256610204

truph01 commented 2 months ago

@rayane-djouah Ah, my bad. Beside createdIOUReportActionID and createdReportActionIDForThread, I need to send reportActionID to BE as well. I pushed the code changes and now it works well. PR is ready to review.

@cristipaval Plz ignore my comment above.

rayane-djouah commented 2 months ago

PR is merged

cristipaval commented 2 months ago

Waiting for the PR to get deployed.

rayane-djouah commented 2 months ago

@cristipaval - Reminder that the old reports with 2 CREATED report actions still need to be cleaned up. Are you tracking this internally?

dylanexpensify commented 2 months ago

Bump @cristipaval 🙇‍♂️

cristipaval commented 2 months ago

@cristipaval - Reminder that the old reports with 2 CREATED report actions still need to be cleaned up. Are you tracking this internally?

I don't think it makes sense to spend time on cleaning that as we don't have active users using the invoice rooms yet.

@madmax330, do you think we should run some custom queries to clean the DB, or should we deal with it if it becomes a real problem?

rayane-djouah commented 2 months ago

⚠️ We just got confirmation on Slack that the Deploy Checklist: New Expensify 2024-08-26 which includes the PR of this issue was only deployed to production in Deploy Checklist: New Expensify 2024-08-28. More context on why this happened can be found in this Slack thread and this Slack comment.

Given the context above, this issue should be on [HOLD for Payment 2024-09-6] according to today's production deploy from Deploy Checklist: New Expensify 2024-08-28.

cc @dylanexpensify

madmax330 commented 1 month ago

do you think we should run some custom queries to clean the DB, or should we deal with it if it becomes a real problem?

@cristipaval are they real users or test users? Let's clean them up anyway so we don't spend time looking into it later?

rayane-djouah commented 1 month ago

@madmax330 - It looks like @cristipaval is on parental leave, could you please create an internal issue for this? Thanks!

melvin-bot[bot] commented 1 month ago

@madmax330, @cristipaval, @dylanexpensify, @rayane-djouah, @truph01 Eep! 4 days overdue now. Issues have feelings too...

dylanexpensify commented 1 month ago

@madmax330 shall we get a new engineer on this? Or are you on it?

madmax330 commented 1 month ago

@dylanexpensify actually I think we can just close this out since it was fixed already and the 2 report actions don't cause much of a problem

rayane-djouah commented 1 month ago

@dylanexpensify This is due payment - https://github.com/Expensify/App/issues/43797#issuecomment-2322826669 Thanks!

madmax330 commented 1 month ago

Cool is there a payment summary already?

melvin-bot[bot] commented 1 month ago

@madmax330, @cristipaval, @dylanexpensify, @rayane-djouah, @truph01 Huh... This is 4 days overdue. Who can take care of this?

dylanexpensify commented 1 month ago

Payment summary:

Contributor: @truph01 $250 Contributor+: @rayane-djouah $250

Please apply/request!