| Summary: | "Default checkout, hold and return policy" cannot be unset | ||
|---|---|---|---|
| Product: | Koha | Reporter: | Katrin Fischer <katrin.fischer> |
| Component: | Circulation | Assignee: | Lucas Gass (lukeg) <lucas> |
| Status: | Signed Off --- | QA Contact: | Testopia <testopia> |
| Severity: | major | ||
| Priority: | P5 - low | CC: | andrew, aude.charillon, cbrannon, gmcharlt, holly, kyle, lucas, michael.adamyk, trevor.diamond |
| Version: | Main | ||
| Hardware: | All | ||
| OS: | All | ||
| GIT URL: | Initiative type: | --- | |
| Sponsorship status: | --- | Comma delimited list of Sponsors: | |
| Crowdfunding goal: | 0 | Patch complexity: | Trivial patch |
| Documentation contact: | Documentation submission: | ||
| Text to go in the release notes: | Version(s) released in: | ||
| Circulation function: | |||
| Bug Depends on: | 36447 | ||
| Bug Blocks: | |||
| Attachments: |
Bug 40205: data-categorycode should always be set to ALL
Bug 40205: data-categorycode should always be set to ALL |
||
|
Description
Katrin Fischer
2025-06-20 12:32:59 UTC
I can confirm this is not working. I had to change the rule to not set and save that to get around this. Still valid for 25.05 I'm thinking that because this section can't be unset, you always have to set something, even to not set. When we did our migration, we had to limit holds to within groups. We set the default rule, but because there was a rule that could not be unset in each branch, we had to set the same rule in every branch for the group holds to work. It seems that if this rule were unset, it should adhere to the default rule. Am I wrong? If not, then this is causing us to maintain more rules than necessary. I'm kicking this up to major importance as the ability to adjust circulation rules is pretty integral to most libraries. Can confirm it's an issue in 25.05.05 but not in main. When I ran into this in August, I found that this could not be unset until I deleted everything defined in the sections Checkout, hold policy by patron category Holds policies by item type So this might be a bug, but potentially there's a workaround for people until it gets fixed? This still exists in main, to recreate: 1. Add at least one rule to the default-circulation-rules table that contains a patron category. 2. Now add a "Default checkout, hold and return policy" rule. 3. Inspect the "Unset" button: <a href="#" class="delete-branch-cat btn btn-default btn-xs" data-categorycode="T" data-branch="*"><i class="fa fa-undo"></i> Unset</a> It is erroneously passing in categorycode from the default-circulation-rules, it needs to be set as *. (In reply to Lucas Gass (lukeg) from comment #6) > This still exists in main, to recreate: > > 1. Add at least one rule to the default-circulation-rules table that > contains a patron category. > 2. Now add a "Default checkout, hold and return policy" rule. > 3. Inspect the "Unset" button: > > <a href="#" class="delete-branch-cat btn btn-default btn-xs" > data-categorycode="T" data-branch="*"><i class="fa fa-undo"></i> Unset</a> > > It is erroneously passing in categorycode from the > default-circulation-rules, it needs to be set as *. As a workaround until this is patched, manually changing that categorycode to * in the inspector will allow the Unset button to work. Created attachment 189852 [details] [review] Bug 40205: data-categorycode should always be set to ALL To test: 1. Add at least one rule to the default-circulation-rules table that contains a patron category. 2. Now add a "Default checkout, hold and return policy" rule. 3. Inspect the "Unset" button: <a href="#" class="delete-branch-cat btn btn-default btn-xs" data-categorycode="T" data-branch="*"><i class="fa fa-undo"></i> Unset</a> 4. APPLY PATCH and clear browser cache 5. Try again, this time you should be able to delete the rule. For this particular rule I don't think the categorycode should ever be anything besides all/* Created attachment 189860 [details] [review] Bug 40205: data-categorycode should always be set to ALL To test: 1. Add at least one rule to the default-circulation-rules table that contains a patron category. 2. Now add a "Default checkout, hold and return policy" rule. 3. Inspect the "Unset" button: <a href="#" class="delete-branch-cat btn btn-default btn-xs" data-categorycode="T" data-branch="*"><i class="fa fa-undo"></i> Unset</a> 4. APPLY PATCH and clear browser cache 5. Try again, this time you should be able to delete the rule. Signed-off-by: Trevor Diamond <trevor.diamond@mainlib.org> Workaround until patch is pushed for those who don't want to deal with the inspector: - Click unset, confirm in dialog box - Note that the text on the left of the default policies still reads "defaults" - Click unset again, confirm again - Ok, now it works (Looks like the first unset clears the errant patron category, allowing the second unset to actually unset.) |