Summary: | Add column sub_location to items table | ||
---|---|---|---|
Product: | Koha | Reporter: | Emmi Takkinen <emmi.takkinen> |
Component: | Database | Assignee: | Emmi Takkinen <emmi.takkinen> |
Status: | Needs Signoff --- | QA Contact: | Testopia <testopia> |
Severity: | enhancement | ||
Priority: | P5 - low | CC: | ahennig, lucas, philip.orr |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Attachments: |
Bug 34142: Add new column sub_location to (deleted)items
Bug 34142: DO NOT PUSH! Schema changes Bug 34142: Add new column sub_location to (deleted)items DO NOT PUSH! Schema changes Bug 34142: Add new column sub_location to (deleted)items DO NOT PUSH! Schema changes DO NOT PUSH! Schema changes Bug 34142: Add new column sub_location to (deleted)items DO NOT PUSH! Schema changes Bug 34142: Add new column sub_location to (deleted)items |
Description
Emmi Takkinen
2023-06-28 10:29:00 UTC
Can you explain how sub_location, location and permanent_location would relate to each other? (In reply to Katrin Fischer from comment #1) > Can you explain how sub_location, location and permanent_location would > relate to each other? For example, some of our libraries use it to mark new material. They're located in e.g. adult section so location and permanent_location are marked as "A". But they also have sub_location "NEW" so they are shelved into a specific place. Or items have sub_location "EXHIBIT" so librarians know where to look for them. Hm, I think this sounds a bit like the temporary location idea that has been discussed in Bug 14962 - Temp Shelving Location Bug 31168 - Temporary Item Locations as New would be temporary. I think some libraries have resolved this by mapping permanent_location to a subfield to make it visible in the items editor. They control them manually then. (In reply to Katrin Fischer from comment #3) > Hm, I think this sounds a bit like the temporary location idea that has been > discussed in > > Bug 14962 - Temp Shelving Location > Bug 31168 - Temporary Item Locations > > as New would be temporary. I think some libraries have resolved this by > mapping permanent_location to a subfield to make it visible in the items > editor. They control them manually then. Yeah some of the locations are temporary. Some other cases might be that library has a sublocation in their storage for specific items. Or then item has shorter loan time and is shelved separately. So those sublocations are more permanent and might never change, but they are not quite the same as permanent location. Created attachment 157299 [details] [review] Bug 34142: Add new column sub_location to (deleted)items Add new column sub_location to items and deleteditems table. Column can be used to indicate e.g. if item has some other more specific location than permanent location. To test: 1) Add new authorized value for sublocation e.g. "SUBLOC" and add some values to it. 2) Add new 952 subfield e.g. S to MARC framework and link your new authorized value "SUBLOC" to it. 3) Link subfield to items.sub_location field in "Koha to MARC mapping" (add 952,S). 4) Find a record and attempt to add new item to it. => Note that new subfield S is now displayed on item form and dropdown selector contains values added to "SUBLOC". => Saving should be successfull. => After saving confirm that sublocation is displayed in its own column in items listing above item form and that sublocation is displayed with correct description. 5) Attempt to modify item. => Confirm that sublocation is displayed and it's correct. 6) Attempt to delete item. => Deleting should be successfull. Sponsored-by: Koha-Suomi Oy Created attachment 157300 [details] [review] Bug 34142: DO NOT PUSH! Schema changes I see the new column in the items table but when I save an item with the new field nothing shows up in items.sub_location. I only see the data in more_subfields_xml. Even after manually adding data to items.sub_location, I don't see the information appearing in circ/returns.tt. On the detail page I see the authorized value code instead of the description. Should sub-location appear in every place where location appears? (if so please see Bug 35059) Should sub-location only display when a location is defined? Shouldn't the new column in the table have the same capacity as items.location? The new one is varchar(10) instead of item.location's varchar(80) (In reply to Owen Leonard from comment #7) > I see the new column in the items table but when I save an item with the new > field nothing shows up in items.sub_location. I only see the data in > more_subfields_xml. > > Even after manually adding data to items.sub_location, I don't see the > information appearing in circ/returns.tt. On the detail page I see the > authorized value code instead of the description. It's hard to say what is going on here. I installed patches from a scratch and everything works as expected when adding new item. But I don't see it on detail page or in returns page. > Should sub-location appear in every place where location appears? (if so > please see Bug 35059) It could, I'll add it after I fix those other pages. > Should sub-location only display when a location is defined? I think it should be displayed even if location is not defined. > Shouldn't the new column in the table have the same capacity as > items.location? The new one is varchar(10) instead of item.location's > varchar(80) I don't see why not. Created attachment 159236 [details] [review] Bug 34142: Add new column sub_location to (deleted)items Add new column sub_location to items and deleteditems table. Column can be used to indicate e.g. if item has some other more specific location than permanent location. To test: 1) Add new authorized value for sublocation e.g. "SUBLOC" and add some values to it. 2) Add new 952 subfield e.g. S to MARC framework and link your new authorized value "SUBLOC" to it. 3) Link subfield to items.sub_location field in "Koha to MARC mapping" (add 952,S). 4) Find a record and attempt to add new item to it. => Note that new subfield S is now displayed on item form and dropdown selector contains values added to "SUBLOC". => Saving should be successfull. => After saving confirm that sublocation is displayed in its own column in items listing above item form and that sublocation is displayed with correct description. 5) Attempt to modify item. => Confirm that sublocation is displayed and it's correct. 6) Attempt to delete item. => Deleting should be successfull. Also confirm that sub location is displayed on these pages: 1) detail.pl 2) moredetail.pl 3. returns.pl Sponsored-by: Koha-Suomi Oy Created attachment 159237 [details] [review] DO NOT PUSH! Schema changes Now I'm facing the same problem as Owen. Update runs as it should, but column isn't added to database. (In reply to Emmi Takkinen from comment #11) > Now I'm facing the same problem as Owen. Update runs as it should, but > column isn't added to database. My bad, for some reason column was already in the table but in wrong place. Failed to merge for me when trying to apply the patch. Needs to be rebased. Created attachment 164875 [details] [review] Bug 34142: Add new column sub_location to (deleted)items Add new column sub_location to items and deleteditems table. Column can be used to indicate e.g. if item has some other more specific location than permanent location. To test: 1) Add new authorized value for sublocation e.g. "SUBLOC" and add some values to it. 2) Add new 952 subfield e.g. S to MARC framework and link your new authorized value "SUBLOC" to it. 3) Link subfield to items.sub_location field in "Koha to MARC mapping" (add 952,S). 4) Find a record and attempt to add new item to it. => Note that new subfield S is now displayed on item form and dropdown selector contains values added to "SUBLOC". => Saving should be successfull. => After saving confirm that sublocation is displayed in its own column in items listing above item form and that sublocation is displayed with correct description. 5) Attempt to modify item. => Confirm that sublocation is displayed and it's correct. 6) Attempt to delete item. => Deleting should be successfull. Also confirm that sub location is displayed on these pages: 1) detail.pl 2) moredetail.pl 3. returns.pl Sponsored-by: Koha-Suomi Oy Created attachment 164876 [details] [review] DO NOT PUSH! Schema changes Created attachment 164877 [details] [review] DO NOT PUSH! Schema changes Created attachment 167714 [details] [review] Bug 34142: Add new column sub_location to (deleted)items Add new column sub_location to items and deleteditems table. Column can be used to indicate e.g. if item has some other more specific location than permanent location. To test: 1) Add new authorized value for sublocation e.g. "SUBLOC" and add some values to it. 2) Add new 952 subfield e.g. S to MARC framework and link your new authorized value "SUBLOC" to it. 3) Link subfield to items.sub_location field in "Koha to MARC mapping" (add 952,S). 4) Find a record and attempt to add new item to it. => Note that new subfield S is now displayed on item form and dropdown selector contains values added to "SUBLOC". => Saving should be successfull. => After saving confirm that sublocation is displayed in its own column in items listing above item form and that sublocation is displayed with correct description. 5) Attempt to modify item. => Confirm that sublocation is displayed and it's correct. 6) Attempt to delete item. => Deleting should be successfull. Also confirm that sub location is displayed on these pages: 1) detail.pl 2) moredetail.pl 3. returns.pl Sponsored-by: Koha-Suomi Oy Signed-off-by: Tadeusz „tadzik” Sośnierz <tadeusz@sosnierz.com> This no longer applies cleanly. If you add a column to the holdings/other holdings table I think it needs to accounted for in columns_settings.yml so it can be properly hidden via Table Settings. Setting to FQA for that. Created attachment 172103 [details] [review] DO NOT PUSH! Schema changes Created attachment 172104 [details] [review] Bug 34142: Add new column sub_location to (deleted)items Add new column sub_location to items and deleteditems table. Column can be used to indicate e.g. if item has some other more specific location than permanent location. To test: 1) Add new authorized value for sublocation e.g. "SUBLOC" and add some values to it. 2) Add new 952 subfield e.g. S to MARC framework and link your new authorized value "SUBLOC" to it. 3) Link subfield to items.sub_location field in "Koha to MARC mapping" (add 952,S). 4) Find a record and attempt to add new item to it. => Note that new subfield S is now displayed on item form and dropdown selector contains values added to "SUBLOC". => Saving should be successfull. => After saving confirm that sublocation is displayed in its own column in items listing above item form and that sublocation is displayed with correct description. 5) Attempt to modify item. => Confirm that sublocation is displayed and it's correct. 6) Attempt to delete item. => Deleting should be successfull. Also confirm that sub location is displayed on these pages: 1) detail.pl 2) moredetail.pl 3. returns.pl Sponsored-by: Koha-Suomi Oy Signed-off-by: Tadeusz „tadzik” Sośnierz <tadeusz@sosnierz.com> (In reply to Lucas Gass from comment #18) > This no longer applies cleanly. > > If you add a column to the holdings/other holdings table I think it needs to > accounted for in columns_settings.yml so it can be properly hidden via Table > Settings. Setting to FQA for that. Rebased patches against current master. Sublocation isn't added to its own column in those tables. It's added in the same column as home library (same as permanent location), so I don't think there is need to include to the columns_settings.yml. |