Bug 32335

Summary: Allow stock rotation items to be moved several stages ahead
Product: Koha Reporter: Nick Clemens <nick>
Component: CirculationAssignee: Nick Clemens <nick>
Status: Failed QA --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: gmcharlt, kyle.m.hall, m.de.rooy, martin.renvoize
Version: master   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: Bug 32335: Allow stock rotation items to be advanced when in transit
Bug 32335: Allow stock rotation items to be advanced when in transit

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?