Description
Nick Clemens (kidclamp)
2022-11-23 13:22:39 UTC
Created attachment 144204 [details] [review] Bug 32335: Allow stock rotation items to be advanced when in transit This patch simply removes the disabling of the 'Move to next stage' button and adds a title to let the librarian know the item is in transit To test: 1 - Setup a rota with multiple stages 2 - Add an item 3 - Advance to next stage 4 - Observe 'Move to next stage' button is disabled 5 - Check item in at destination 6 - Reload rota - observe 'Move to next stage' is enabled 7 - Apply patch 8 - Click 'Move to next stage' 9 - Note button is not disabled 10 - Hover and confirm note about transit 11 - Click 'Move to next stage' 12 - Checkin item at wrong branch, confirm it is correctly directed to correct stage Created attachment 144206 [details] [review] Bug 32335: Allow stock rotation items to be advanced when in transit This patch simply removes the disabling of the 'Move to next stage' button and adds a title to let the librarian know the item is in transit To test: 1 - Setup a rota with multiple stages 2 - Add an item 3 - Advance to next stage 4 - Observe 'Move to next stage' button is disabled 5 - Check item in at destination 6 - Reload rota - observe 'Move to next stage' is enabled 7 - Apply patch 8 - Click 'Move to next stage' 9 - Note button is not disabled 10 - Hover and confirm note about transit 11 - Click 'Move to next stage' 12 - Checkin item at wrong branch, confirm it is correctly directed to correct stage Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Nice, discussed with Nick, and I am happy this change doesn't affect the logic in any detrimental way :) Signing off. Sounds more like an enh than a bug? [% IF !in_transit && stages.size > 1 %] <a class="btn btn-default btn-xs" href="?op=move_to_next_stage&rota_id=[% rota.id | uri %]&item_id=[% sritem.id | uri %]&stage_id=[% sritem.stage.stage_id | uri %]"> [% ELSE %] - <a class="btn btn-default btn-xs" disabled> + <a class="btn btn-default btn-xs" href="?op=move_to_next_stage&rota_id=[% rota.id | uri %]&item_id=[% sritem.id | uri %]&stage_id=[% sritem.stage.stage_id | uri %]" title="Item is in transit, it will be directed to new stage when checked in"> [% END %] Just looking at this code. I am wondering how you could say that the item is in transit? Since we also have the stages.size condition ! Needs feedback. Sorry Marcel, I'm not sure I understand your question here.. could you clarify what you mean? (In reply to Martin Renvoize from comment #6) > Sorry Marcel, I'm not sure I understand your question here.. could you > clarify what you mean? Compare if-condition with comment in else branch. If A and B does not mean that A is false in the else. B could be false? Created attachment 148747 [details] [review] Bug 32335: Allow stock rotation items to be advanced when in transit This patch simply removes the disabling of the 'Move to next stage' button and adds a title to let the librarian know the item is in transit To test: 1 - Setup a rota with multiple stages 2 - Add an item 3 - Advance to next stage 4 - Observe 'Move to next stage' button is disabled 5 - Check item in at destination 6 - Reload rota - observe 'Move to next stage' is enabled 7 - Apply patch 8 - Click 'Move to next stage' 9 - Note button is not disabled 10 - Hover and confirm note about transit 11 - Click 'Move to next stage' 12 - Checkin item at wrong branch, confirm it is correctly directed to correct stage Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Created attachment 148748 [details] [review] Bug 32335: Allow stock rotation items to be advanced when in transit This patch adjusts the logic so that we check: 1 - If there are less than 2 stages we disable the 'Move to next stage' button 2 - If the item is not in transit, we show move to next normally 3 - If the item is in transit (and there is more than 1 stage) the button is enabled with a note about transfer To test: 1 - Setup a rota with multiple stages 2 - Add an item 3 - Advance to next stage 4 - Observe 'Move to next stage' button is disabled 5 - Check item in at destination 6 - Reload rota - observe 'Move to next stage' is enabled 7 - Apply patch 8 - Click 'Move to next stage' 9 - Note button is not disabled 10 - Hover and confirm note about transit 11 - Click 'Move to next stage' 12 - Checkin item at wrong branch, confirm it is correctly directed to correct stage Created attachment 151491 [details] [review] Bug 32335: Allow stock rotation items to be advanced when in transit This patch adjusts the logic so that we check: 1 - If there are less than 2 stages we disable the 'Move to next stage' button 2 - If the item is not in transit, we show move to next normally 3 - If the item is in transit (and there is more than 1 stage) the button is enabled with a note about transfer To test: 1 - Setup a rota with multiple stages 2 - Add an item 3 - Advance to next stage 4 - Observe 'Move to next stage' button is disabled 5 - Check item in at destination 6 - Reload rota - observe 'Move to next stage' is enabled 7 - Apply patch 8 - Click 'Move to next stage' 9 - Note button is not disabled 10 - Hover and confirm note about transit 11 - Click 'Move to next stage' 12 - Checkin item at wrong branch, confirm it is correctly directed to correct stage Signed-off-by: Sam Lau <samalau@gmail.com> Created attachment 155322 [details] [review] Bug 32335: Allow stock rotation items to be advanced when in transit This patch adjusts the logic so that we check: 1 - If there are less than 2 stages we disable the 'Move to next stage' button 2 - If the item is not in transit, we show move to next normally 3 - If the item is in transit (and there is more than 1 stage) the button is enabled with a note about transfer To test: 1 - Setup a rota with multiple stages 2 - Add an item 3 - Advance to next stage 4 - Observe 'Move to next stage' button is disabled 5 - Check item in at destination 6 - Reload rota - observe 'Move to next stage' is enabled 7 - Apply patch 8 - Click 'Move to next stage' 9 - Note button is not disabled 10 - Hover and confirm note about transit 11 - Click 'Move to next stage' 12 - Checkin item at wrong branch, confirm it is correctly directed to correct stage Signed-off-by: Sam Lau <samalau@gmail.com> Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com> Created attachment 155323 [details] [review] Bug 32335: (QA follow-up) Add 'Actions' label to 'Actions' column Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com> Created attachment 155324 [details] [review] Bug 32335: (QA follow-up) Add 'btn-primary' instead of 'btn-default' class to dialog Save buttons Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com> Pushed to master for 23.11. Nice work everyone, thanks! Enhancement not pushed to 23.05.x |