Bug 36321 - Problem when dateexpiry in BorrowerUnwantedField
Summary: Problem when dateexpiry in BorrowerUnwantedField
Status: Pushed to oldstable
Alias: None
Product: Koha
Classification: Unclassified
Component: Patrons (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Fridolin Somers
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-03-14 15:33 UTC by Fridolin Somers
Modified: 2024-05-23 14:41 UTC (History)
4 users (show)

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


Attachments
Bug 36321: Problem when dateexpiry in BorrowerUnwantedField (1.84 KB, patch)
2024-03-14 15:43 UTC, Fridolin Somers
Details | Diff | Splinter Review
Bug 36321: Problem when dateexpiry in BorrowerUnwantedField (1.90 KB, patch)
2024-03-14 16:45 UTC, ByWater Sandboxes
Details | Diff | Splinter Review
Bug 36321: Problem when dateexpiry in BorrowerUnwantedField (1.95 KB, patch)
2024-03-20 22:07 UTC, Lucas Gass (lukeg)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Fridolin Somers 2024-03-14 15:33:50 UTC
When dateexpiry is in BorrowerUnwantedField it is hidden in patron edition form.
The problem is when editing an existing patron the value is re-computed with category settings, as if it where empty.
Comment 1 Fridolin Somers 2024-03-14 15:43:23 UTC
Created attachment 163137 [details] [review]
Bug 36321: Problem when dateexpiry in BorrowerUnwantedField

hen dateexpiry is in BorrowerUnwantedField it is hidden in patron edition form.
The problem is when editing an existing patron the value is re-computed with category settings, as if it where empty.

This comes from all fields in BorrowerUnwantedField beeing removed from %newdata in memberentry.pl.
Whe must skip dateexpiry.

Test plan :
1) Be sure dateexpiry is not in BorrowerUnwantedField
2) Define a patron category with enrollment period 12 month
3) Create a new patron in this category
4) Its expiration date is in now + 12 month
5) Edit the patron category to set enrollment period 6 month
6) Add dateexpiry in BorrowerUnwantedField
7) Edit the patron and save
=> Without patch the expiration date is changed to now + 6 month
=> With patch the exporation date is unchanged
Comment 2 ByWater Sandboxes 2024-03-14 16:45:13 UTC
Created attachment 163144 [details] [review]
Bug 36321: Problem when dateexpiry in BorrowerUnwantedField

hen dateexpiry is in BorrowerUnwantedField it is hidden in patron edition form.
The problem is when editing an existing patron the value is re-computed with category settings, as if it where empty.

This comes from all fields in BorrowerUnwantedField beeing removed from %newdata in memberentry.pl.
Whe must skip dateexpiry.

Test plan :
1) Be sure dateexpiry is not in BorrowerUnwantedField
2) Define a patron category with enrollment period 12 month
3) Create a new patron in this category
4) Its expiration date is in now + 12 month
5) Edit the patron category to set enrollment period 6 month
6) Add dateexpiry in BorrowerUnwantedField
7) Edit the patron and save
=> Without patch the expiration date is changed to now + 6 month
=> With patch the exporation date is unchanged

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Comment 3 Lucas Gass (lukeg) 2024-03-20 22:07:20 UTC
Created attachment 163580 [details] [review]
Bug 36321: Problem when dateexpiry in BorrowerUnwantedField

hen dateexpiry is in BorrowerUnwantedField it is hidden in patron edition form.
The problem is when editing an existing patron the value is re-computed with category settings, as if it where empty.

This comes from all fields in BorrowerUnwantedField beeing removed from %newdata in memberentry.pl.
Whe must skip dateexpiry.

Test plan :
1) Be sure dateexpiry is not in BorrowerUnwantedField
2) Define a patron category with enrollment period 12 month
3) Create a new patron in this category
4) Its expiration date is in now + 12 month
5) Edit the patron category to set enrollment period 6 month
6) Add dateexpiry in BorrowerUnwantedField
7) Edit the patron and save
=> Without patch the expiration date is changed to now + 6 month
=> With patch the exporation date is unchanged

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Comment 4 Katrin Fischer 2024-03-22 08:52:04 UTC
Please don't forget to tidy :)
Comment 5 Katrin Fischer 2024-03-22 09:37:32 UTC
Pushed for 24.05!

Well done everyone, thank you!
Comment 6 Fridolin Somers 2024-05-22 13:44:33 UTC
Pushed to 23.11.x for 23.11.06
Comment 7 Lucas Gass (lukeg) 2024-05-23 14:41:28 UTC
Backported to 23.05.x for upcoming 23.05.12