------------ - SYNOPSIS - ------------ When editing items, the shelving locations list does not reflect the shelving locations available for the home branch of the editable item? So if you are editing an item in another branch than the item's homebranch, you have a set of different/wrong shelving locations for the item you are editing, based on the branch where you are logged into, not the item you are editing. This is problematic when we receive and catalog items centrally and then transport them to other libraries. Changing the item editing behaviour to get the available shelving locations based on the item's homebranch instead of the users logged in library. ---------- - DESIGN - ---------- -When loading the koha/cataloguing/additem.pl?op=edititem, check if the item's homebranch exists and load the available shelving locations for the homebranch. -After changing "Permanent location", load new shelving locations based on the homebranch using an AJAX query. ---Only touch the <option value="CART">Book Cart</option> elements to be as unintrusive as possible. -When javascript is disabled, this feature only loads the available shelving locations on page load. ----------------- - IN DISCUSSION - ----------------- -Can this feature be on by default or do we need Yet.Another.System.Preference?
Created attachment 25034 [details] [review] Bug 11676 - Loading shelving locations based on the item's homebranch instead of the user's logged-in branch. For pageload. -Modifies the Koha::GetAuthorisedValues() to support passing a branchcode as a parameter -Modifies cataloguing/additem.pl to find the items.homebranch and pass this to the GetAuthorisedValues(). ------------- - TEST PLAN - ------------- 1. Define shelving locations for a specific branch: Go to Administration -> Authorised values -> category: LOC, Add a new value X specific to branch A, Add a new value Y specific to branch B. 2. Set your logged in library to branch C. 3. Edit an item. Set the Permanent location to branch A. Save the item. 4. Edit the item. Shelving locations has location X selectable in addition to the default ones. Set the Permanent location to branch B. Save the item. 5. Edit the item. Shelving locations has location Y selectable in addition to the default ones. Set the Permanent location to branch C. Save the item. 6. Edit the item. Shelving locations has neither Y or X selectable. Don't save. 7. Set your logged in branch to A. 8. Edit the item. Shelving locations has neither Y or X selectable. Don't save. This is how we do it!
Created attachment 25035 [details] [review] Bug 11676 - Loading shelving locations based on the item's homebranch instead of the user's logged-in branch. Svc AJAX-wrapper. This patch provides a HTTP-interface for the C4::Koha::GetAuthorisedValues() using the existing svc web interface.
Created attachment 25036 [details] [review] Bug 11676 - Loading shelving locations based on the item's homebranch instead of the user's logged-in branch. Javascript bits. Makes the Shelving locations automatically refresh when the "Permanent location" (homebranch) changes.
Created attachment 25060 [details] [review] Bug 11676 - Loading shelving locations based on the item's homebranch instead of the user's logged-in branch. For pageload. -Modifies the Koha::GetAuthorisedValues() to support passing a branchcode as a parameter -Modifies cataloguing/additem.pl to find the items.homebranch and pass this to the GetAuthorisedValues(). ------------- - TEST PLAN - ------------- 1. Define shelving locations for a specific branch: Go to Administration -> Authorised values -> category: LOC, Add a new value X specific to branch A, Add a new value Y specific to branch B. 2. Set your logged in library to branch C. 3. Edit an item. Set the Permanent location to branch A. Save the item. 4. Edit the item. Shelving locations has location X selectable in addition to the default ones. Set the Permanent location to branch B. Save the item. 5. Edit the item. Shelving locations has location Y selectable in addition to the default ones. Set the Permanent location to branch C. Save the item. 6. Edit the item. Shelving locations has neither Y or X selectable. Don't save. 7. Set your logged in branch to A. 8. Edit the item. Shelving locations has neither Y or X selectable. Don't save. This is how we do it!
Created attachment 25061 [details] [review] Bug 11676 - Loading shelving locations based on the item's homebranch instead of the user's logged-in branch. Svc AJAX-wrapper. This patch provides a HTTP-interface for the C4::Koha::GetAuthorisedValues() using the existing svc web interface.
Created attachment 25062 [details] [review] Bug 11676 - Loading shelving locations based on the item's homebranch instead of the user's logged-in branch. Javascript bits. Makes the Shelving locations automatically refresh when the "Permanent location" (homebranch) changes.
Created attachment 25064 [details] [review] Bug 11676 - Loading shelving locations based on the item's homebranch instead of the user's logged-in branch. Svc AJAX-wrapper. This patch provides a HTTP-interface for the C4::Koha::GetAuthorisedValues() using the existing svc web interface.
Created attachment 25065 [details] [review] C4::Auth.pm Documentation improvement check_cookie_auth() didn't describe the content and how to use the permissions hash and I had to rummage through code to figure out how the flags are properly passed. I hope this will help the next one not to take that hit.
Created attachment 26796 [details] [review] Bug 11676 - Loading shelving locations based on stuff. For acquisitions. Found out that there is another way of adding items, which has a different mechanism (datatables yay) of addition, so this feature enables shelving location updating in the newordere Centralized the shelving location fetching code (to koha-to-marc-mapping-api.js) to have a central place to share related features. ------------- - TEST PLAN - ------------- Same as in the first patch, but this time use the neworderempty.pl-script.
Created attachment 26965 [details] [review] Bug 11676 - Loading shelving locations based on stuff. For acquisitions. Found out that there is another way of adding items, which has a different mechanism (datatables yay) of addition, so this feature enables shelving location updating in the newordere Centralized the shelving location fetching code (to koha-to-marc-mapping-api.js) to have a central place to share related features. ------------- - TEST PLAN - ------------- Same as in the first patch, but this time use the neworderempty.pl-script.
This patch doesn't apply with git-bz. I'm not sure if it's a simple conflict or perhaps the patches are out of order? fatal: sha1 information is lacking or useless (koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt). Repository lacks necessary blobs to fall back on 3-way merge. Cannot fall back to three-way merge.
This still doesn't apply, and it is worse now. You would think that someone would have hash referenced the parameters for generate_subfield_form when they added $restrictededition. *sigh*