| Summary: | Patron suspensions calculated differently when items are returned through patron Details tab | ||
|---|---|---|---|
| Product: | Koha | Reporter: | Holly <hc> |
| Component: | Circulation | Assignee: | Bugs List <koha-bugs> |
| Status: | RESOLVED DUPLICATE | QA Contact: | Testopia <testopia> |
| Severity: | normal | ||
| Priority: | P5 - low | CC: | gmcharlt, jonathan.druart, kyle, nick |
| Version: | unspecified | ||
| Hardware: | All | ||
| OS: | All | ||
| See Also: | https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19814 | ||
| GIT URL: | Initiative type: | --- | |
| Sponsorship status: | --- | Crowdfunding goal: | 0 |
| Patch complexity: | --- | Documentation contact: | |
| Documentation submission: | Text to go in the release notes: | ||
| Version(s) released in: | Circulation function: | ||
| Bug Depends on: | 11703 | ||
| Bug Blocks: | |||
|
Description
Holly
2021-01-14 15:35:56 UTC
I don't recreate on master. If you are able to recreate the problem on a sandbox let me know the different steps to reproduce the issue and I will have a look. I recreated this on master. I checked out three items to a patron in the "Patron" category. Two of these items were item type "Books". One of these items was item type "Visual Materials". The circulation rules for "Patron" and "Books" were: Fine grace period: 1 Suspensions in days: 2 Max. suspension duration: 10 Suspension charging interval: 1 The circulation rules for "Patron" and "Visual Materials" were: Fine grace period: 1 Suspensions in days: 1 Max. suspension duration: 10 Suspension charging interval: 1 The system preference CumulativeRestrictionPeriods was set to "Cumulate". When I checked the three items out on 15/01/21, I backdated the due date on the three items to 13/01/21. When I checked the items in together, all at once on the Patron Details page, the patron was suspended until 01/19/2021. I then checked the items out again and backdated them to be due on 13/01/21 again. When I checked the items back in, one at a time, under Circulation, Checkin the patron was suspended until 01/20/2021. Right, I think I recreate it now. If I am understanding correctly what's going on we have a race condition. For instance if the 3rd checkin happens when the 1st (or 2nd) is not completed yet then it will create an other restriction, instead of cumulating over the 2 other restrictions as it should. The following change may fix the problem.
diff --git a/koha-tmpl/intranet-tmpl/prog/js/checkouts.js b/koha-tmpl/intranet-tmpl/prog/js/checkouts.js
index b5347c0bae..284b86c0ca 100644
--- a/koha-tmpl/intranet-tmpl/prog/js/checkouts.js
+++ b/koha-tmpl/intranet-tmpl/prog/js/checkouts.js
@@ -128,7 +128,9 @@ $(document).ready(function() {
$(id).replaceWith( content );
}, "json")
+ $.ajaxSetup({async: true});
});
|