reapit / foundations

Foundations platform mono repo
57 stars 21 forks source link

Savills Pre Tenancy (TP) APP - users unable to save/make any changes #11244

Closed NicolePerezSavills closed 1 week ago

NicolePerezSavills commented 2 weeks ago

Describe the bug When a user updates a check, it does not save. It unticks itself and/or changes other checks statueses

To Reproduce See attached video.

Expected behaviour When a user updates a check, it retains the selection.

Additional context This happens in all arranging tenancies, not any particular tenancy. Software Seni have been investigating, they have disabled the refetch data feature on SAV (prod) and this did not solve the issue.

There is also an ongoing Outlook/Reapit diary sync issue (Reapit timeouts) that could potentially be linked to this issue that occurred at roughly the same time.

This is over 48 hours now of users not being able to progress deals.

Uploading App unticks check when going back on app.mp4…

github-actions[bot] commented 2 weeks ago

Thank you for taking the time to report a bug. We prioritise bugs depending on the severity and implications, so please ensure that you have provided as much information as possible. If you haven’t already, it really helps us to investigate the bug you have reported if you provide ‘Steps to Replicate’ and any associated screenshots. Please ensure any personal information from the production database is obscured when submitting screenshots. This issue will be reviewed in our weekly refinement sessions and assigned to a specific project board. We may also update the ticket to request additional information, if required. For more information on our processes, please click here

plittlewood-rpt commented 2 weeks ago

Hi @NicolePerezSavills I can see a large number of PATCH requests to the tenancy checks endpoints returning a 412 Precondition Failed response. This suggests that the app is using the incorrect eTag value when issuing the PATCH. We'll need Software Seni involved to be able to accurately investigate this problem

abrahamseni commented 2 weeks ago

@plittlewood-rpt Could you please check the metadata entity? I think it was corrupted. Meaning that it randomly return empty metadata even we do have it exist.

Screenshot: left (saved response) right (newest response) Screenshot 2024-06-20 at 08 31 47

@NicolePerezSavills We log the change status history in the metadata, so when the response give us an empty metadata, the app think that this check has been updated by another user, so it patching back the status.

abrahamseni commented 2 weeks ago

Another screenshot:

Screenshot 2024-06-20 at 08 44 41

plittlewood-rpt commented 2 weeks ago

Hi @abrahamseni I've had a look in our logs and I can see two PATCH requests for that tenancy check in the last 2 days:

The first is at 2024-06-20T00:13:41.434Z and the second at 2024-06-20T01:30:20.729Z. The metadata object in the latest request looked like this:

"metadata": {
        "lettings": {
            "modifiedByUser_email": "",
            "modifiedByUser_name": "",
            "hasChangedByUser": false,
            "reasonForRejection": "",
            "changeHistory": []
        }
    }

This is what has been stored (empty strings don't get stored). I'm just having a look to see if I can discover why it isn't being returned.

abrahamseni commented 2 weeks ago

Hi @abrahamseni I've had a look in our logs and I can see two PATCH requests for that tenancy check in the last 2 days:

The first is at 2024-06-20T00:13:41.434Z and the second at 2024-06-20T01:30:20.729Z. The metadata object in the latest request looked like this:

"metadata": {
      "lettings": {
          "modifiedByUser_email": "",
          "modifiedByUser_name": "",
          "hasChangedByUser": false,
          "reasonForRejection": "",
          "changeHistory": []
      }
  }

This is what has been stored (empty strings don't get stored). I'm just having a look to see if I can discover why it isn't being returned.

@plittlewood-rpt the second patch is because the API returned an empty metadata, so the app thinks that the check status has been changed by another user so it patching it again with mostly empty data.

I am aware that ""/ null /undefined don't get stored.

NicolePerezSavills commented 2 weeks ago

@plittlewood-rpt Any update on this please?

plittlewood-rpt commented 2 weeks ago

HI @NicolePerezSavills we are investigating this at the moment

RWilcox-Reapit commented 2 weeks ago

Hi @NicolePerezSavills

A fix is currently being tested and will be going out soon. I'll keep you updated.

Thanks, Ryan

RWilcox-Reapit commented 2 weeks ago

Hi @NicolePerezSavills

This should be fixed now, I'll leave this ticket open until you confirm your end.

Thanks

NicolePerezSavills commented 2 weeks ago

@RWilcox-Reapit Looks like it's fixed now based on initial testing. Let's keep this ticket open until tomorrow for monitoring when majority of the business has had the chance to fully use the TP App.

Also, what caused this issue?

RWilcox-Reapit commented 2 weeks ago

Hi @NicolePerezSavills

We introduced a new feature to allow users to have token based paging #10990 That has some substantial performance benefits for users paging through data.

A bug was inadvertently introduced which incorrectly paged data in memory meaning some records were trimmed from the response.

Hope this helps, Ryan