Bug 25733 - Return claims attention can't be cleared
Summary: Return claims attention can't be cleared
Status: Signed Off
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Sam Lau
QA Contact: Testopia
URL:
Keywords:
Depends on: 14697
Blocks:
  Show dependency treegraph
 
Reported: 2020-06-12 18:50 UTC by Christopher Brannon
Modified: 2024-07-10 17:19 UTC (History)
7 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:


Attachments
Bug 25733: Add new system preference 'UnresolvedClaimReturnedWarningThreshold' (4.97 KB, patch)
2024-07-09 18:29 UTC, Sam Lau
Details | Diff | Splinter Review
Bug 25733: Add warning for unresolved claims (3.60 KB, patch)
2024-07-09 18:29 UTC, Sam Lau
Details | Diff | Splinter Review
Bug 25733: Unit tests (1.76 KB, patch)
2024-07-09 18:29 UTC, Sam Lau
Details | Diff | Splinter Review
Bug 25733: Add warning for unresolved claims (4.39 KB, patch)
2024-07-09 18:41 UTC, Sam Lau
Details | Diff | Splinter Review
Bug 25733: Add warning for unresolved claims (4.44 KB, patch)
2024-07-10 17:19 UTC, Eric Garcia
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Christopher Brannon 2020-06-12 18:50:27 UTC
The Attention notice on circulation.pl does not go down as claims are resolved, and there does not seem to be any way to reset this.  The message won't even go away if you turn off the feature.  This is very buggy.

We need to have a way to remove a mistaken claim.

We need to have a way to determine if certain types of resolutions count or don't count.

This message should go away if claims returned is disabled.
Comment 1 Andrew Fuerste-Henry 2020-06-12 19:50:28 UTC
That Attention note is a count of total lifetime claims. It will display as long as the count of claims is above the ClaimReturnedWarningThreshold value.

I can use some use for a choice in whether or not this counts resolved claims. I've spoken to libraries who would argue either side, so I don't think we can settle on one definitive "correct" behavior here.
Comment 2 Christopher Brannon 2020-06-12 21:06:19 UTC
I guess part of the problem is my lack of understanding of what a "warning" should be.  I thought the threshold limit would actually put up a warning box.  I guess it kind of makes sense.  I would also think that there would be an option somewhere to block checkout if the threshold was met.  Maybe another feature soon?

Anyway, now I understand.  Thanks for clarifying this feature.

Yes, an option to determine what counts and what doesn't would be a wise addition.
Comment 3 Daniel Gaghan 2020-06-18 22:37:03 UTC
Nuts, I was hoping that the claims returned threshold was for active claims... I guess we will need to delete them then after a few months.
Comment 4 Christopher Brannon 2020-06-18 22:51:21 UTC
I did discover you can delete a claim.  That little action doesn't show up in the action button until the claim is resolved.  So, that is something.  But you have to delete it altogether.  Some folks might not like that.
Comment 5 Andrew Fuerste-Henry 2020-06-19 14:17:58 UTC
So maybe a system preference that determines whether or not resolved claims get counted toward that threshold?

By the way, bug 25429 adds a function to cleanup_database to make resolved claims automatically delete after a number of days, which could help out somewhat here.
Comment 6 Katrin Fischer 2020-06-22 21:31:30 UTC
If we add another pref, maybe we should make one for warning about active claims? That way we could have different limits for total and active and if only the active are to be counted the pref for resolved could be left empty. (hope that makes sense)
Comment 7 Christopher Brannon 2020-06-26 17:01:43 UTC
Ideally, I could see the following to be a benefit:
* Preference about the warning behavior
  - Should it show in the warning panel or a banner
  - Should claims show counts for claims, or total claims and claims unresolved
  - Should total claims have resolved claims that don't count towards total claims
  - Should it block or not
    -- Should it block on total claims or claims unresolved
  - Should resolved claims have a moratorium - should they count against the patron for a set length of time or indefinitely
Comment 8 Rebecca Coert 2020-07-01 20:38:26 UTC
(In reply to Katrin Fischer from comment #6)
> If we add another pref, maybe we should make one for warning about active
> claims? That way we could have different limits for total and active and if
> only the active are to be counted the pref for resolved could be left empty.
> (hope that makes sense)

I agree.  There should be a differentiation between the active vs. total claims.
Comment 9 Sam Lau 2024-07-09 18:29:18 UTC
Created attachment 168678 [details] [review]
Bug 25733: Add new system preference 'UnresolvedClaimReturnedWarningThreshold'
Comment 10 Sam Lau 2024-07-09 18:29:21 UTC Comment hidden (obsolete)
Comment 11 Sam Lau 2024-07-09 18:29:23 UTC
Created attachment 168680 [details] [review]
Bug 25733: Unit tests

prove t/db_dependent/Circulation/ReturnClaims.t
Comment 12 Sam Lau 2024-07-09 18:41:16 UTC
Created attachment 168681 [details] [review]
Bug 25733: Add warning for unresolved claims

These patches add a new warning for unresolved claims that are larger than the number set by the new 'UnresolvedClaimReturnedWarningThreshold' system preference.

To test:
1) Apply patch, updatedatabase, restart_all
2) In Administration->system preferences, search for 'UnresolvedClaimReturnedWarningThreshold' and set this to '1'
3) Now search for 'ClaimReturnedLostValue' and set this to 'Lost'
4) Checkout some items for a patron
5) On the patron's checkout page, claim both these items as returned.
6) In the attention box, you should now see a 'Unresolved return claims: Patron has 2 unresolved RETURN CLAIMS'.
7) Visit patron details page, ensure the attention and message show up there as well.
8) Resolve one of these claims. Note that the message should disappear, as we set the sys pref to '1'.
Comment 13 Eric Garcia 2024-07-10 17:19:26 UTC
Created attachment 168759 [details] [review]
Bug 25733: Add warning for unresolved claims

These patches add a new warning for unresolved claims that are larger than the number set by the new 'UnresolvedClaimReturnedWarningThreshold' system preference.

To test:
1) Apply patch, updatedatabase, restart_all
2) In Administration->system preferences, search for 'UnresolvedClaimReturnedWarningThreshold' and set this to '1'
3) Now search for 'ClaimReturnedLostValue' and set this to 'Lost'
4) Checkout some items for a patron
5) On the patron's checkout page, claim both these items as returned.
6) In the attention box, you should now see a 'Unresolved return claims: Patron has 2 unresolved RETURN CLAIMS'.
7) Visit patron details page, ensure the attention and message show up there as well.
8) Resolve one of these claims. Note that the message should disappear, as we set the sys pref to '1'.

Signed-off-by: Eric Garcia <cubingguy714@gmail.com>