Bug 19198 - Renewal as issue causes too many error
Summary: Renewal as issue causes too many error
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: Main
Hardware: All All
: P5 - low major (vote)
Assignee: Nick Clemens
QA Contact: Marcel de Rooy
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-08-29 14:13 UTC by Nick Clemens
Modified: 2019-06-27 09:24 UTC (History)
4 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 19198 - Unit tests (2.90 KB, patch)
2017-08-29 14:27 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 19198 - Renewal as issue causes too many error (5.76 KB, patch)
2017-08-29 14:27 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 19198 - Unit tests (2.95 KB, patch)
2017-08-31 13:23 UTC, Lee Jamison
Details | Diff | Splinter Review
Bug 19198 - Renewal as issue causes too many error (5.81 KB, patch)
2017-08-31 13:23 UTC, Lee Jamison
Details | Diff | Splinter Review
Bug 19198 - Unit tests (2.95 KB, patch)
2017-09-13 12:00 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 19198 - Renewal as issue causes too many error (5.81 KB, patch)
2017-09-13 12:00 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 19198 (QA Followup) Fix typo in conditions (1.04 KB, patch)
2017-09-13 12:00 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 19198 - Unit tests (3.55 KB, patch)
2017-10-03 17:44 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 19198 - Renewal as issue causes too many error (5.81 KB, patch)
2017-10-03 17:44 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 19198 (QA Followup) Fix typo in conditions (1.04 KB, patch)
2017-10-03 17:44 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 19198: Unit tests (3.70 KB, patch)
2017-10-03 18:34 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 19198: Renewal as issue causes too many error (5.86 KB, patch)
2017-10-03 18:34 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 19198: (QA followup) Fix typo in conditions (1.09 KB, patch)
2017-10-03 18:34 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 19198: do not autovivify (1.03 KB, patch)
2017-10-06 14:59 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 19198: Prevent the test to fail randomly (1.41 KB, patch)
2017-10-06 14:59 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Clemens 2017-08-29 14:13:51 UTC
To recreate:

1 - Set a rule to limit checkouts to a single issue, allowing renewal
2 - Issue an item to a patron
3 - Issue the same item
4 - In staff client you get a confirm to renew and a notice of Too Many checkouts
5 - VIA Sip - you get a renewal response, but in logs the renewal fails as a 'too many'
Comment 1 Nick Clemens 2017-08-29 14:27:25 UTC
Created attachment 66584 [details] [review]
Bug 19198 - Unit tests
Comment 2 Nick Clemens 2017-08-29 14:27:28 UTC
Created attachment 66585 [details] [review]
Bug  19198 - Renewal as issue causes too many error

This patch moves some code and prevents checking for too many checkouts
when performing a renewal via checkout

To test:
1 - Set a rule to limit checkouts to a single issue, allowing renewal
2 - Issue an item to a patron
3 - Issue the same item
4 - In staff client you get a confirm to renew and a notice of Too Many
checkouts, don't confirm
5 - VIA Sip - you get a renewal response, but in logs the renewal fails
as a 'too
6 - Apply patch
7 - Via staff client you shoudl get renewal confirm with no too many
error
8 - SIP checkout should renew
Comment 3 Lee Jamison 2017-08-31 13:23:38 UTC
Created attachment 66670 [details] [review]
Bug 19198 - Unit tests

Signed-off-by: Lee Jamison <ldjamison@marywood.edu>
Comment 4 Lee Jamison 2017-08-31 13:23:47 UTC
Created attachment 66671 [details] [review]
Bug 19198 - Renewal as issue causes too many error

This patch moves some code and prevents checking for too many checkouts
when performing a renewal via checkout

To test:
1 - Set a rule to limit checkouts to a single issue, allowing renewal
2 - Issue an item to a patron
3 - Issue the same item
4 - In staff client you get a confirm to renew and a notice of Too Many
checkouts, don't confirm
5 - VIA Sip - you get a renewal response, but in logs the renewal fails
as a 'too
6 - Apply patch
7 - Via staff client you shoudl get renewal confirm with no too many
error
8 - SIP checkout should renew

Signed-off-by: Lee Jamison <ldjamison@marywood.edu>
Comment 5 Marcel de Rooy 2017-09-01 07:33:03 UTC
QA: Looking here now
Comment 6 Marcel de Rooy 2017-09-01 07:55:36 UTC
cd t/db_dependent/; git grep -l CanBookBeIssued | xargs prove

not ok 8 - Not a specific case, $delta should not be incremented
#   Failed test 'Not a specific case, $delta should not be incremented'
#   at t/db_dependent/Circulation/SwitchOnSiteCheckouts.t line 146.
#          got: undef
#     expected: 'TOO_MANY_CHECKOUTS'
Comment 7 Nick Clemens 2017-09-13 12:00:54 UTC
Created attachment 67111 [details] [review]
Bug 19198 - Unit tests

Signed-off-by: Lee Jamison <ldjamison@marywood.edu>
Comment 8 Nick Clemens 2017-09-13 12:00:56 UTC
Created attachment 67112 [details] [review]
Bug 19198 - Renewal as issue causes too many error

This patch moves some code and prevents checking for too many checkouts
when performing a renewal via checkout

To test:
1 - Set a rule to limit checkouts to a single issue, allowing renewal
2 - Issue an item to a patron
3 - Issue the same item
4 - In staff client you get a confirm to renew and a notice of Too Many
checkouts, don't confirm
5 - VIA Sip - you get a renewal response, but in logs the renewal fails
as a 'too
6 - Apply patch
7 - Via staff client you shoudl get renewal confirm with no too many
error
8 - SIP checkout should renew

Signed-off-by: Lee Jamison <ldjamison@marywood.edu>
Comment 9 Nick Clemens 2017-09-13 12:00:59 UTC
Created attachment 67113 [details] [review]
Bug 19198 (QA Followup) Fix typo in conditions

'&' should be '&&'
Comment 10 Tomás Cohen Arazi 2017-10-03 17:34:34 UTC
Sorry Nick, can you rebase?
Comment 11 Nick Clemens 2017-10-03 17:44:06 UTC
Created attachment 67567 [details] [review]
Bug 19198 - Unit tests

Signed-off-by: Lee Jamison <ldjamison@marywood.edu>
Comment 12 Nick Clemens 2017-10-03 17:44:10 UTC
Created attachment 67568 [details] [review]
Bug 19198 - Renewal as issue causes too many error

This patch moves some code and prevents checking for too many checkouts
when performing a renewal via checkout

To test:
1 - Set a rule to limit checkouts to a single issue, allowing renewal
2 - Issue an item to a patron
3 - Issue the same item
4 - In staff client you get a confirm to renew and a notice of Too Many
checkouts, don't confirm
5 - VIA Sip - you get a renewal response, but in logs the renewal fails
as a 'too
6 - Apply patch
7 - Via staff client you shoudl get renewal confirm with no too many
error
8 - SIP checkout should renew

Signed-off-by: Lee Jamison <ldjamison@marywood.edu>
Comment 13 Nick Clemens 2017-10-03 17:44:13 UTC
Created attachment 67569 [details] [review]
Bug 19198 (QA Followup) Fix typo in conditions

'&' should be '&&'
Comment 14 Tomás Cohen Arazi 2017-10-03 18:34:06 UTC
Created attachment 67571 [details] [review]
Bug 19198: Unit tests

Signed-off-by: Lee Jamison <ldjamison@marywood.edu>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 15 Tomás Cohen Arazi 2017-10-03 18:34:16 UTC
Created attachment 67572 [details] [review]
Bug 19198: Renewal as issue causes too many error

This patch moves some code and prevents checking for too many checkouts
when performing a renewal via checkout

To test:
1 - Set a rule to limit checkouts to a single issue, allowing renewal
2 - Issue an item to a patron
3 - Issue the same item
4 - In staff client you get a confirm to renew and a notice of Too Many
checkouts, don't confirm
5 - VIA Sip - you get a renewal response, but in logs the renewal fails
as a 'too
6 - Apply patch
7 - Via staff client you shoudl get renewal confirm with no too many
error
8 - SIP checkout should renew

Signed-off-by: Lee Jamison <ldjamison@marywood.edu>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 16 Tomás Cohen Arazi 2017-10-03 18:34:28 UTC
Created attachment 67573 [details] [review]
Bug 19198: (QA followup) Fix typo in conditions

'&' should be '&&'

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 17 Nick Clemens 2017-10-06 01:03:19 UTC
I think Tomas just didn't change status, revert if I am wrong :-)
Comment 18 Jonathan Druart 2017-10-06 14:59:53 UTC
Created attachment 67719 [details] [review]
Bug 19198: do not autovivify
Comment 19 Jonathan Druart 2017-10-06 14:59:57 UTC
Created attachment 67720 [details] [review]
Bug 19198: Prevent the test to fail randomly

If categorycode is 'X', the test will fail
Comment 20 Jonathan Druart 2017-10-06 15:18:16 UTC
Pushed to master for 17.11, thanks to everybody involved!