Bug 21159 - Blank item shelving location (952$c) on checkout based on syspref values
Summary: Blank item shelving location (952$c) on checkout based on syspref values
Status: Failed QA
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Hayley Mapley
QA Contact: Testopia
URL:
Keywords:
Depends on: 14576
Blocks:
  Show dependency treegraph
 
Reported: 2018-08-06 02:56 UTC by Alex Buckley
Modified: 2019-04-25 13:26 UTC (History)
7 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 21159 - Implementing 2 sysprefs to enable blanking location (11.64 KB, patch)
2018-08-06 03:25 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 21159 - Implementing 2 sysprefs to enable blanking location (11.63 KB, patch)
2018-08-08 04:10 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 21159 - Implementing 2 sysprefs to enable blanking location (11.87 KB, patch)
2018-08-08 21:08 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 21159 - Implementing syspref to enable blanking of item shelving location on issue. (6.89 KB, patch)
2018-08-13 22:32 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 21159 - Implementing syspref to enable blanking of item shelving location on issue. (6.88 KB, patch)
2018-08-15 21:00 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 21159 - Implementing syspref to enable blanking of item shelving location on issue. (6.88 KB, patch)
2018-08-16 04:49 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 21159 - Implementing syspref to enable blanking of item shelving location on issue. (6.92 KB, patch)
2018-08-16 05:04 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 21159 - Corrected typo (1016 bytes, patch)
2018-08-16 05:24 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 21159 - Implementing syspref to enable blanking of item shelving location on issue. (6.23 KB, patch)
2018-10-19 01:28 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 21159 - Corrected typo (939 bytes, patch)
2018-10-19 01:28 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 21159: Implementing syspref to enable blanking of item shelving location on issue. (6.23 KB, patch)
2018-10-19 01:35 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 21159: Corrected typo (938 bytes, patch)
2018-10-19 01:35 UTC, Alex Buckley
Details | Diff | Splinter Review
Bug 21159 - Implementing 2 sysprefs to enable blanking location (6.96 KB, patch)
2019-03-26 21:58 UTC, Hayley Mapley
Details | Diff | Splinter Review
Bug 21159 - Corrected typo (855 bytes, patch)
2019-03-26 21:59 UTC, Hayley Mapley
Details | Diff | Splinter Review
Bug 21159: (follow up) Fixed broken indentation in circulation. pref (1.41 KB, patch)
2019-03-27 01:12 UTC, Hayley Mapley
Details | Diff | Splinter Review
Bug 21159 - Implementing syspref to enable blanking of item shelving location on issue. This patch builds upon the functionality implemented in bug 14576, by allowing library staff to automatically change the item shelving location of items whic (6.64 KB, patch)
2019-04-10 01:53 UTC, Liz Rea
Details | Diff | Splinter Review
Bug 21159 - Corrected typo (910 bytes, patch)
2019-04-10 01:53 UTC, Liz Rea
Details | Diff | Splinter Review
Bug 21159: (follow up) Fixed broken indentation in circulation. pref (1.62 KB, patch)
2019-04-10 01:53 UTC, Liz Rea
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Buckley 2018-08-06 02:56:04 UTC
Items shelving location (952$c) is blanked when the item is issued (if the new syspref BlankShelvingLocationOnIssue is enabled) and returned (if the new syspref BlankShelvingLocationOnReturn is enabled). 

i.e. This patch will blank shelving location on circulation actions, it will utilise two system preferences rather than one so it can work however people want it to. 

The sysprefs will both be off by default.
Comment 1 Alex Buckley 2018-08-06 03:25:06 UTC
Created attachment 77487 [details] [review]
Bug 21159 - Implementing 2 sysprefs to enable blanking location

This patch introduces two new system preferences: BlankingShelvingLocationOnIssue and BlankingShelvingLocationOnReturn. By default both are off.

If BlankingShelvingLocationOnIssue is enabled then when an item is issued it's shelving location 952$c field will be set to '' in C4::Items->BlankShelvingLocation()

If BlankingShelvingLocationOnReturn is enabled then when an item is returned it's shelving location field will be set to '' in C4::Items->BlankShelvingLocation().

t/db_dependent/Circulation/issue.t contains tests for BlankShelvingLocationOnIssue

t/db_dependen/Circulation/Returns.t contains tests for BlankShelvingLocationOnReturn

Test plan:
1. Create a new biblio and associated item and set the value of the shelving location for the item to 'CART'
2. Checkout the item to a user and notice that the status does not change
3. Apply patch, and run ./updatedatabase.pl inside the koha shell
4. Now return the checked out item (when you updated the database you added two new sysprefs: BlankShelvingLocationOnIssue and BlankShelvingLocationOnReturn both of which are off by default)
5. Notice the shelving location has not changed, showing with the BlankShelvingLocationOnReturn syspref not enabled the shelving location is not changed upon return
6. Check the item out again and notice the shelving location is not changed, showing that when the BlankShelvingLocationOnIssue is not enabled the shelving location is not changed upon issue.
7. Enable both aforementioned sysprefs in the Administration->Global system preferences->Circulation interface
8. Return the item and notice the Shelving location has changed from 'Cart' to no value, showing when the BlankShelvingLocationOnReturn syspref is enabled it blanks the shelving location value on the return of the item
9. Edit the item changing the shelving location back to 'Shelving Trolley'(CART)
10. Check out the item and notice the shelving location is changed to no value, showing when the BlankShelvingLocationOnIssue syspref is enabled it blanks the shelving location on the issue of an item.
11. Run t/db_dependent/Circulation/Returns.t
12. Run t/db_dependent/Circulation/issue.t

Sponsored-By: Toi Ohomai Institute of Technology, New Zealand
Comment 2 Alex Buckley 2018-08-08 04:10:34 UTC
Created attachment 77549 [details] [review]
Bug 21159 - Implementing 2 sysprefs to enable blanking location

This patch introduces two new system preferences: BlankingShelvingLocationOnIssue and BlankingShelvingLocationOnReturn. By default both are off.

If BlankingShelvingLocationOnIssue is enabled then when an item is issued it's shelving location 952$c field will be set to '' in C4::Items->BlankShelvingLocation()

If BlankingShelvingLocationOnReturn is enabled then when an item is returned it's shelving location field will be set to '' in C4::Items->BlankShelvingLocation().

t/db_dependent/Circulation/issue.t contains tests for BlankShelvingLocationOnIssue

t/db_dependen/Circulation/Returns.t contains tests for BlankShelvingLocationOnReturn

Test plan:
1. Create a new biblio and associated item and set the value of the shelving location for the item to 'CART'
2. Checkout the item to a user and notice that the status does not change
3. Apply patch, and run ./updatedatabase.pl inside the koha shell
4. Now return the checked out item (when you updated the database you added two new sysprefs: BlankShelvingLocationOnIssue and BlankShelvingLocationOnReturn both of which are off by default)
5. Notice the shelving location has not changed, showing with the BlankShelvingLocationOnReturn syspref not enabled the shelving location is not changed upon return
6. Check the item out again and notice the shelving location is not changed, showing that when the BlankShelvingLocationOnIssue is not enabled the shelving location is not changed upon issue.
7. Enable both aforementioned sysprefs in the Administration->Global system preferences->Circulation interface
8. Return the item and notice the Shelving location has changed from 'Cart' to no value, showing when the BlankShelvingLocationOnReturn syspref is enabled it blanks the shelving location value on the return of the item
9. Edit the item changing the shelving location back to 'Shelving Trolley'(CART)
10. Check out the item and notice the shelving location is changed to no value, showing when the BlankShelvingLocationOnIssue syspref is enabled it blanks the shelving location on the issue of an item.
11. Run t/db_dependent/Circulation/Returns.t
12. Run t/db_dependent/Circulation/issue.t

Sponsored-By: Toi Ohomai Institute of Technology, New Zealand
Comment 3 Katrin Fischer 2018-08-08 11:23:05 UTC
Hi Alex, 

I think this might be kind of a partial duplicate to bug 14576 that allows arbitrary updates on the location field on checkin. I think if that makes it in, it would make BlankingShelvingLocationOnReturn obsolete.

Maybe you could take a look and see if it fits your use case? The code might be reusable for checkout too.

I'd also be interesting if the use case is CART on how this works different to the existing features: NewItemsDefaultLocation, ReturnToShelvingCart, InProcessingToShelvingCart
Comment 4 Alex Buckley 2018-08-08 21:08:34 UTC
Created attachment 77594 [details] [review]
Bug 21159 - Implementing 2 sysprefs to enable blanking location

This patch introduces two new system preferences: BlankingShelvingLocationOnIssue and BlankingShelvingLocationOnReturn. By default both are off.

If BlankingShelvingLocationOnIssue is enabled then when an item is issued it's shelving location 952$c field will be set to '' in C4::Items->BlankShelvingLocation()

If BlankingShelvingLocationOnReturn is enabled then when an item is returned it's shelving location field will be set to '' in C4::Items->BlankShelvingLocation().

t/db_dependent/Circulation/issue.t contains tests for BlankShelvingLocationOnIssue

t/db_dependen/Circulation/Returns.t contains tests for BlankShelvingLocationOnReturn

Test plan:
1. Create a new biblio and associated item and set the value of the shelving location for the item to 'CART'
2. Checkout the item to a user and notice that the status does not change
3. Apply patch, and run ./updatedatabase.pl inside the koha shell
4. Now return the checked out item (when you updated the database you added two new sysprefs: BlankShelvingLocationOnIssue and BlankShelvingLocationOnReturn both of which are off by default)
5. Notice the shelving location has not changed, showing with the BlankShelvingLocationOnReturn syspref not enabled the shelving location is not changed upon return
6. Check the item out again and notice the shelving location is not changed, showing that when the BlankShelvingLocationOnIssue is not enabled the shelving location is not changed upon issue.
7. Enable both aforementioned sysprefs in the Administration->Global system preferences->Circulation interface
8. Return the item and notice the Shelving location has changed from 'Cart' to no value, showing when the BlankShelvingLocationOnReturn syspref is enabled it blanks the shelving location value on the return of the item
9. Edit the item changing the shelving location back to 'Shelving Trolley'(CART)
10. Check out the item and notice the shelving location is changed to no value, showing when the BlankShelvingLocationOnIssue syspref is enabled it blanks the shelving location on the issue of an item.
11. Run t/db_dependent/Circulation/Returns.t
12. Run t/db_dependent/Circulation/issue.t

Sponsored-By: Toi Ohomai Institute of Technology, New Zealand
Comment 5 Katrin Fischer 2018-08-08 23:28:24 UTC
Hi Alex, did you see my comment#3 here? Also, please don't forget to assign yourself to the bug :)
Comment 6 Alex Buckley 2018-08-08 23:29:53 UTC
Yup thanks Katrin looking now.
Comment 7 Alex Buckley 2018-08-10 04:47:22 UTC
Hi Katrin

Sorry for the delay I think I should be able to modify this commit so it depends on (builds on) whats in 14576. 

In other words instead of implementing the BlankShelvingLocationOnReturn syspref which I have in this commit I can leave that out as it is being covered by 14576. 

However, 14576 does not set/blank the items.locations field when an item is issued as the BlankShelvingLocationOnIssue syspref in this commit does so I can leverage some of the code of 14576 to implement this functionality. Being able to blank the shelving location of an item when it is issued was the main thing our client wanted to be able to do. 

Thanks for bringing 14576 to my attention I will make changes to my commits so it builds on 14576. 

Cheers,
Alex
Comment 8 Alex Buckley 2018-08-13 22:32:25 UTC
Created attachment 77775 [details] [review]
Bug 21159 - Implementing syspref to enable blanking of item shelving location on issue.

This patch builds upon the functionality implemented in bug 14576,
by allowing library staff to automatically change the item shelving
location of items which are circulated.

In the case of this patch it automatically blanks the item shelving locations of items
when they are issued if the
BlankItemLocationOnCheckout syspref is enabled.

t/db_dependent/Circulation/issue.t contains tests for
BlankItemLocationOnCheckout.

Test plan:
1. Create a new biblio and associated item and set the value of the
shelving location for the item to 'CART'
2. Checkout the item to a user and notice that the status does not
change
3. Apply patches on bug report 14576, and this patch, and run ./updatedatabase.pl inside the koha shell
4. Now return the checked out item (when you updated the database you
added one new syspref: UpdateItemLocationOnCheckout which is off by default)
5. Check the item out again and notice the shelving location is not
changed, showing that when the UpdateItemLocationOnCheckout is not
enabled and the shelving location is not changed upon issue.
6. Enable the aforementioned syspref in the Administration->Global
system preferences->Circulation interface
7. Check out the item and notice the shelving location is changed to no
value, showing when the UpdateItemLocationOnCheckout syspref is enabled
it blanks the shelving location on the issue of an item.
8. Run t/db_dependent/Circulation/issue.t

Sponsored-By: Toi Ohomai Institute of Technology, New Zealand
Comment 9 Alex Buckley 2018-08-15 21:00:19 UTC
Created attachment 77859 [details] [review]
Bug 21159 - Implementing syspref to enable blanking of item shelving location on issue.

This patch builds upon the functionality implemented in bug 14576,
by allowing library staff to automatically change the item shelving
location of items which are circulated.

In the case of this patch it automatically blanks the item shelving locations of items
when they are issued if the
BlankItemLocationOnCheckout syspref is enabled.

t/db_dependent/Circulation/issue.t contains tests for
BlankItemLocationOnCheckout.

Test plan:
1. Create a new biblio and associated item and set the value of the
shelving location for the item to 'CART'
2. Checkout the item to a user and notice that the status does not
change
3. Apply patches on bug report 14576, and this patch, and run ./updatedatabase.pl inside the koha shell
4. Now return the checked out item (when you updated the database you
added one new syspref: UpdateItemLocationOnCheckout which is off by default)
5. Check the item out again and notice the shelving location is not
changed, showing that when the UpdateItemLocationOnCheckout is not
enabled and the shelving location is not changed upon issue.
6. Enable the aforementioned syspref in the Administration->Global
system preferences->Circulation interface
7. Check out the item and notice the shelving location is changed to no
value, showing when the UpdateItemLocationOnCheckout syspref is enabled
it blanks the shelving location on the issue of an item.
8. Run t/db_dependent/Circulation/issue.t

Sponsored-By: Toi Ohomai Institute of Technology, New Zealand
Comment 10 Alex Buckley 2018-08-16 04:49:23 UTC
Created attachment 77869 [details] [review]
Bug 21159 - Implementing syspref to enable blanking of item shelving location on issue.

This patch builds upon the functionality implemented in bug 14576,
by allowing library staff to automatically change the item shelving
location of items which are circulated.

In the case of this patch it automatically blanks the item shelving locations of items
when they are issued if the
BlankItemLocationOnCheckout syspref is enabled.

t/db_dependent/Circulation/issue.t contains tests for
BlankItemLocationOnCheckout.

Test plan:
1. Create a new biblio and associated item and set the value of the
shelving location for the item to 'CART'
2. Checkout the item to a user and notice that the status does not
change
3. Apply patches on bug report 14576, and this patch, and run ./updatedatabase.pl inside the koha shell
4. Now return the checked out item (when you updated the database you
added one new syspref: UpdateItemLocationOnCheckout which is off by default)
5. Check the item out again and notice the shelving location is not
changed, showing that when the UpdateItemLocationOnCheckout is not
enabled and the shelving location is not changed upon issue.
6. Enable the aforementioned syspref in the Administration->Global
system preferences->Circulation interface
7. Check out the item and notice the shelving location is changed to no
value, showing when the UpdateItemLocationOnCheckout syspref is enabled
it blanks the shelving location on the issue of an item.
8. Run t/db_dependent/Circulation/issue.t

Sponsored-By: Toi Ohomai Institute of Technology, New Zealand
Comment 11 Alex Buckley 2018-08-16 05:04:31 UTC
Created attachment 77870 [details] [review]
Bug 21159 - Implementing syspref to enable blanking of item shelving location on issue.

This patch builds upon the functionality implemented in bug 14576,
by allowing library staff to automatically change the item shelving
location of items which are circulated.

In the case of this patch it automatically blanks the item shelving locations of items
when they are issued if the
BlankItemLocationOnCheckout syspref is enabled.

t/db_dependent/Circulation/issue.t contains tests for
BlankItemLocationOnCheckout.

Test plan:
1. Create a new biblio and associated item and set the value of the
shelving location for the item to 'CART'
2. Checkout the item to a user and notice that the status does not
change
3. Apply patches on bug report 14576, and this patch, and run ./updatedatabase.pl inside the koha shell
4. Now return the checked out item (when you updated the database you
added one new syspref: UpdateItemLocationOnCheckout which is off by default)
5. Check the item out again and notice the shelving location is not
changed, showing that when the UpdateItemLocationOnCheckout is not
enabled and the shelving location is not changed upon issue.
6. Enable the aforementioned syspref in the Administration->Global
system preferences->Circulation interface
7. Check out the item and notice the shelving location is changed to no
value, showing when the UpdateItemLocationOnCheckout syspref is enabled
it blanks the shelving location on the issue of an item.
8. Run t/db_dependent/Circulation/issue.t

Sponsored-By: Toi Ohomai Institute of Technology, New Zealand
Comment 12 Alex Buckley 2018-08-16 05:20:59 UTC
I think this one is ready to test. 

It is building on (depends on) the functionality provided by 14576. Many thanks to Katrin for informing me about 14576 so I was able to remove the duplicated functionality that my original patch had. 

This new patch does not deal with automatically updating the item location when the item is returned as this is covered by 14576. 

Instead, this new commit blanks out the items.location field when the item is checked out if the UpdateItemLocationOnCheckout syspref is enabled. This makes an easier workflow for automatically removing the items.location value if the item is issued. 

Please let me know if further changes are required :)
Comment 13 Alex Buckley 2018-08-16 05:24:52 UTC
Created attachment 77871 [details] [review]
Bug 21159 - Corrected typo

Same test plan as first patch.

Sponsored-By: Toi Ohomai Institute of Technology, New Zealand
Comment 14 Alex Buckley 2018-09-11 22:19:25 UTC
Any chance we can move this patch along?
Comment 15 Alex Buckley 2018-10-19 01:28:12 UTC
Created attachment 80892 [details] [review]
Bug 21159 - Implementing syspref to enable blanking of item shelving location on issue.

This patch builds upon the functionality implemented in bug 14576,
by allowing library staff to automatically change the item shelving
location of items which are circulated.

In the case of this patch it automatically blanks the item shelving locations of items
when they are issued if the
BlankItemLocationOnCheckout syspref is enabled.

t/db_dependent/Circulation/issue.t contains tests for
BlankItemLocationOnCheckout.

Test plan:
1. Create a new biblio and associated item and set the value of the
shelving location for the item to 'CART'
2. Checkout the item to a user and notice that the status does not
change
3. Apply patches on bug report 14576, and this patch, and run ./updatedatabase.pl inside the koha shell
4. Now return the checked out item (when you updated the database you
added one new syspref: UpdateItemLocationOnCheckout which is off by default)
5. Check the item out again and notice the shelving location is not
changed, showing that when the UpdateItemLocationOnCheckout is not
enabled and the shelving location is not changed upon issue.
6. Enable the aforementioned syspref in the Administration->Global
system preferences->Circulation interface
7. Check out the item and notice the shelving location is changed to no
value, showing when the UpdateItemLocationOnCheckout syspref is enabled
it blanks the shelving location on the issue of an item.
8. Run t/db_dependent/Circulation/issue.t

Sponsored-By: Toi Ohomai Institute of Technology, New Zealand
Comment 16 Alex Buckley 2018-10-19 01:28:31 UTC
Created attachment 80893 [details] [review]
Bug 21159 - Corrected typo

Same test plan as first patch.

Sponsored-By: Toi Ohomai Institute of Technology, New Zealand
Comment 17 Alex Buckley 2018-10-19 01:35:26 UTC
Created attachment 80894 [details] [review]
Bug 21159: Implementing syspref to enable blanking of item shelving location on issue.

This patch builds upon the functionality implemented in bug 14576,
by allowing library staff to automatically change the item shelving
location of items which are circulated.

In the case of this patch it automatically blanks the item shelving locations of items
when they are issued if the
BlankItemLocationOnCheckout syspref is enabled.

t/db_dependent/Circulation/issue.t contains tests for
BlankItemLocationOnCheckout.

Test plan:
1. Create a new biblio and associated item and set the value of the
shelving location for the item to 'CART'
2. Checkout the item to a user and notice that the status does not
change
3. Apply patches on bug report 14576, and this patch, and run ./updatedatabase.pl inside the koha shell
4. Now return the checked out item (when you updated the database you
added one new syspref: UpdateItemLocationOnCheckout which is off by default)
5. Check the item out again and notice the shelving location is not
changed, showing that when the UpdateItemLocationOnCheckout is not
enabled and the shelving location is not changed upon issue.
6. Enable the aforementioned syspref in the Administration->Global
system preferences->Circulation interface
7. Check out the item and notice the shelving location is changed to no
value, showing when the UpdateItemLocationOnCheckout syspref is enabled
it blanks the shelving location on the issue of an item.
8. Run t/db_dependent/Circulation/issue.t

Sponsored-By: Toi Ohomai Institute of Technology, New Zealand
Comment 18 Alex Buckley 2018-10-19 01:35:47 UTC
Created attachment 80895 [details] [review]
Bug 21159: Corrected typo

Same test plan as first patch.

Sponsored-By: Toi Ohomai Institute of Technology, New Zealand
Comment 19 Alex Buckley 2018-10-19 01:37:23 UTC
Newly rebased patches. Also fixed warnings from qa test tool.

As testing this is reliant on bug 14576 (currently set to 'patch doesnt apply' you may need to wait for the patches on 14576 to be rebased before testing this.
Comment 20 Brian 2019-01-09 23:53:34 UTC
Any updates on bug 21159?

Carnegie team
Comment 21 Hayley Mapley 2019-03-26 21:58:14 UTC
Created attachment 87037 [details] [review]
Bug 21159 - Implementing 2 sysprefs to enable blanking location

This patch introduces two new system preferences:
BlankingShelvingLocationOnIssue and BlankingShelvingLocationOnReturn. By
default both are off.

If BlankingShelvingLocationOnIssue is enabled then when an item is
issued it's shelving location 952$c field will be set to '' in
C4::Items->BlankShelvingLocation()

If BlankingShelvingLocationOnReturn is enabled then when an item is
returned it's shelving location field will be set to '' in
C4::Items->BlankShelvingLocation().

t/db_dependent/Circulation/issue.t contains tests for
BlankShelvingLocationOnIssue

t/db_dependen/Circulation/Returns.t contains tests for
BlankShelvingLocationOnReturn

Test plan:
1. Create a new biblio and associated item and set the value of the
shelving location for the item to 'CART'
2. Checkout the item to a user and notice that the status does not
change
3. Apply patch, and run ./updatedatabase.pl inside the koha shell
4. Now return the checked out item (when you updated the database
you added two new sysprefs: BlankShelvingLocationOnIssue and
BlankShelvingLocationOnReturn both of which are off by
default)
5. Notice the shelving location has not changed, showing with the
BlankShelvingLocationOnReturn syspref not enabled the shelving
location is not changed upon return
6. Check the item out again and notice the shelving location is not
changed, showing that when the BlankShelvingLocationOnIssue is not
enabled the shelving location is not changed upon issue.
7. Enable both aforementioned sysprefs in the Administration->Global
system preferences->Circulation interface
8. Return the item and notice the Shelving location has changed from
'Cart' to no value, showing when the BlankShelvingLocationOnReturn
syspref is enabled it blanks the shelving location value on the
return of the item
9. Edit the item changing the shelving location back to 'Shelving
Trolley'(CART)
10. Check out the item and notice the shelving location is changed
to no value, showing when the BlankShelvingLocationOnIssue syspref
is enabled it blanks the shelving location on the issue of an item.
11. Run t/db_dependent/Circulation/Returns.t
12. Run t/db_dependent/Circulation/issue.t

Sponsored-By: Toi Ohomai Institute of Technology, New Zealand
Comment 22 Hayley Mapley 2019-03-26 21:59:25 UTC
Created attachment 87038 [details] [review]
Bug 21159 - Corrected typo

Same test plan as first patch.

Sponsored-By: Toi Ohomai Institute of Technology, New Zealand
Comment 23 Hayley Mapley 2019-03-27 01:12:16 UTC
Created attachment 87041 [details] [review]
Bug 21159: (follow up) Fixed broken indentation in circulation. pref

Test plan:
Same as comment 21.

Sponsored-by: Catalyst IT
Comment 24 Liz Rea 2019-03-29 15:53:03 UTC
I'm a little confused - one of Alex's patches builds on bug 14576, but Hayley's seems to want us to test the 2 sysprefs? It looks like it might just be a commit message problem - i.e. we need alex's test plan, and this most recently rebased patch to be put together.

Have a look? I'm happy to test this once I know all the bits are in the right order. :)

Liz
Comment 25 Hayley Mapley 2019-04-02 20:54:45 UTC
(In reply to Liz Rea from comment #24)
> I'm a little confused - one of Alex's patches builds on bug 14576, but
> Hayley's seems to want us to test the 2 sysprefs? It looks like it might
> just be a commit message problem - i.e. we need alex's test plan, and this
> most recently rebased patch to be put together.
> 
> Have a look? I'm happy to test this once I know all the bits are in the
> right order. :)
> 
> Liz

Hi Liz,

I think what happened here is I squashed the commits for simplicity, but used the first patch to squash them into rather than the follow up patch which builds on 14576. The behaviour should be the same, and testing should follow Comment 11. :)
Comment 26 Liz Rea 2019-04-10 01:41:12 UTC
Hi Hayley,

Cool, I"ll test it and if it looks all good will see if I can't get the right commit message into the patch. :)

Thanks for clearing that up!

Cheers,
Liz
Comment 27 Liz Rea 2019-04-10 01:53:49 UTC
Created attachment 87693 [details] [review]
Bug 21159 - Implementing syspref to enable blanking of item shelving location on issue. This patch builds upon the functionality implemented in bug 14576,      by allowing library staff to automatically change the item shelving      location of items whic

In the case of this patch it automatically blanks the item shelving
     locations of items
     when they are issued if the
     BlankItemLocationOnCheckout syspref is enabled.

     t/db_dependent/Circulation/issue.t contains tests for
     BlankItemLocationOnCheckout.

     Test plan:
     1. Create a new biblio and associated item and set the value of the
     shelving location for the item to 'CART'
     2. Checkout the item to a user and notice that the status does not
     change
     3. Apply patches on bug report 14576, and this patch, and run
     ./updatedatabase.pl inside the koha shell
     4. Now return the checked out item (when you updated the database
             you
             added one new syspref: UpdateItemLocationOnCheckout which
             is off by default)
     5. Check the item out again and notice the shelving location is not
     changed, showing that when the UpdateItemLocationOnCheckout is not
     enabled and the shelving location is not changed upon issue.
     6. Enable the aforementioned syspref in the Administration->Global
     system preferences->Circulation interface
     7. Check out the item and notice the shelving location is changed
     to no
     value, showing when the UpdateItemLocationOnCheckout syspref is
     enabled
     it blanks the shelving location on the issue of an item.
     8. Run t/db_dependent/Circulation/issue.t

     Sponsored-By: Toi Ohomai Institute of Technology, New Zealand

https://bugs.koha-community.org/show_bug.cgi?id=18888
Comment 28 Liz Rea 2019-04-10 01:53:53 UTC
Created attachment 87694 [details] [review]
Bug 21159 - Corrected typo

Same test plan as first patch.

Sponsored-By: Toi Ohomai Institute of Technology, New Zealand

https://bugs.koha-community.org/show_bug.cgi?id=18888
Comment 29 Liz Rea 2019-04-10 01:53:57 UTC
Created attachment 87695 [details] [review]
Bug 21159: (follow up) Fixed broken indentation in circulation. pref

Test plan:
Same as comment 21.

Sponsored-by: Catalyst IT

https://bugs.koha-community.org/show_bug.cgi?id=18888
Comment 30 Liz Rea 2019-04-10 01:54:40 UTC
Well that commit message is slightly closer anyway. I'll fix it again when I sign it off lol.

Liz
Comment 31 Liz Rea 2019-04-10 14:22:27 UTC
Hi Hayley,

Sorry to say but the tests don't pass, and that's before even testing the functionality itself. It looks to me like they are highlighting a legit problem though (both with the tests, and with the feature).

I'll be on IRC today in your morning and possibly afternoon if you want to talk about anything at all, look me up I'm wizzyrea. :)

Cheers,
Liz
Comment 32 Hayley Mapley 2019-04-11 01:38:19 UTC
(In reply to Liz Rea from comment #31)
> Hi Hayley,
> 
> Sorry to say but the tests don't pass, and that's before even testing the
> functionality itself. It looks to me like they are highlighting a legit
> problem though (both with the tests, and with the feature).
> 
> I'll be on IRC today in your morning and possibly afternoon if you want to
> talk about anything at all, look me up I'm wizzyrea. :)
> 
> Cheers,
> Liz

Hi Liz,

This was the result of me rebasing Alex's patch, and so I fixed the conflicts and attached it with the plan to test it but I ran out of time to do so. Thank you for testing it, it is obviously one I will have to look into further before it can be completed!

Cheers,
Hayley
Comment 33 Katrin Fischer 2019-04-25 13:26:19 UTC
Hi Hayley and Alex, 

bug 14576 was pushed now and I think it would make sense to have a look and make both checkout and checkin features match in functionality.

I am a little worried about the blanking. Usually when CART is used you don't want to blank, but to set back to 'permanent location' (that can be blank if none was assigned before).

There seems to be some mismatch here, as we still have BlankShelvingLocation but then also UpdateItemLocationOnCheckout.

I feel like this needs a bit more work.