Details

    • Type: Story
    • Status: Done
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 3.0
    • Component/s: Requisition, UI
    • Labels:
      None

      Description

      As an offline user, I want to be warned if my requisition data entry has a conflict when I re-connect to the network so that I can resolve any conflict and ensure my data is stored into OpenLMIS.

      A requisition that has been worked on offline will be considered void and overwritten by the server version, if the local version's `date_modified` timestamp no longer matches server version's `date_modified` timestamp. This functionality best reflects option C from the attached conflict handling document.

      To compare the date_modified timestamps, the requisition endpoint should be modified to check if the post data object contains a `date_modified` attribute. The behavior of the requisition endpoint should work like this:

      • if there is no `date_modified` timestamp in the post object the requisition object is updated
      • if there is a `date_modified` timestamp, and the timestamps match, the requisition object is updated
      • if there is a `date_modified` timestamp, and the timestamps don't match, the http request fails with a 409 status code and returns a message reading "The requisition has a newer version than what was posted"

      Acceptance Criteria

      • If an offline requisition is attempting to sync with the server version of the requisition, and the requisition `date_modified` timestamps of the don't match, THEN the offline requisition is removed from the browser and replaced by the server version.
      • When the server version replaces the offline version, an alert is shown to the user that reads "This requisition has a newer version on the server; the server version will be used, and you will need to remake your changes."
      • If the offline requisition's `date_modified` timestamp matches the server requisition's `date_modified` timestamp — then the offline requisition updates the server requisition

      NOTE: There is a second ticket to handle warning a user if they are going to overwrite another user's changes ( OLMIS-1657 Dead )

        Attachments

          Issue links

            Activity

              People

              • Assignee:
                lkwidzinska Lucyna Laska
                Reporter:
                christine.lenihan Christine Lenihan
              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 1 week Original Estimate - 1 week
                  1w
                  Remaining:
                  Time Spent - 4 days, 6 hours, 30 minutes Remaining Estimate - 2 hours, 30 minutes
                  2h 30m
                  Logged:
                  Time Spent - 4 days, 6 hours, 30 minutes Remaining Estimate - 2 hours, 30 minutes
                  4d 6h 30m