Bug 8461 - Block returns of withdrawn items show as 'not checked out'
Summary: Block returns of withdrawn items show as 'not checked out'
Status: Pushed to main
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: Main
Hardware: All All
: P5 - low minor (vote)
Assignee: Nick Clemens
QA Contact: Marcel de Rooy
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-17 16:23 UTC by Kyle M Hall
Modified: 2024-04-19 16:07 UTC (History)
8 users (show)

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


Attachments
Bug 8461: Display information on whithdrawn item when checked in (5.10 KB, patch)
2024-01-24 14:55 UTC, Nick Clemens
Details | Diff | Splinter Review
WithdrawnNotCheckedIn.PNG (30.42 KB, image/png)
2024-01-24 21:18 UTC, Kristi
Details
DueDateInfo.PNG (31.72 KB, image/png)
2024-01-24 21:20 UTC, Kristi
Details
Bug 8461: Display information on whithdrawn item when checked in (5.18 KB, patch)
2024-03-01 18:11 UTC, Andrew Fuerste-Henry
Details | Diff | Splinter Review
Bug 8461: Display information on withdrawn item when checked in (5.18 KB, patch)
2024-04-12 11:25 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 8461: Tidy (1.43 KB, patch)
2024-04-12 11:25 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 8461: Display information on withdrawn item when checked in (5.27 KB, patch)
2024-04-19 09:40 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 8461: Tidy (1.53 KB, patch)
2024-04-19 09:40 UTC, Marcel de Rooy
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Kyle M Hall 2012-07-17 16:23:47 UTC
Owen Leonard wrote:

When an issued item that has been marked as withdrawn is returned, the table of checked-in items which appears at the bottom of the page the "due date" and "patron" columns both say "not checked out." I'm guessing the patron information isn't available because it wasn't returned as part of the check-in process? I wonder if there is a better way to handle this while still preserving the display of the failed checkin in the table of scanned items?
Comment 1 Katrin Fischer 2019-04-09 23:33:40 UTC
Hi Owen,
not sure you remember that one. What would you expect to display?

I just checked, when returning the item the messages on top say:

Item is withdrawn.
Item not checked out.
Comment 2 Nick Clemens 2024-01-24 14:55:06 UTC
Created attachment 161342 [details] [review]
Bug 8461: Display information on whithdrawn item when checked in

This patch displays the due date and withdrawn information in the Checked-in items table when 'ShowAllCheckins' is enabled. While the top message is clear, if a staff member checks in two items, then refers to the table they would not have all the information.

To test:
1 - Enable system preference 'ShowAllCheckins'
2 - Set system preference 'BlockReturnOfWithdrawnItems' to 'Block'
3 - Check out an item to a patron
4 - Mark the item as withdrawn
5 - Check the item in
6 - Note message at top says things like 'Cannot check in' 'Item has been withdrawn'
7 - Note the Checked-in items table says 'Not checked out'
8 - Apply patch, restart all
9 - Check the item in again
10 - Note top message has not changed
11 - Note the table now say 'Item was not checked in' and displays the due date and patron info
12 - Note the table also includes the withdrawn value for the item
Comment 3 Kristi 2024-01-24 21:18:18 UTC
In testing, I do not see 11 - Note the table now say 'Item was not checked in' and displays the due date and patron info
12 - Note the table also includes the withdrawn value for the item. Screenshot attachment to come.
Comment 4 Kristi 2024-01-24 21:18:57 UTC
Created attachment 161371 [details]
WithdrawnNotCheckedIn.PNG
Comment 5 Kristi 2024-01-24 21:20:35 UTC
Created attachment 161372 [details]
DueDateInfo.PNG

The checkout info does still shows the item checked out to the patron.
Comment 6 Katrin Fischer 2024-01-28 13:37:49 UTC
Setting to Failed QA so the patch author is alerted (see last comments from Kristi)
Comment 7 Nick Clemens 2024-02-29 17:27:52 UTC
(In reply to Kristi from comment #3)
> In testing, I do not see 11 - Note the table now say 'Item was not checked
> in' and displays the due date and patron info
> 12 - Note the table also includes the withdrawn value for the item.
> Screenshot attachment to come.

This works for me in my testing - did you test on a sandbox, or a local dev environment? Can you confirm plack/memchaced were restarted after the patch was applied?
Comment 8 Kristi 2024-02-29 19:42:17 UTC
I was testing in a sandbox, Nick. I think that may answer your second question. It sounds like perhaps this is best tested in a dev environment.
Comment 9 Andrew Fuerste-Henry 2024-03-01 18:11:08 UTC
Created attachment 162682 [details] [review]
Bug 8461: Display information on whithdrawn item when checked in

This patch displays the due date and withdrawn information in the Checked-in items table when 'ShowAllCheckins' is enabled. While the top message is clear, if a staff member checks in two items, then refers to the table they would not have all the information.

To test:
1 - Enable system preference 'ShowAllCheckins'
2 - Set system preference 'BlockReturnOfWithdrawnItems' to 'Block'
3 - Check out an item to a patron
4 - Mark the item as withdrawn
5 - Check the item in
6 - Note message at top says things like 'Cannot check in' 'Item has been withdrawn'
7 - Note the Checked-in items table says 'Not checked out'
8 - Apply patch, restart all
9 - Check the item in again
10 - Note top message has not changed
11 - Note the table now say 'Item was not checked in' and displays the due date and patron info
12 - Note the table also includes the withdrawn value for the item

Signed-off-by: Andrew Fuerste Henry <andrewfh@dubcolib.org>
Comment 10 Marcel de Rooy 2024-04-05 08:35:43 UTC
        if( $issue ){
            my $date_due_dt = dt_from_string( $issue->date_due, 'sql' );
            $duedate = $date_due_dt->strftime('%Y-%m-%d %H:%M');
            $input{borrowernumber} = $issue->borrowernumber;
            $riborrowernumber{0}   = $borrower->{'borrowernumber'};
        }
        $input{duedate}   = $duedate;
        $input{not_returned}   = 1;


This raises questions. If no issue, you set not_returned? Shouldnt it depend on issue?

And some untidiness:
 WARN   circ/returns.pl
   WARN   tidiness
                The file is less tidy than before (bad/messy lines before: 230, now: 236)
Comment 11 Nick Clemens 2024-04-12 11:25:55 UTC
Created attachment 164828 [details] [review]
Bug 8461: Display information on withdrawn item when checked in

This patch displays the due date and withdrawn information in the Checked-in items table when 'ShowAllCheckins' is enabled. While the top message is clear, if a staff member checks in two items, then refers to the table they would not have all the information.

To test:
1 - Enable system preference 'ShowAllCheckins'
2 - Set system preference 'BlockReturnOfWithdrawnItems' to 'Block'
3 - Check out an item to a patron
4 - Mark the item as withdrawn
5 - Check the item in
6 - Note message at top says things like 'Cannot check in' 'Item has been withdrawn'
7 - Note the Checked-in items table says 'Not checked out'
8 - Apply patch, restart all
9 - Check the item in again
10 - Note top message has not changed
11 - Note the table now say 'Item was not checked in' and displays the due date and patron info
12 - Note the table also includes the withdrawn value for the item

Signed-off-by: Andrew Fuerste Henry <andrewfh@dubcolib.org>
Comment 12 Nick Clemens 2024-04-12 11:25:58 UTC
Created attachment 164829 [details] [review]
Bug 8461: Tidy
Comment 13 Nick Clemens 2024-04-12 11:33:34 UTC
(In reply to Marcel de Rooy from comment #10)
>         if( $issue ){
>             my $date_due_dt = dt_from_string( $issue->date_due, 'sql' );
>             $duedate = $date_due_dt->strftime('%Y-%m-%d %H:%M');
>             $input{borrowernumber} = $issue->borrowernumber;
>             $riborrowernumber{0}   = $borrower->{'borrowernumber'};
>         }
>         $input{duedate}   = $duedate;
>         $input{not_returned}   = 1;
> 
> 
> This raises questions. If no issue, you set not_returned? Shouldnt it depend
> on issue?

No issue is one reason for not_returned, others are withdrawn blocked, lost blocked etc. So the issue variable may or not be present, but the elsif block we are in means the item was not returned.

> 
> And some untidiness:
>  WARN   circ/returns.pl
>    WARN   tidiness
>                 The file is less tidy than before (bad/messy lines before:
> 230, now: 236)

Tidied
Comment 14 Marcel de Rooy 2024-04-19 09:40:37 UTC
Created attachment 165157 [details] [review]
Bug 8461: Display information on withdrawn item when checked in

This patch displays the due date and withdrawn information in the Checked-in items table when 'ShowAllCheckins' is enabled. While the top message is clear, if a staff member checks in two items, then refers to the table they would not have all the information.

To test:
1 - Enable system preference 'ShowAllCheckins'
2 - Set system preference 'BlockReturnOfWithdrawnItems' to 'Block'
3 - Check out an item to a patron
4 - Mark the item as withdrawn
5 - Check the item in
6 - Note message at top says things like 'Cannot check in' 'Item has been withdrawn'
7 - Note the Checked-in items table says 'Not checked out'
8 - Apply patch, restart all
9 - Check the item in again
10 - Note top message has not changed
11 - Note the table now say 'Item was not checked in' and displays the due date and patron info
12 - Note the table also includes the withdrawn value for the item

Signed-off-by: Andrew Fuerste Henry <andrewfh@dubcolib.org>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 15 Marcel de Rooy 2024-04-19 09:40:40 UTC
Created attachment 165158 [details] [review]
Bug 8461: Tidy

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 16 Katrin Fischer 2024-04-19 16:07:16 UTC
Pushed for 24.05!

Well done everyone, thank you!