Bug 26258 - Circulation tabs inconsistent with counters
Summary: Circulation tabs inconsistent with counters
Status: ASSIGNED
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Owen Leonard
QA Contact: Martin Renvoize (ashimema)
URL:
Keywords: rel_24_05_candidate
: 26264 (view as bug list)
Depends on:
Blocks: 24097
  Show dependency treegraph
 
Reported: 2020-08-19 20:57 UTC by Christopher Brannon
Modified: 2024-10-18 07:00 UTC (History)
4 users (show)

See Also:
Change sponsored?: Sponsored
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
This enhancement changes the markup, style, and behaviour of counters which are displayed on a patron's check out and details tabs: 1. A new style: the counter background has a light blue square with rounded corners 2. The claims tab: . The order of the counters is now Unresolved claims / Resolved claims . The background colour for the counter changes to orange when the value set in ClaimReturnedWarningThreshold is reached 3. The restrictions tab: the counter background color is red 4. The clubs tab: now only shows the number of clubs a patron is enrolled in (the count of available clubs is removed)
Version(s) released in:
Circulation function:


Attachments
Inconsistencies in tabs (8.61 KB, image/png)
2020-08-19 20:59 UTC, Christopher Brannon
Details
Updated inconsistencies (9.11 KB, image/png)
2020-08-21 07:41 UTC, Martin Renvoize (ashimema)
Details
An idea for updated tab styles (70.46 KB, image/png)
2023-07-19 16:54 UTC, Owen Leonard
Details
Bug 26258: Circulation tabs inconsistent with counters (41.85 KB, patch)
2024-05-03 14:59 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 26258: Circulation tabs inconsistent with counters (41.90 KB, patch)
2024-05-03 21:49 UTC, David Nind
Details | Diff | Splinter Review
Screenshots - Patron check out and details tabs (before and after) (75.31 KB, application/pdf)
2024-05-03 22:12 UTC, David Nind
Details
Bug 26258: Circulation tabs inconsistent with counters (41.98 KB, patch)
2024-05-07 06:22 UTC, Martin Renvoize (ashimema)
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-08-19 20:57:48 UTC
The circulation tabs on circulation.pl and moremember.pl are inconsistent between each other and the two pages.

Clubs should have counters in front of the name like the other tabs.

Restrictions does not have a counter on the circulation.pl page, but it does on the moremember.pl page.

Restrictions should be Restriction(s) on both pages.
Comment 1 Christopher Brannon 2020-08-19 20:58:47 UTC
And club counts should not be in parenthesis.
Comment 2 Christopher Brannon 2020-08-19 20:59:42 UTC
Created attachment 108694 [details]
Inconsistencies in tabs
Comment 3 George Williams (NEKLS) 2020-08-20 14:03:57 UTC
I agree.  Consistency would be nice.
Comment 4 Martin Renvoize (ashimema) 2020-08-21 07:40:50 UTC
*** Bug 26264 has been marked as a duplicate of this bug. ***
Comment 5 Martin Renvoize (ashimema) 2020-08-21 07:41:28 UTC
Created attachment 108779 [details]
Updated inconsistencies
Comment 6 Martin Renvoize (ashimema) 2020-08-21 07:50:56 UTC
After some discussion on IRC we all believed it would be best to move towards using the styling from the new 'Claims' tab consistently on all the tabs here.

i.e. Tab name followed by label span. (With the label span being colour reactive if there is a state to convey)
Comment 7 Owen Leonard 2020-08-21 18:36:22 UTC
I think it's worth reconsidering whether  claims and clubs really need to show the "inactive" count. Why should we need to know the number of clubs available? Why should we know how many inactive claims there are?
Comment 8 Katrin Fischer 2020-08-21 18:49:30 UTC
(In reply to Owen Leonard from comment #7)
> I think it's worth reconsidering whether  claims and clubs really need to
> show the "inactive" count. Why should we need to know the number of clubs
> available? Why should we know how many inactive claims there are?

+1
Comment 9 Owen Leonard 2020-08-21 19:49:32 UTC
We could have grammatically-correct labels using the techniques added by Bug 15395, and could unify the different labels by showing a count of only unresolved claims and only enrolled clubs.

https://zivotdesign.com/p/#1/15980387474009
Comment 10 Christopher Brannon 2020-08-21 20:23:34 UTC
I agree on the clubs.  I could go either way on the claims.  I would think that staff would care about how many claims altogether AND how many are unresolved.

Other than that, I think it is a great idea.  I think the first letter should be all caps, even though the number is first.  It just looks unfinished otherwise.  It bugs me.
Comment 11 Katrin Fischer 2020-08-21 20:41:19 UTC
I like it, especially the idea for making it work for singular/plural and getting rid of the (s).
Comment 12 Martin Renvoize (ashimema) 2023-07-17 11:13:06 UTC
How's this looking now with the staff client refresh?
Comment 13 Christopher Brannon 2023-07-17 17:20:18 UTC
At least on our test server, the claims counts are displayed differently than the other counters.  They are incorporating labels that the others do not.

They are at least consistent now.  I agree with Owen that I don't think it is necessary to know how many clubs are available, just how many they are signed up for.  I could still go either way on having both numbers on the inactive claims.  Maybe just have the number of claims, and if something needs attention, change the color?

I think if we are going to move towards using labels, all the counters should be in labels, and we should do away with the parenthesis.  It seems overkill.  One or the other.  Labels look better and provide more functionality.
Comment 14 Owen Leonard 2023-07-19 16:54:47 UTC
Created attachment 153679 [details]
An idea for updated tab styles
Comment 15 Christopher Brannon 2023-07-19 21:55:21 UTC
(In reply to Owen Leonard from comment #14)
> Created attachment 153679 [details]
> An idea for updated tab styles

I think that looks great!  Should the dual counters be in the same label?  Maybe you want problematic counts to be red or something that stands in contrast to the good numbers?  Does that make sense?
Comment 16 Katrin Fischer 2023-09-22 20:03:28 UTC
(In reply to Owen Leonard from comment #14)
> Created attachment 153679 [details]
> An idea for updated tab styles

+1
Comment 17 Martin Renvoize (ashimema) 2023-09-22 21:46:41 UTC
I'd love to see this submitted ﷐[U+1F642]﷑
Comment 18 Martin Renvoize (ashimema) 2024-05-02 18:39:51 UTC
It went to assigned... That's got me excited ﷐[U+1F60A]﷑
Comment 19 Christopher Brannon 2024-05-02 18:46:06 UTC
Exciting times.  :)

Open, I like your concept.  I still think we should do away with the total number of clubs.  It is arbitrary.  Not all clubs apply to all patrons.  It isn't really useful in this scenario.
Comment 20 Owen Leonard 2024-05-03 14:59:16 UTC
Created attachment 166147 [details] [review]
Bug 26258: Circulation tabs inconsistent with counters

This patch makes changes to the markup, style, and behaviour of counters
which are displayed on the patron's account tabs: Checkouts, Holds, etc.
Tabs which contain a count which might change based on a user's actions
will keep up to date, e.g. changing claims status, enrolling in clubs,
etc.

To test, apply the patch and enable features if necessary: recalls,
article requests, claims, clubs, and patron lists. Test both from the
checkout page and the patron detail page:

Recalls:

- If necessary, check out some items to patrons so that there are titles
  which can be recalled.
- Log in to the OPAC and place one or more recalls.
- Return to the staff interface and view the "Recalls" tab on the
  patron's account.
- Click Actions -> Cancel for one of the recalls. The recall should be
  marked "Cancelled" and the count on the tab should update.

Return claims:

- If necessary, check out some items to a patron. Click the "Claim
  returned" button on a few of the patron's checkouts.
- As you add claims, the "Claims" tab should update the count of claims.

  *** NOTE: This changes the display of claims in the tab so that the
      count of unresolved claims appears first: "Unresolved / Resolved".
      I think it makes more sense for the first number to be the one
      which shows the number of "active" issues.

- Open the Claims tab. Click Actions->Resolve on one or more claims,
  confirming that the resolved claim is hidden and the tab numbers
  update.
- Test setting the ClaimReturnedWarningThreshold system preference to
  various values: e.g. empty, 1, 5.
  - If the pref is empty, OR if the pref is set to a number higher
    than the number of patron claims, the count of claims should be
    styled with the "info" blue background and the count of resolved
    claims is not shown.

    *** NOTE: Hiding the resolved claims seems logical if there is not a
        concern about the total number of claims.

  - If the number of all claims exceeds the value of the preference,
    the tab should show a count of "Unresolved claims / Resolved claims"
    with the yellow warning style.

Restrictions:

- Adding a restriction to the account should cause a counter with a
  red background to appear on the tab.

Clubs:

- If necessary, create at least one club template and then multiple
  clubs.
- From the "Clubs" tab on the patron's account, try enrolling and
  cancelling enrollments to confirm that the count on the tab updates
  correctly.

  *** NOTE: I have removed the count of available clubs because I think
      it's not relevant to this interface. We don't do it with patron
      lists, so this makes it a little more consistent..

Patron lists:

- If necessary, create two ore more patron lists.
- From the "Patron lists" tab, try adding and removing the patron from
  lists. The tab counter should update correctly.

Sponsored-by: Athens County Public Libraries
Comment 21 David Nind 2024-05-03 21:49:54 UTC
Created attachment 166159 [details] [review]
Bug 26258: Circulation tabs inconsistent with counters

This patch makes changes to the markup, style, and behaviour of counters
which are displayed on the patron's account tabs: Checkouts, Holds, etc.
Tabs which contain a count which might change based on a user's actions
will keep up to date, e.g. changing claims status, enrolling in clubs,
etc.

To test, apply the patch and enable features if necessary: recalls,
article requests, claims, clubs, and patron lists. Test both from the
checkout page and the patron detail page:

Recalls:

- If necessary, check out some items to patrons so that there are titles
  which can be recalled.
- Log in to the OPAC and place one or more recalls.
- Return to the staff interface and view the "Recalls" tab on the
  patron's account.
- Click Actions -> Cancel for one of the recalls. The recall should be
  marked "Cancelled" and the count on the tab should update.

Return claims:

- If necessary, check out some items to a patron. Click the "Claim
  returned" button on a few of the patron's checkouts.
- As you add claims, the "Claims" tab should update the count of claims.

  *** NOTE: This changes the display of claims in the tab so that the
      count of unresolved claims appears first: "Unresolved / Resolved".
      I think it makes more sense for the first number to be the one
      which shows the number of "active" issues.

- Open the Claims tab. Click Actions->Resolve on one or more claims,
  confirming that the resolved claim is hidden and the tab numbers
  update.
- Test setting the ClaimReturnedWarningThreshold system preference to
  various values: e.g. empty, 1, 5.
  - If the pref is empty, OR if the pref is set to a number higher
    than the number of patron claims, the count of claims should be
    styled with the "info" blue background and the count of resolved
    claims is not shown.

    *** NOTE: Hiding the resolved claims seems logical if there is not a
        concern about the total number of claims.

  - If the number of all claims exceeds the value of the preference,
    the tab should show a count of "Unresolved claims / Resolved claims"
    with the yellow warning style.

Restrictions:

- Adding a restriction to the account should cause a counter with a
  red background to appear on the tab.

Clubs:

- If necessary, create at least one club template and then multiple
  clubs.
- From the "Clubs" tab on the patron's account, try enrolling and
  cancelling enrollments to confirm that the count on the tab updates
  correctly.

  *** NOTE: I have removed the count of available clubs because I think
      it's not relevant to this interface. We don't do it with patron
      lists, so this makes it a little more consistent..

Patron lists:

- If necessary, create two ore more patron lists.
- From the "Patron lists" tab, try adding and removing the patron from
  lists. The tab counter should update correctly.

Sponsored-by: Athens County Public Libraries
Signed-off-by: David Nind <david@davidnind.com>
Comment 22 David Nind 2024-05-03 22:03:41 UTC
I'll attach some before and after screenshots.

My testing notes (using KTD):

1. Recalls
   - Enable system preference
   - Set some rules:
     . Recalls allowed (total): 5
     . Recalls per record (count): 5
     . On shelf recalls allowed: Recall due date interval (day)
     . Recall overdue fine amount: 5
     . Recall pickup period (day): 5
   - Checkout some items to Patron A
   - Log in as Patron B (set username/password by editing the patron details)
   - Make a recall for Patron B for one of the items checked out by Patron A

2. Returns claimed:
   - Select a value for ClaimReturnedLostValue for the claim lost action button to appear under a patron's checkouts: I used Lost
   - Set a value for ClaimReturnedWarningThreshold: 2
   - Check out some items to the patron
   - Make 3 claims
   - Resolve one claim: Claims tab > Actions > Resolve
Comment 23 David Nind 2024-05-03 22:12:23 UTC
Created attachment 166160 [details]
Screenshots - Patron check out and details tabs (before and after)

Screenshots of a patron's check out and details tabs, before and after the patch.
Comment 24 Martin Renvoize (ashimema) 2024-05-07 06:22:44 UTC
Created attachment 166239 [details] [review]
Bug 26258: Circulation tabs inconsistent with counters

This patch makes changes to the markup, style, and behaviour of counters
which are displayed on the patron's account tabs: Checkouts, Holds, etc.
Tabs which contain a count which might change based on a user's actions
will keep up to date, e.g. changing claims status, enrolling in clubs,
etc.

To test, apply the patch and enable features if necessary: recalls,
article requests, claims, clubs, and patron lists. Test both from the
checkout page and the patron detail page:

Recalls:

- If necessary, check out some items to patrons so that there are titles
  which can be recalled.
- Log in to the OPAC and place one or more recalls.
- Return to the staff interface and view the "Recalls" tab on the
  patron's account.
- Click Actions -> Cancel for one of the recalls. The recall should be
  marked "Cancelled" and the count on the tab should update.

Return claims:

- If necessary, check out some items to a patron. Click the "Claim
  returned" button on a few of the patron's checkouts.
- As you add claims, the "Claims" tab should update the count of claims.

  *** NOTE: This changes the display of claims in the tab so that the
      count of unresolved claims appears first: "Unresolved / Resolved".
      I think it makes more sense for the first number to be the one
      which shows the number of "active" issues.

- Open the Claims tab. Click Actions->Resolve on one or more claims,
  confirming that the resolved claim is hidden and the tab numbers
  update.
- Test setting the ClaimReturnedWarningThreshold system preference to
  various values: e.g. empty, 1, 5.
  - If the pref is empty, OR if the pref is set to a number higher
    than the number of patron claims, the count of claims should be
    styled with the "info" blue background and the count of resolved
    claims is not shown.

    *** NOTE: Hiding the resolved claims seems logical if there is not a
        concern about the total number of claims.

  - If the number of all claims exceeds the value of the preference,
    the tab should show a count of "Unresolved claims / Resolved claims"
    with the yellow warning style.

Restrictions:

- Adding a restriction to the account should cause a counter with a
  red background to appear on the tab.

Clubs:

- If necessary, create at least one club template and then multiple
  clubs.
- From the "Clubs" tab on the patron's account, try enrolling and
  cancelling enrollments to confirm that the count on the tab updates
  correctly.

  *** NOTE: I have removed the count of available clubs because I think
      it's not relevant to this interface. We don't do it with patron
      lists, so this makes it a little more consistent..

Patron lists:

- If necessary, create two ore more patron lists.
- From the "Patron lists" tab, try adding and removing the patron from
  lists. The tab counter should update correctly.

Sponsored-by: Athens County Public Libraries
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 25 Katrin Fischer 2024-05-07 11:43:10 UTC
I am not completely sure about the color choice in combination with the dark green of the tabs. But I also see something "blue" on the restrictions and patron list tabs that I am not sure about (screenshot in Mattermost). Can you please have a look?
Comment 26 Katrin Fischer 2024-05-10 14:54:20 UTC
I am sorry, I still get the little blue boxes :(

More so, I pushed another patron accounts tab: bug 33737 - Add bookings to patron details - could you please include a follow-up for it?
Comment 27 Owen Leonard 2024-05-10 16:02:35 UTC
Okay, going off the information that Katrin is using Firefox 115 ESR I realized that my patch uses some CSS which isn't widely-supported enough to work for us yet. The :has pseudo class only arrived in Firefox as of v121.

Using a combination of :has and :empty let me simplify the template logic a lot but I can try to do it the hard way.
Comment 28 Martin Renvoize (ashimema) 2024-10-18 07:00:15 UTC
I really like where you were going with this :)