To recreate: 1 - Browse to Administration - Item search fields 2 - Add a new search field pointing to a marc field with some known value on a record with items 3 - Browse to Item search 4 - Construct a search using your new field and search 5 - From results click 'Copy shareable link' 6 - Go to the link 7 - No results or wrong results! 8 - Edit the search 9 - Note your custom field is not selected
Created attachment 185391 [details] [review] Bug 40651: Select custom search field if passed in via link This patch checks for a custom field value and preselects it in the dropdown if present To test: 1 - Browse to Administration - Item search fields 2 - Add a new search field pointing to a marc field with some known value on a record with items 3 - Browse to Item search 4 - Construct a search using your new field and search 5 - From results click 'Copy shareable link' 6 - Go to the link 7 - No results or wrong results! 8 - Edit the search 9 - Note your custom field is not selected 10 - Apply patch 11 - Visit the link again 12 - Correct results! 13 - Edit search 14 - Custom field is correctly selected!
Created attachment 185392 [details] [review] Bug 40651: Add a link to manage item search fields When debugging this reported issue, I didn't know where to add these fields, let's make it more obvious for users who can manage those To test: 1 - Be a user who can manage item search fields i.e. have manage_item_search_fields permission 2 - Go to item search 3 - Note a link to Manage item search fields 4 - Confirm it works 5 - Be a user without the permission 6 - Go to item search 7 - There is no link!
Created attachment 185400 [details] [review] Bug 40651: Select custom search field if passed in via link This patch checks for a custom field value and preselects it in the dropdown if present To test: 1 - Browse to Administration - Item search fields 2 - Add a new search field pointing to a marc field with some known value on a record with items 3 - Browse to Item search 4 - Construct a search using your new field and search 5 - From results click 'Copy shareable link' 6 - Go to the link 7 - No results or wrong results! 8 - Edit the search 9 - Note your custom field is not selected 10 - Apply patch 11 - Visit the link again 12 - Correct results! 13 - Edit search 14 - Custom field is correctly selected! Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Created attachment 185401 [details] [review] Bug 40651: Add a link to manage item search fields When debugging this reported issue, I didn't know where to add these fields, let's make it more obvious for users who can manage those To test: 1 - Be a user who can manage item search fields i.e. have manage_item_search_fields permission 2 - Go to item search 3 - Note a link to Manage item search fields 4 - Confirm it works 5 - Be a user without the permission 6 - Go to item search 7 - There is no link! Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Created attachment 185591 [details] [review] Bug 40651: Select custom search field if passed in via link This patch checks for a custom field value and preselects it in the dropdown if present To test: 1 - Browse to Administration - Item search fields 2 - Add a new search field pointing to a marc field with some known value on a record with items 3 - Browse to Item search 4 - Construct a search using your new field and search 5 - From results click 'Copy shareable link' 6 - Go to the link 7 - No results or wrong results! 8 - Edit the search 9 - Note your custom field is not selected 10 - Apply patch 11 - Visit the link again 12 - Correct results! 13 - Edit search 14 - Custom field is correctly selected! Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org> Depends: bug xxxx 14322
Created attachment 185592 [details] [review] Bug 40651: Add a link to manage item search fields When debugging this reported issue, I didn't know where to add these fields, let's make it more obvious for users who can manage those To test: 1 - Be a user who can manage item search fields i.e. have manage_item_search_fields permission 2 - Go to item search 3 - Note a link to Manage item search fields 4 - Confirm it works 5 - Be a user without the permission 6 - Go to item search 7 - There is no link! Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
This makes sense that we need to select the custom field options that are passed in the shareable link. That was not included in bug 14322 originally so I'm really happy to see this fix. The link to manage custom fields is also a nice addition for admins. Thanks everyone! Passing QA.
Nice work everyone! Pushed to main for 25.11