Bug 32335 - Allow stock rotation items to be moved several stages ahead
Summary: Allow stock rotation items to be moved several stages ahead
Status: Needs documenting
Alias: None
Product: Koha
Classification: Unclassified
Component: Cataloging (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Nick Clemens
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-11-23 13:22 UTC by Nick Clemens
Modified: 2023-11-30 16:35 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
23.11.00


Attachments
Bug 32335: Allow stock rotation items to be advanced when in transit (2.27 KB, patch)
2022-11-23 13:28 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 32335: Allow stock rotation items to be advanced when in transit (2.34 KB, patch)
2022-11-23 13:37 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 32335: Allow stock rotation items to be advanced when in transit (2.34 KB, patch)
2023-03-27 10:05 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 32335: Allow stock rotation items to be advanced when in transit (2.94 KB, patch)
2023-03-27 10:28 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 32335: Allow stock rotation items to be advanced when in transit (2.98 KB, patch)
2023-05-19 18:06 UTC, Sam Lau
Details | Diff | Splinter Review
Bug 32335: Allow stock rotation items to be advanced when in transit (3.04 KB, patch)
2023-09-07 15:47 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 32335: (QA follow-up) Add 'Actions' label to 'Actions' column (1.77 KB, patch)
2023-09-07 15:47 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 32335: (QA follow-up) Add 'btn-primary' instead of 'btn-default' class to dialog Save buttons (2.27 KB, patch)
2023-09-07 15:47 UTC, Pedro Amorim
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Clemens 2022-11-23 13:22:39 UTC
Currently when an item is added to stock rotation it can only be moved ahaead one stage, then the transfer must be filled to allow moving to the next stage.

Some libraries will want to add an item to a rotation, and move it ahead to 'catch-up' with other items.
Comment 1 Nick Clemens 2022-11-23 13:28:10 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
Comment 2 Martin Renvoize 2022-11-23 13:37:34 UTC
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>
Comment 3 Martin Renvoize 2022-11-23 13:38:48 UTC
Nice, discussed with Nick, and I am happy this change doesn't affect the logic in any detrimental way :)

Signing off.
Comment 4 Katrin Fischer 2022-11-27 21:44:34 UTC
Sounds more like an enh than a bug?
Comment 5 Marcel de Rooy 2023-01-27 09:20:18 UTC
                                                 [% IF !in_transit && stages.size > 1 %]
                                                     <a class="btn btn-default btn-xs" href="?op=move_to_next_stage&amp;rota_id=[% rota.id | uri %]&amp;item_id=[% sritem.id | uri %]&amp;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&amp;rota_id=[% rota.id | uri %]&amp;item_id=[% sritem.id | uri %]&amp;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.
Comment 6 Martin Renvoize 2023-01-27 11:23:12 UTC
Sorry Marcel, I'm not sure I understand your question here.. could you clarify what you mean?
Comment 7 Marcel de Rooy 2023-01-30 10:46:29 UTC
(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?
Comment 8 Nick Clemens 2023-03-27 10:05:33 UTC
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>
Comment 9 Nick Clemens 2023-03-27 10:28:46 UTC
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
Comment 10 Sam Lau 2023-05-19 18:06:00 UTC
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>
Comment 11 Pedro Amorim 2023-09-07 15:47:47 UTC
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>
Comment 12 Pedro Amorim 2023-09-07 15:47:50 UTC
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>
Comment 13 Pedro Amorim 2023-09-07 15:47:53 UTC
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>
Comment 14 Tomás Cohen Arazi 2023-10-11 13:34:06 UTC
Pushed to master for 23.11.

Nice work everyone, thanks!
Comment 15 Fridolin Somers 2023-10-12 21:06:45 UTC
Enhancement not pushed to 23.05.x