Bug 26479 - Always show "Check in"-button if SCOAllowCheckin
Summary: Always show "Check in"-button if SCOAllowCheckin
Status: Pushed to main
Alias: None
Product: Koha
Classification: Unclassified
Component: Self checkout (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Magnus Enger
QA Contact: Martin Renvoize (ashimema)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-09-17 06:41 UTC by Katrin Fischer
Modified: 2025-05-09 07:13 UTC (History)
7 users (show)

See Also:
GIT URL:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
25.05.00
Circulation function:


Attachments
Bug 26479 - Self checkout: option for returning items is missing with SCOAllowCheckin (1.54 KB, patch)
2024-08-27 10:56 UTC, Olli-Antti Kivilahti
Details | Diff | Splinter Review
Signed-off patch (1.60 KB, patch)
2024-08-28 12:19 UTC, Oliver Behnke
Details | Diff | Splinter Review
Bug 26479: Always show "Check in"-button if SCOAllowCheckin (6.22 KB, patch)
2025-05-08 07:19 UTC, Magnus Enger
Details | Diff | Splinter Review
Bug 26479: Always show "Check in"-button if SCOAllowCheckin (6.26 KB, patch)
2025-05-08 11:19 UTC, David Nind
Details | Diff | Splinter Review
Bug 26479: Always show "Check in"-button if SCOAllowCheckin (6.33 KB, patch)
2025-05-08 12:57 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 Katrin Fischer 2020-09-17 06:41:30 UTC
When returning items from the self checkout screens is allowed, there is no link to do so in GUI. It looks like the table of checkouts should have a return item link in the manual, but there is only a renew link visible

https://koha-community.org/manual/20.05/en/html/circulation.html#self-checkout

To test:
- Activate WebBasedSelfCheck and SCOAllowCheckin 
- Go to the self checkout in OPAC
- Check an item out
- Verify there is only a renew link and no visible option to return it
Comment 1 Andrew Fuerste-Henry 2020-11-12 14:51:25 UTC
Seems like this may relate to Bug 25147?
Comment 2 Oliver Behnke 2024-07-30 09:23:51 UTC
@Andrew, it doesn't since SCOAllowCheckin is already the renamed setting.

Anyhow, I'd like to bump this up again as I just came across this issue in 
Koha 24.05.01 - after using this feature for years. Unfortunately, I don't know when exactly this did start to occur. And, interestingly, it only affects some users... Will report back when I know more...
Comment 3 Oliver Behnke 2024-07-30 12:24:32 UTC
My issue was caused by a recent regression. See bug 37525.

That said, I agree that the UX is not as intuitive as it could be. When you allow "SCOAllowCheckin" this enables multiple buttons to "Return" or "Check in" an item. The one you're missing is the "Check in" button in the "Renew" column of the "Checkouts" table (on the main SCO page). That's only visible for items that cannot be renewed. To lessen the confusion this causes, I set "SCOLoadCheckoutsByDefault" to "Don't show", such that the occasional "Check in" button isn't visible by default.

The standard button(s) to return an item are provided *after* you've entered the barcode of the item to be returned. What's making this UX worse are the prominent warnings like "You cannot renew this item again" or "This item is already checked out to you" - things I never intended or know anyway. IMHO, the return workflow needs some love here.

1) When "SCOAllowCheckin" is allowed, add a "Return" column to the "Checkouts" table with a single "Check in" item in it. This speeds up bulk self-checkins and makes the "Renew -> Check in" button less confusing
2) Rephrase the individual return dialog to make returns a first-class citizen, not just a (felt) exception.

Cheers
Comment 4 Olli-Antti Kivilahti 2024-08-27 10:56:15 UTC
Created attachment 170758 [details] [review]
Bug 26479 - Self checkout: option for returning items is missing with SCOAllowCheckin

Also.
When reading a barcode to the checkout-input box, and when it already is checked-out to the logged-in-patron, SCO used to show the "cancel", "return" and "renew" -options.

Now the "return" is missing.

This fixes the issue
Comment 5 Olli-Antti Kivilahti 2024-08-27 11:00:51 UTC
*** Bug 37525 has been marked as a duplicate of this bug. ***
Comment 6 Oliver Behnke 2024-08-28 12:19:36 UTC
Created attachment 170808 [details] [review]
Signed-off patch

I signed off the patch as requested, but mainly in the context of related bug 37525. Thus I'll keep the current status and let Katrin do the final testing/sign-off.

Cheers
Comment 7 Katrin Fischer 2024-08-28 16:07:54 UTC
(In reply to Oliver Behnke from comment #3)
> My issue was caused by a recent regression. See bug 37525.
> 
> That said, I agree that the UX is not as intuitive as it could be. When you
> allow "SCOAllowCheckin" this enables multiple buttons to "Return" or "Check
> in" an item. The one you're missing is the "Check in" button in the "Renew"
> column of the "Checkouts" table (on the main SCO page). That's only visible
> for items that cannot be renewed. To lessen the confusion this causes, I set
> "SCOLoadCheckoutsByDefault" to "Don't show", such that the occasional "Check
> in" button isn't visible by default.
> 
> The standard button(s) to return an item are provided *after* you've entered
> the barcode of the item to be returned. What's making this UX worse are the
> prominent warnings like "You cannot renew this item again" or "This item is
> already checked out to you" - things I never intended or know anyway. IMHO,
> the return workflow needs some love here.
> 
> 1) When "SCOAllowCheckin" is allowed, add a "Return" column to the
> "Checkouts" table with a single "Check in" item in it. This speeds up bulk
> self-checkins and makes the "Renew -> Check in" button less confusing
> 2) Rephrase the individual return dialog to make returns a first-class
> citizen, not just a (felt) exception.
> 
> Cheers

I believe these are indeed different bugs.

Mine was about the button in the checkous table, that doesn't appear to be fixed here, since Olli wrote:

"But I felt like the user should not be able to check-in books from that list, because there is no guarantee the user actually has the book."

So the patch should indeed probably go on bug 37525.

With self checks you never know if the user actually has the item, it's all about trust. 

Please be aware that there is also a separate GUI for checkins that is more advanced probably, see SelfCheckInModule system preference.
Comment 8 Olli-Antti Kivilahti 2024-08-29 08:02:06 UTC
(In reply to Oliver Behnke from comment #6)
> Created attachment 170808 [details] [review] [review]
> Signed-off patch
> 
> I signed off the patch as requested, but mainly in the context of related
> bug 37525. Thus I'll keep the current status and let Katrin do the final
> testing/sign-off.
> 
> Cheers

Thank you for the sign-off.
Comment 9 Victor Grousset/tuxayo 2024-09-12 22:57:36 UTC
Comment on attachment 170808 [details] [review]
Signed-off patch

Obsoleting the patch that is actually addressing Bug 37525
Comment 10 Victor Grousset/tuxayo 2024-09-12 22:59:03 UTC
I guess this is back to assigned status then. (for lack of being able to go back to new)
Comment 11 Magnus Enger 2024-11-13 09:10:16 UTC
I think the problem here is in this part of the SCO template (koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt): 

    [% IF ISSUE.can_be_renewed %]
        ...
    [% ELSE %]
        ...
        [% IF Koha.Preference('SCOAllowCheckin') %]
            <div>
                <input type="submit" value="Check in item" name="confirm" class="btn btn-info btn-sm return" />
                <input type="hidden" name="op" value="cud-returnbook" />
                <input type="hidden" name="confirmed" value=""  />
            </div>
        [% END %]
    [% END %]

If the issue/item/loan can be renewed, the "Check in item"-button is not shown.
Comment 12 Oliver Behnke 2024-11-13 09:16:22 UTC
Yep, see me analysis in comment #3
Comment 13 Magnus Enger 2025-05-07 13:42:21 UTC
It looks like the logic of the code has been the way it is now for about 9 years, changed by bug 16873 and this patch: https://git.koha-community.org/Koha-community/Koha/commit/8dce1cde3a8b1d0cd742f26545aa1d09e4ff63df#diff-a22dc682a84c41672294c66e441329a451b5cd5a

SCOAllowCheckin was called AllowSelfCheckReturns back then, see bug 25147 and https://git.koha-community.org/Koha-community/Koha/commit/081a4c75be2431e1a6fc470a5b8834fa866e2453

But we do have at least one library reporting a change in functionality, where the "Check in" button "used to work perfectly, but is now missing". (Could this be because of some change to their renewal policies, so that items that used to be non-renewable and display the "Check in" button are now renewable, and missing the button?)
Comment 14 Magnus Enger 2025-05-07 13:58:46 UTC
I can do a patch for this, but I wonder about the best way to do it. My idea so far is
- To introduce a new column "Check in" to the right of the "Renew" column
- Put a button in the column that always says "Check in item"
- Never display the "Check in item" button in the "Renew column"

The main question I have is: Should there be a syspref to enable/disable this new behaviour? Or is it OK to always show the "Check in item" button? (To me it seems better than only showing it once an item can not be renewed, which I would think looks inconsistent to patrons.)
Comment 15 Katrin Fischer 2025-05-07 15:17:29 UTC
I can't imagine it was intentional. I should always have the option to return an item if I want and have it on hand when at the library?
Comment 16 Magnus Enger 2025-05-08 06:19:16 UTC
(In reply to Katrin Fischer from comment #15)
> I can't imagine it was intentional. I should always have the option to
> return an item if I want and have it on hand when at the library?

Agreed!
Comment 17 Magnus Enger 2025-05-08 07:19:44 UTC
Created attachment 182063 [details] [review]
Bug 26479: Always show "Check in"-button if SCOAllowCheckin

To reproduce:
- Make sure SCO is enabled and SCOAllowCheckin = Allow
- Log in to SCO in the OPAC
- Check an item out to yourself
- The item has a green "Renew item" button. Click this button until
  all renewals have been used up, and you get a blue "Check in item"
  button.

To test:
- Apply the patch
- Check an item out to yourself
- Verify the item has a green "Renew item" button in the "Renew"
  column, and a blue "Check in item" button in the "Check in" column
- Click "Renew item" until all renewals are used up. Verify you
  eventually get the "No renewals allowed" message in the "Renew"
  column, but no blue "Check in item" button (in that column)
- Verify the "Check in item" button works as expected
- Set SCOAllowCheckin = Don't allow, reload the SCO page and verify
  that no "Check in" column and no blue "Check in item" button is
  shown, even after all renewals has been used up
Comment 18 David Nind 2025-05-08 11:19:58 UTC
Created attachment 182068 [details] [review]
Bug 26479: Always show "Check in"-button if SCOAllowCheckin

To reproduce:
- Make sure SCO is enabled and SCOAllowCheckin = Allow
- Log in to SCO in the OPAC
- Check an item out to yourself
- The item has a green "Renew item" button. Click this button until
  all renewals have been used up, and you get a blue "Check in item"
  button.

To test:
- Apply the patch
- Check an item out to yourself
- Verify the item has a green "Renew item" button in the "Renew"
  column, and a blue "Check in item" button in the "Check in" column
- Click "Renew item" until all renewals are used up. Verify you
  eventually get the "No renewals allowed" message in the "Renew"
  column, but no blue "Check in item" button (in that column)
- Verify the "Check in item" button works as expected
- Set SCOAllowCheckin = Don't allow, reload the SCO page and verify
  that no "Check in" column and no blue "Check in item" button is
  shown, even after all renewals has been used up

Signed-off-by: David Nind <david@davidnind.com>
Comment 19 Martin Renvoize (ashimema) 2025-05-08 12:57:45 UTC
Created attachment 182081 [details] [review]
Bug 26479: Always show "Check in"-button if SCOAllowCheckin

To reproduce:
- Make sure SCO is enabled and SCOAllowCheckin = Allow
- Log in to SCO in the OPAC
- Check an item out to yourself
- The item has a green "Renew item" button. Click this button until
  all renewals have been used up, and you get a blue "Check in item"
  button.

To test:
- Apply the patch
- Check an item out to yourself
- Verify the item has a green "Renew item" button in the "Renew"
  column, and a blue "Check in item" button in the "Check in" column
- Click "Renew item" until all renewals are used up. Verify you
  eventually get the "No renewals allowed" message in the "Renew"
  column, but no blue "Check in item" button (in that column)
- Verify the "Check in item" button works as expected
- Set SCOAllowCheckin = Don't allow, reload the SCO page and verify
  that no "Check in" column and no blue "Check in item" button is
  shown, even after all renewals has been used up

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Comment 20 Katrin Fischer 2025-05-09 06:36:58 UTC
Annoying bug, thanks for your perseverance Magnus!
Comment 21 Katrin Fischer 2025-05-09 07:13:59 UTC
Pushed for 25.05!

Well done everyone, thank you!