Created attachment 143367 [details] [review] Bug 32121: Show an alert when adding a checked out item to an item bundle When trying to add a checked out item to an item bundle, an alert message will show up, giving the user a chance to return the item immediately before adding it to the bundle Test plan: 1. Create an item bundle (see bug 28854 comment 458) 2. Create a biblio with one item and check out this item. 3. Try to add the checked out item to the bundle You should see a message saying that the item is checked out. Next to this message should be a button "Check in and add to bundle". 4. Click on the button. There should be a message saying that the item was added to the bundle. 5. Close the modal window and verify that the item was correctly returned and added to the bundle
Created attachment 146017 [details] [review] Bug 32121: Show an alert when adding a checked out item to an item bundle When trying to add a checked out item to an item bundle, an alert message will show up, giving the user a chance to return the item immediately before adding it to the bundle Test plan: 1. Create an item bundle (see bug 28854 comment 458) 2. Create a biblio with one item and check out this item. 3. Try to add the checked out item to the bundle You should see a message saying that the item is checked out. Next to this message should be a button "Check in and add to bundle". 4. Click on the button. There should be a message saying that the item was added to the bundle. 5. Close the modal window and verify that the item was correctly returned and added to the bundle Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 146018 [details] [review] Bug 32121: (QA follow-up) Use error_code rather than key We semi-recently introduced error_code into our error object to allow for translation and code paths for different errors without having to rely on long description string matches. This QA follow-up converts the existing match and new 'key' fields introduced in this patchset to use the updated 'error_code' key. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Sorry I didn't spot this earlier.. great piece of functionality; Had to do a minor rebase to get it to apply clean, nothing too scary. I added a follow-up to convert from 'key' to 'error_code' as that's the direction we're headed I believe. I also far prefer your construction of the result alerts.. makes my code look very amateurish! Regarding choice of 409 vs 400 i'm never sure which to use.. perhaps 409 for 'resolvable conflicts' that trigger the option to resend with a condition and 400 for unresolvable one's where we show a harder error and no inline resolution option? Finally.. tests.. I think we perhaps need some API tests to prevent regressions from creeping in with your addition of a new param on the endpoint?.. I'll leave that one for the QA person.
Created attachment 148659 [details] [review] Bug 32121: Show an alert when adding a checked out item to an item bundle When trying to add a checked out item to an item bundle, an alert message will show up, giving the user a chance to return the item immediately before adding it to the bundle Test plan: 1. Create an item bundle (see bug 28854 comment 458) 2. Create a biblio with one item and check out this item. 3. Try to add the checked out item to the bundle You should see a message saying that the item is checked out. Next to this message should be a button "Check in and add to bundle". 4. Click on the button. There should be a message saying that the item was added to the bundle. 5. Close the modal window and verify that the item was correctly returned and added to the bundle Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 148660 [details] [review] Bug 32121: (QA follow-up) Use error_code rather than key We semi-recently introduced error_code into our error object to allow for translation and code paths for different errors without having to rely on long description string matches. This QA follow-up converts the existing match and new 'key' fields introduced in this patchset to use the updated 'error_code' key. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 148664 [details] [review] Bug 32121: (QA follow-up): Fix unit tests count
Created attachment 148667 [details] [review] Bug 32121: Show an alert when adding a checked out item to an item bundle When trying to add a checked out item to an item bundle, an alert message will show up, giving the user a chance to return the item immediately before adding it to the bundle Test plan: 1. Create an item bundle (see bug 28854 comment 458) 2. Create a biblio with one item and check out this item. 3. Try to add the checked out item to the bundle You should see a message saying that the item is checked out. Next to this message should be a button "Check in and add to bundle". 4. Click on the button. There should be a message saying that the item was added to the bundle. 5. Close the modal window and verify that the item was correctly returned and added to the bundle Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 148668 [details] [review] Bug 32121: (QA follow-up) Use error_code rather than key We semi-recently introduced error_code into our error object to allow for translation and code paths for different errors without having to rely on long description string matches. This QA follow-up converts the existing match and new 'key' fields introduced in this patchset to use the updated 'error_code' key. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 148669 [details] [review] Bug 32121: (QA follow-up): Fix unit tests count Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Pushed to master for 23.05. Nice work everyone, thanks!
Enhancement - not backporting to 22.11.x Nice work everyone!
We've opted to upgrade this to bugfix and backport it now (some parts of it are needed for subsequent bugfixes that we want)
Nice work, thanks everyone! Pushed to 22.11.x for the next release.
Missing dependencies for 22.05.x, no backport