Bug 39369 - Button "generate discharge" should not validate again a validated discharge
Summary: Button "generate discharge" should not validate again a validated discharge
Status: Needs Signoff
Alias: None
Product: Koha
Classification: Unclassified
Component: Patrons (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low minor
Assignee: Baptiste Wojtkowski (bwoj)
QA Contact: Testopia
URL:
Keywords:
Depends on: 37344
Blocks:
  Show dependency treegraph
 
Reported: 2025-03-18 16:05 UTC by Baptiste Wojtkowski (bwoj)
Modified: 2025-03-18 16:18 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Bug 39369: Generating a discharge should not validate again a generated discharge (1.62 KB, patch)
2025-03-18 16:16 UTC, Baptiste Wojtkowski (bwoj)
Details | Diff | Splinter Review
Bug 39369: Generating a discharge should not validate again a generated discharge (1.62 KB, patch)
2025-03-18 16:18 UTC, Baptiste Wojtkowski (bwoj)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Baptiste Wojtkowski (bwoj) 2025-03-18 16:05:26 UTC
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.
Comment 1 Baptiste Wojtkowski (bwoj) 2025-03-18 16:16:06 UTC
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
Comment 2 Baptiste Wojtkowski (bwoj) 2025-03-18 16:18:49 UTC
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