The button generate discharge fetches all the discharges and puts a validation date to the most recent, regardless its state. This makes no sense in particular if there are more than one discharges.
Created attachment 179462 [details] [review] Bug 39369: Generating a discharge should not validate again a generated discharge Test plan: 1 - Apply Bug 37344 2 - Go on discharge.pl, click on "generate discharge" 3 - Drink a coffee (or do something during 1 min) 4 - Click again on the button - notice the date has changed 5 - Cancel the discharge 6 - Click again on the button - notice the cancelled discharge has been updated 7 - Apply patch 8 - Repeat 2 to 6 with following changes: 4 - Notice you simply print again the discharge 5 - Notice you create a new discharge 3 - If your tolerance to caffein is low, drink something else than coffee
Created attachment 179463 [details] [review] Bug 39369: Generating a discharge should not validate again a generated discharge Test plan: 1 - Apply Bug 37344 2 - Go on discharge.pl, click on "generate discharge" 3 - Drink a coffee (or do something during 1 min) 4 - Click again on the button - notice the date has changed 5 - Cancel the discharge 6 - Click again on the button - notice the cancelled discharge has been updated 7 - Apply patch 8 - Repeat 2 to 6 with following changes: 4 - Notice you simply print again the discharge 6 - Notice you create a new discharge 3 - If your tolerance to caffein is low, drink something else than coffee