Open tiri39 opened 3 months ago
@SyedaAfrida assume this is nothing to do with being in a mobile so would happen on an offline desktop also. If so, I agree this is a Medium priority. Processing should be sequential so that 2nd record is flagged as a duplicate.
Pushed to 1.7 as this is too difficult to fix in time for v1.5 and is just a corner case where deduplication logic is not applied, so processing can still continue.
We have a situation where two similar declarations are created offline. When the internet connection is restored, the web app tries to push all these offline-created declarations to the server simultaneously. The server receives all these requests at once and does not have enough time to determine which declarations are duplicates. As a result, it fails to detect simultaneously created duplicate documents.
Pushing offline declarations one by one is not a viable solution, as it would take too long to create the offline declarations. We need a technical design discussion to address and solve this bug.
Bug description: If two same records are created offline and sent or approval, and then switched to online mode, the record leaves outbox without the duplicate warning toast "(tracking id) is a potential duplicate. Record is ready for review".
Steps to reproduce:
Actual result: Both the records are in the Sent for Approval workqueue.
Expected result: The second record should be in the Ready for Review workqueue and should have the duplicate icon.
Screenshot/Recording:
https://github.com/opencrvs/opencrvs-core/assets/113257751/ea1918b6-2162-496e-98ae-97433eb63120
Tested on: https://login.farajaland-qa.opencrvs.org/
Version: V1.5.0