User story
As a trap.nz app user, when adding a second new trap record shortly after saving a first one, I would like to be able to choose whether the second record entered should be in addition to the first, or to replace it.
Background
When using the trap.nz app, if you attempt to log a new trap record shortly after a previous one, a feature exists that prompts the user with the message “This installation has already been serviced today…”
As a user, the most common time I encounter this message is when I have realised that my first trap record was incomplete or inaccurate, and I am deliberately lodging a new record that is an improvement on the first. In this case, a much better outcome would be to allow me to choose “Replace” as one of the options, which would result in the previous trap record being deleted as well as the new record being saved.
Requirements
- When a user attempts to submit a new trap record that triggers the warning above, and the data that has triggered the message includes data has been submitted by the same user, modify the warning message as follows:
a) The description includes “Choosing REPLACE will delete your last record and save this new one instead”
b) “REPLACE” is an option on screen - If a user chooses “REPLACE”, their new record is saved and their last record is deleted
Acceptance criteria
When I see the “installation already serviced” warning, and I have not logged any data with my username in the warning period, the warning message is unchanged from the current one.
When I see the “installation already serviced” warning, and I have logged data with my username in the warning period, I see the modified warning message.
When I choose REPLACE on the modified warning message, my last trap log is deleted and the new one is created.
When I choose SAVE or CANCEL, the existing behaviour is unchanged.