Bug 9525 - Add option to define float groups and rules for float
Summary: Add option to define float groups and rules for float
Status: Needs documenting
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: Main
Hardware: All All
: P5 - low new feature (vote)
Assignee: Emmi Takkinen
QA Contact: Nick Clemens
URL:
Keywords:
Depends on: 14187 14188
Blocks:
  Show dependency treegraph
 
Reported: 2013-01-31 20:25 UTC by Nicole C. Engard
Modified: 2023-11-30 15:39 UTC (History)
16 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Large patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
This feature makes it possible to use library groups for creating floating groups. It adds a checkbox "Is local float group" to the library groups configuration and a new return policy "Item floats by librarygroup" to the circulation conditions.
Version(s) released in:
23.11.00


Attachments
Bug 9525 - group floating rules (82.98 KB, patch)
2015-06-10 13:59 UTC, Olli-Antti Kivilahti
Details | Diff | Splinter Review
Admin menu screenshot, how to navigate to the control panel (93.62 KB, image/png)
2015-06-12 12:22 UTC, Olli-Antti Kivilahti
Details
The floating matrix control panel where you configure the 4 types of floating between routes. (168.92 KB, image/png)
2015-06-12 12:22 UTC, Olli-Antti Kivilahti
Details
Bug 9525 - group floating rules, floating rule tester :) (7.68 KB, patch)
2015-11-11 13:12 UTC, Olli-Antti Kivilahti
Details | Diff | Splinter Review
Bug 9525 - group floating rules, floating rule tester :) (9.71 KB, patch)
2015-11-11 13:14 UTC, Olli-Antti Kivilahti
Details | Diff | Splinter Review
Bug 9525 - group floating rules, CGI doesn't understand DELETE at all. (1.20 KB, patch)
2015-11-11 13:42 UTC, Olli-Antti Kivilahti
Details | Diff | Splinter Review
Bug 9525 - group floating rules - added logging ALWAYS and CODITIONAL floats. (1.88 KB, patch)
2016-02-23 09:54 UTC, Olli-Antti Kivilahti
Details | Diff | Splinter Review
Bug 9525: Group floating rules (71.49 KB, patch)
2020-03-10 08:29 UTC, Emmi Takkinen
Details | Diff | Splinter Review
Bug 9525: Fixing floating on return (2.75 KB, patch)
2020-03-10 08:46 UTC, Emmi Takkinen
Details | Diff | Splinter Review
Bug 9525: Add support for regexps in conditional floating clauses (11.57 KB, patch)
2020-03-10 08:49 UTC, Emmi Takkinen
Details | Diff | Splinter Review
Bug 9525: Group floating rules (73.51 KB, patch)
2020-03-16 12:13 UTC, Emmi Takkinen
Details | Diff | Splinter Review
Bug 9525: Fixing floating on return (2.74 KB, patch)
2020-03-16 12:13 UTC, Emmi Takkinen
Details | Diff | Splinter Review
Bug 9525: Add support for regexps in conditional floating (11.57 KB, patch)
2020-03-16 12:14 UTC, Emmi Takkinen
Details | Diff | Splinter Review
Bug 9525: Group floating rules (68.98 KB, patch)
2020-04-28 07:54 UTC, Emmi Takkinen
Details | Diff | Splinter Review
Bug 9525: Schema changes - DO NOT PUSH (4.23 KB, patch)
2020-04-28 07:54 UTC, Emmi Takkinen
Details | Diff | Splinter Review
Bug 9525: Fixing floating on return (2.07 KB, patch)
2020-04-28 07:55 UTC, Emmi Takkinen
Details | Diff | Splinter Review
Bug 9525: Add support for regexps in conditional floating clauses (11.57 KB, patch)
2020-04-28 07:56 UTC, Emmi Takkinen
Details | Diff | Splinter Review
Bug 9525: Group floating rules (69.00 KB, patch)
2020-10-27 10:58 UTC, Emmi Takkinen
Details | Diff | Splinter Review
Bug 9525: Schema changes - DO NOT PUSH (4.23 KB, patch)
2020-10-27 10:58 UTC, Emmi Takkinen
Details | Diff | Splinter Review
Bug 9525: Fixing floating on return (2.08 KB, patch)
2020-10-27 10:59 UTC, Emmi Takkinen
Details | Diff | Splinter Review
Bug 9525: Add support for regexps in conditional floating clauses (11.57 KB, patch)
2020-10-27 11:00 UTC, Emmi Takkinen
Details | Diff | Splinter Review
Bug 9525: Add ft_local_float_group column (2.46 KB, patch)
2021-09-13 07:18 UTC, Emmi Takkinen
Details | Diff | Splinter Review
Bug 9525: DO NOT PUSH! Schema update (3.07 KB, patch)
2021-09-13 07:19 UTC, Emmi Takkinen
Details | Diff | Splinter Review
Bug 9525: Add option to define float groups and rules for float (18.03 KB, patch)
2021-09-13 07:20 UTC, Emmi Takkinen
Details | Diff | Splinter Review
Bug 9525: Add ft_local_float_group column (2.47 KB, patch)
2022-04-07 10:16 UTC, Emmi Takkinen
Details | Diff | Splinter Review
Bug 9525: DO NOT PUSH! Schema update (3.07 KB, patch)
2022-04-07 10:17 UTC, Emmi Takkinen
Details | Diff | Splinter Review
Bug 9525: Add option to define float groups and rules for float (18.01 KB, patch)
2022-04-07 10:17 UTC, Emmi Takkinen
Details | Diff | Splinter Review
Bug 9525: Add ft_local_float_group column (2.52 KB, patch)
2022-08-11 15:57 UTC, ByWater Sandboxes
Details | Diff | Splinter Review
Bug 9525: DO NOT PUSH! Schema update (3.12 KB, patch)
2022-08-11 15:57 UTC, ByWater Sandboxes
Details | Diff | Splinter Review
Bug 9525: Add option to define float groups and rules for float (18.07 KB, patch)
2022-08-11 15:57 UTC, ByWater Sandboxes
Details | Diff | Splinter Review
Bug 9525: Add ft_local_float_group column (2.53 KB, patch)
2022-11-11 07:26 UTC, Emmi Takkinen
Details | Diff | Splinter Review
Bug 9525: DO NOT PUSH! Schema update (3.13 KB, patch)
2022-11-11 07:26 UTC, Emmi Takkinen
Details | Diff | Splinter Review
Bug 9525: Add option to define float groups and rules for float (17.92 KB, patch)
2022-11-11 07:27 UTC, Emmi Takkinen
Details | Diff | Splinter Review
Bug 9525: Fix tests (2.61 KB, patch)
2022-11-11 07:28 UTC, Emmi Takkinen
Details | Diff | Splinter Review
Bug 9525: Add ft_local_float_group column (2.58 KB, patch)
2023-04-26 15:08 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 9525: Add option to define float groups and rules for float (18.32 KB, patch)
2023-04-26 15:08 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 9525: Fix tests (2.66 KB, patch)
2023-04-26 15:08 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 9525: DO NOT PUSH! Schema update (1.65 KB, patch)
2023-04-26 15:08 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 9525: (QA follow-up) Fix QA complaints (2.12 KB, patch)
2023-04-26 15:08 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 9525: (QA follow-up) Clarify how float groups are selected in circulation rules (1.58 KB, patch)
2023-04-26 15:08 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 9525: Add ft_local_float_group column (2.58 KB, patch)
2023-09-28 14:12 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 9525: Add option to define float groups and rules for float (18.34 KB, patch)
2023-09-28 14:12 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 9525: Fix tests (2.66 KB, patch)
2023-09-28 14:12 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 9525: DO NOT PUSH! Schema update (3.96 KB, patch)
2023-09-28 14:12 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 9525: (QA follow-up) Fix QA complaints (2.12 KB, patch)
2023-09-28 14:12 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 9525: (QA follow-up) Clarify how float groups are selected in circulation rules (1.58 KB, patch)
2023-09-28 14:12 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 9525: (QA follow-up) Tidy (11.56 KB, patch)
2023-09-28 14:12 UTC, Nick Clemens
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Nicole C. Engard 2013-01-31 20:25:28 UTC
It would be handy if you could create groups for floating rules. Right now you can set an item type to float in the circ and fine rules, but there is no way to specific which branches it floats between. This would be a development for consortia so that nearby libraries can have floating collections but not necessarily the entire system.
Comment 1 Olli-Antti Kivilahti 2015-05-07 09:33:52 UTC
We need the same thing ASAP.
We just added a few bookmobiles which need floating between their parent libraries and are shifting priorities to try to solve this issue ASAP.
This is an awkward pending issue for us and hopefully I can deliver an acceptable solution soon.
Comment 2 Olli-Antti Kivilahti 2015-06-10 13:59:47 UTC
Created attachment 40077 [details] [review]
Bug 9525 - group floating rules

Cucumber integration tests included.
run t/Cucumber/runCucumberTests.pl --tags @floatingMatrix
Comment 3 Bernardo Gonzalez Kriegel 2015-06-12 11:51:46 UTC
Hi, nice feature!
Can you please add a test plan?

Also some files need a Licence and others need an updated one (from 2 -> 3)
Comment 4 Olli-Antti Kivilahti 2015-06-12 12:00:54 UTC
Hi Bernardo.

Sorry I must focus on other things. I am happy I even managed to rebase and push all things to bugzilla.
If you like it, you can write a test plan.
Tho I am 100% sure the dependencies will go stale in 1 week and then nobody but a programmer can test this :)

And that kind of testing implies a code review.
Comment 5 Olli-Antti Kivilahti 2015-06-12 12:01:11 UTC
But it is a nice feature and works remarkably well for us.
Comment 6 Bernardo Gonzalez Kriegel 2015-06-12 12:12:14 UTC
(In reply to Olli-Antti Kivilahti from comment #5)
> But it is a nice feature and works remarkably well for us.

Great :)

Is it possible a short description of the use case scenario?
Comment 7 Olli-Antti Kivilahti 2015-06-12 12:22:02 UTC
Created attachment 40102 [details]
Admin menu screenshot, how to navigate to the control panel
Comment 8 Olli-Antti Kivilahti 2015-06-12 12:22:40 UTC
Created attachment 40103 [details]
The floating matrix control panel where you configure the 4 types of floating between routes.
Comment 9 Olli-Antti Kivilahti 2015-06-12 12:24:45 UTC
This screenshot:
The floating matrix control panel where you configure the 4 types of floating between routes.

Explains how to use this feature.



Then just check-in Items and they float based on the rules.

If you don't want to use this feature, don't set any floating routes and it is completely unintrusive.
Comment 10 Olli-Antti Kivilahti 2015-06-12 12:25:15 UTC
Thanks for pushing Bernardo.

I hope images are worth more than 100 words ;)
Comment 11 Olli-Antti Kivilahti 2015-06-29 11:05:43 UTC
In production for ~3 weeks. Working fine and helping a lot!
Comment 12 Mirko Tietgen 2015-07-03 08:22:46 UTC
Would test if it had a test plan.
Comment 13 Olli-Antti Kivilahti 2015-07-03 09:36:45 UTC
+-----------------------------+
| USAGE TIPS (sorry didn't document these in the GUI |
+-----------------------------+

When modifying a floating route rule, pressing "%" accepts the modification and pressing "V" cancels the modifications and reverts the old rule.
The empty text box in the center of the route rule (under the floating type dropdown list) is the box for conditional rules, where you put the logical expression.

+-----------------------------+
| SETTING UP THE TEST CONTEXT |
+-----------------------------+

-2. Set syspref "HomeOrHoldingBranchReturn" to homebranch.
-1. Find an Item, which can be circulated freely, and has homebranch B and
    any holdingbranch.
0. Read the instructions at admin/floating-matrix.pl.

+-----------+
| TEST PLAN: Disabled floating:
+-----------+

0. Make sure that the floating rules from branch A to branch B (A -> B) are
   "Disabled" and vice versa (B -> A).
1. Set your current library to A.
2. Check-in the Item.
3. Observe the started transport to branch B.
4. Set your current library to B.
5. Check-in to receive the transfer.

+-----------+
| TEST PLAN: Always floating:
+-----------+

0. Make sure that the floating rules from branch A to branch B (A -> B) are
   "Allowed".
1. Set your current library to A.
2. Check-in the Item.
3. Observe that there is not transport prompt to branch B and the Item is not
   "in-transit" -state.

+-----------+
| TEST PLAN: Possibly floating:
+-----------+

0. Make sure that the floating rules from branch A to branch B (A -> B) are
   "Possible".
1. Set your current library to A.
2. Check-in the Item.
3. Observe that there is a transport prompt to branch B. You can decide if you
   want to transfer or no.

+-----------+
| TEST PLAN: Conditional floating:
+-----------+

0. Same as Always floating if the given condition matches. See the feature description at admin/floating-matrix.pl explaining Conditional floating.
Comment 14 Olli-Antti Kivilahti 2015-11-11 13:12:47 UTC Comment hidden (obsolete)
Comment 15 Olli-Antti Kivilahti 2015-11-11 13:14:30 UTC
Created attachment 44756 [details] [review]
Bug 9525 - group floating rules, floating rule tester :)
Comment 16 Olli-Antti Kivilahti 2015-11-11 13:42:52 UTC
Created attachment 44760 [details] [review]
Bug 9525 - group floating rules, CGI doesn't understand DELETE at all.

instead of DELETE we GET the delete request so CGI works with it.
Comment 17 Nicole C. Engard 2016-01-25 20:43:22 UTC
40077 - Bug 9525 - group floating rules
44756 - Bug 9525 - group floating rules, floating rule tester :)
44760 - Bug 9525 - group floating rules, CGI doesn't understand DELETE at all.

Apply? [(y)es, (n)o, (i)nteractive] y
Applying: Bug 9525 - group floating rules
fatal: sha1 information is lacking or useless (C4/Circulation.pm).
Repository lacks necessary blobs to fall back on 3-way merge.
Cannot fall back to three-way merge.
Patch failed at 0001 Bug 9525 - group floating rules
When you have resolved this problem run "git bz apply --continue".
If you would prefer to skip this patch, instead run "git bz apply --skip".
To restore the original branch and stop patching run "git bz apply --abort".
Patch left in /tmp/Bug-9525---group-floating-rules-MxbdS8.patch
Comment 18 Olli-Antti Kivilahti 2016-02-08 13:58:31 UTC
Hi!

This feature work really well :) :) :)

We are going to rebase it this summer (hopefully)
Comment 19 Olli-Antti Kivilahti 2016-02-23 09:54:31 UTC
Created attachment 48310 [details] [review]
Bug 9525 - group floating rules - added logging ALWAYS and CODITIONAL floats.

SELECT * FROM action_logs WHERE module = "FLOATING";
Comment 20 Olli-Antti Kivilahti 2017-01-16 14:14:31 UTC
Latest code for this feature can be found from our GitHub:
https://github.com/KohaSuomi/kohasuomi

Look for commits starting with the tag "Bug 9525 - "

We are porting all our code to master presently and hopefully by Q1 2017 we have updated patches here in Bugzilla.

Looks like this needs to be rebased to the REST API as well.
Comment 21 Emmi Takkinen 2020-03-10 08:29:56 UTC
Created attachment 100420 [details] [review]
Bug 9525: Group floating rules

Rebased with latest version from https://github.com/KohaSuomi/kohasuomi. Patch combines all previously made patches for this feature.
 
To test follow test plan in comment 13.
Comment 22 Emmi Takkinen 2020-03-10 08:46:42 UTC
Created attachment 100421 [details] [review]
Bug 9525: Fixing floating on return
Comment 23 Emmi Takkinen 2020-03-10 08:49:13 UTC
Created attachment 100422 [details] [review]
Bug 9525: Add support for regexps in conditional floating clauses
Comment 24 Owen Leonard 2020-03-11 13:21:52 UTC
I got a couple of conflicts when applying these patches but was able to resolve them. However, I get an error when running the database update:

ERROR 1005 (HY000): Can't create table 'koha_kohadev.floating_matrix' (errno: 150)
Comment 25 Owen Leonard 2020-03-11 13:26:52 UTC
(In reply to Owen Leonard from comment #24)
> ERROR 1005 (HY000): Can't create table 'koha_kohadev.floating_matrix'
> (errno: 150)

Is this because I was supposed to apply the last three patches on top of the remote github branch? 

> Look for commits starting with the tag "Bug 9525 - "

Sorry I don't know what this means. I'm accustomed to seeing a separate testing branch.
Comment 26 Emmi Takkinen 2020-03-12 08:02:21 UTC
(In reply to Owen Leonard from comment #25)
> (In reply to Owen Leonard from comment #24)
> > ERROR 1005 (HY000): Can't create table 'koha_kohadev.floating_matrix'
> > (errno: 150)
Hm, it seems I missed that in kohastructure.pl there was: 
ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci

instead of:
ENGINE = InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci

That's likely the issue here. I'll recheck patches for any other possible problems and reattach them later.    

> Is this because I was supposed to apply the last three patches on top of the
> remote github branch? 
> > Look for commits starting with the tag "Bug 9525 - "
> 
> Sorry I don't know what this means. I'm accustomed to seeing a separate
> testing branch.
No need to use remote branch or look commits related to this, all latest code is included here and should work after I fix this issue with database.  

>I got a couple of conflicts when applying these patches but was able to resolve them.
Anything I could look into?
Comment 27 Emmi Takkinen 2020-03-16 12:13:07 UTC
Created attachment 100741 [details] [review]
Bug 9525: Group floating rules

+-----------------------------+
| USAGE TIPS (sorry didn't document these in the GUI |
+-----------------------------+

When modifying a floating route rule, pressing "%" accepts the modification and pressing "V" cancels the modifications and reverts the old rule.
The empty text box in the center of the route rule (under the floating type dropdown list) is the box for conditional rules, where you put the logical expression.

+-----------------------------+
| SETTING UP THE TEST CONTEXT |
+-----------------------------+

-1. Find an Item, which can be circulated freely, and has homebranch B and
    any holdingbranch.
0. Read the instructions at admin/floating-matrix.pl.

+-----------+
| TEST PLAN: Disabled floating:
+-----------+

0. Make sure that the floating rules from branch A to branch B (A -> B) are
   "Disabled" and vice versa (B -> A).
1. Set your current library to A.
2. Check-in the Item.
3. Observe the started transport to branch B.
4. Set your current library to B.
5. Check-in to receive the transfer.

+-----------+
| TEST PLAN: Always floating:
+-----------+

0. Make sure that the floating rules from branch A to branch B (A -> B) are
   "Allowed".
1. Set your current library to A.
2. Check-in the Item.
3. Observe that there is not transport prompt to branch B and the Item is not
   "in-transit" -state.

+-----------+
| TEST PLAN: Possibly floating:
+-----------+

0. Make sure that the floating rules from branch A to branch B (A -> B) are
   "Possible".
1. Set your current library to A.
2. Check-in the Item.
3. Observe that there is a transport prompt to branch B. You can decide if you
   want to transfer or no.

+-----------+
| TEST PLAN: Conditional floating:
+-----------+

0. Same as Always floating if the given condition matches. See the feature description at admin/floating-matrix.pl explaining Conditional floating.

+-----------+
| TEST PLAN: Floating rule tester:
+-----------+

0. Add some floating rules between libraries
1. Choose origin library, destination library and give barcode for the item you want to test
2. Hit "Test"
3. Make sure box next to the "Test" button changes color according rules you made
4. Also for conditional floating use barcode for item that doesn't match given condition
Comment 28 Emmi Takkinen 2020-03-16 12:13:39 UTC
Created attachment 100742 [details] [review]
Bug 9525: Fixing floating on return
Comment 29 Emmi Takkinen 2020-03-16 12:14:21 UTC
Created attachment 100743 [details] [review]
Bug 9525: Add support for regexps in conditional floating
Comment 30 Laurence Rault 2020-04-23 10:58:40 UTC
On biblibre sandbox, impossible to apply the patch : 

Auto-merging Koha/Schema/Result/Branch.pm
CONFLICT (content): Merge conflict in Koha/Schema/Result/Branch.pm
Auto-merging C4/Circulation.pm
CONFLICT (content): Merge conflict in C4/Circulation.pm
error: Failed to merge in the changes.
Patch failed at 0001 Bug 9525: Group floating rules
Comment 31 Emmi Takkinen 2020-04-28 07:54:19 UTC
Created attachment 103828 [details] [review]
Bug 9525: Group floating rules

Rebased patch and moved schema changes into a separate patch.
Comment 32 Emmi Takkinen 2020-04-28 07:54:50 UTC
Created attachment 103829 [details] [review]
Bug 9525: Schema changes - DO NOT PUSH
Comment 33 Emmi Takkinen 2020-04-28 07:55:18 UTC
Created attachment 103830 [details] [review]
Bug 9525: Fixing floating on return
Comment 34 Emmi Takkinen 2020-04-28 07:56:00 UTC
Created attachment 103831 [details] [review]
Bug 9525: Add support for regexps in conditional floating clauses
Comment 35 Lisette Scheer 2020-10-24 21:05:49 UTC
103828 - Bug 9525: Group floating rules
103829 - Bug 9525: Schema changes - DO NOT PUSH
103830 - Bug 9525: Fixing floating on return
103831 - Bug 9525: Add support for regexps in conditional floating clauses

Apply? [(y)es, (n)o, (i)nteractive] y
Applying: Bug 9525: Group floating rules
Using index info to reconstruct a base tree...
M       C4/Circulation.pm
M       installer/data/mysql/kohastructure.sql
M       koha-tmpl/intranet-tmpl/prog/en/modules/admin/admin-home.tt
Falling back to patching base and 3-way merge...
Auto-merging koha-tmpl/intranet-tmpl/prog/en/modules/admin/admin-home.tt
Auto-merging installer/data/mysql/kohastructure.sql
Auto-merging C4/Circulation.pm
CONFLICT (content): Merge conflict in C4/Circulation.pm
error: Failed to merge in the changes.
Patch failed at 0001 Bug 9525: Group floating rules
Comment 36 Emmi Takkinen 2020-10-27 10:58:18 UTC
Created attachment 112550 [details] [review]
Bug 9525: Group floating rules

+-----------------------------+
| USAGE TIPS (sorry didn't document these in the GUI |
+-----------------------------+

When modifying a floating route rule, pressing "%" accepts the modification and pressing "V" cancels the modifications and reverts the old rule.
The empty text box in the center of the route rule (under the floating type dropdown list) is the box for conditional rules, where you put the logical expression.

+-----------------------------+
| SETTING UP THE TEST CONTEXT |
+-----------------------------+

-1. Find an Item, which can be circulated freely, and has homebranch B and
    any holdingbranch.
0. Read the instructions at admin/floating-matrix.pl.

+-----------+
| TEST PLAN: Disabled floating:
+-----------+

0. Make sure that the floating rules from branch A to branch B (A -> B) are
   "Disabled" and vice versa (B -> A).
1. Set your current library to A.
2. Check-in the Item.
3. Observe the started transport to branch B.
4. Set your current library to B.
5. Check-in to receive the transfer.

+-----------+
| TEST PLAN: Always floating:
+-----------+

0. Make sure that the floating rules from branch A to branch B (A -> B) are
   "Allowed".
1. Set your current library to A.
2. Check-in the Item.
3. Observe that there is not transport prompt to branch B and the Item is not
   "in-transit" -state.

+-----------+
| TEST PLAN: Possibly floating:
+-----------+

0. Make sure that the floating rules from branch A to branch B (A -> B) are
   "Possible".
1. Set your current library to A.
2. Check-in the Item.
3. Observe that there is a transport prompt to branch B. You can decide if you
   want to transfer or no.

+-----------+
| TEST PLAN: Conditional floating:
+-----------+

0. Same as Always floating if the given condition matches. See the feature description at admin/floating-matrix.pl explaining Conditional floating.

+-----------+
| TEST PLAN: Floating rule tester:
+-----------+

0. Add some floating rules between libraries
1. Choose origin library, destination library and give barcode for the item you want to test
2. Hit "Test"
3. Make sure box next to the "Test" button changes color according rules you made
4. Also for conditional floating use barcode for item that doesn't match given condition
Comment 37 Emmi Takkinen 2020-10-27 10:58:55 UTC
Created attachment 112551 [details] [review]
Bug 9525: Schema changes - DO NOT PUSH
Comment 38 Emmi Takkinen 2020-10-27 10:59:25 UTC
Created attachment 112552 [details] [review]
Bug 9525: Fixing floating on return
Comment 39 Emmi Takkinen 2020-10-27 11:00:23 UTC
Created attachment 112553 [details] [review]
Bug 9525: Add support for regexps in conditional floating clauses

itype =~ ^(KI|DV) or location eq 'SHELF'
Comment 40 Emmi Takkinen 2020-10-27 11:00:43 UTC
Rebased patches.
Comment 41 Emmi Takkinen 2021-09-13 07:17:37 UTC
We are currently working on upcoming version update and have decided to ditch this floating matrix feature. Instead we've decided use float groups which work like hold groups introduced in bug 22284.
Comment 42 Emmi Takkinen 2021-09-13 07:18:53 UTC
Created attachment 124825 [details] [review]
Bug 9525: Add ft_local_float_group column

This patch adds new ft_local_float_group column
to library_groups table.

To test:
1. Apply patch and update database
2. Confirm new column is added correctly to the
library_groups table

Sponsored-by: Koha-Suomi Oy
Comment 43 Emmi Takkinen 2021-09-13 07:19:25 UTC
Created attachment 124826 [details] [review]
Bug 9525: DO NOT PUSH! Schema update

Sponsored-by: Koha-Suomi Oy
Comment 44 Emmi Takkinen 2021-09-13 07:20:00 UTC
Created attachment 124827 [details] [review]
Bug 9525: Add option to define float groups and rules for float

Bug 22284 introduced ability to create hold groups.
We should have ability to create float groups in
same manner. This patch adds checkbox "Is local
float group" to group creation feature and new return
policy "Item floats by librarygroup".

To test:
1. Add new float group and some libraries to it.
2. From circulation and fine rules, set default
return policy as "Item floats by library group".
3. Check out an item for a patron.
4. Set library as one that belongs in the same
float group.
5. Check in the item.
=> Observe that notice for transfer doesn't pop up.
6. Check out again.
7. This time set library as one that doen's
belong in the same float group.
8. Check in.
=> Observe that notice for transfer pops up.

Experiment this feature by changing return policy
per library, item type etc.

Also prove t/db_dependent/Koha/Libraries.t

Sponsored-by: Koha-Suomi Oy
Comment 45 Emmi Takkinen 2021-09-13 07:22:23 UTC
Attached new patches, removed dependencies on bug 13906 and bug 13995.
Comment 46 Emmi Takkinen 2022-04-07 10:16:39 UTC
Created attachment 133071 [details] [review]
Bug 9525: Add ft_local_float_group column

This patch adds new ft_local_float_group column
to library_groups table.

To test:
1. Apply patch and update database
2. Confirm new column is added correctly to the
library_groups table

Sponsored-by: Koha-Suomi Oy
Comment 47 Emmi Takkinen 2022-04-07 10:17:05 UTC
Created attachment 133072 [details] [review]
Bug 9525: DO NOT PUSH! Schema update

Sponsored-by: Koha-Suomi Oy
Comment 48 Emmi Takkinen 2022-04-07 10:17:40 UTC
Created attachment 133073 [details] [review]
Bug 9525: Add option to define float groups and rules for float

Bug 22284 introduced ability to create hold groups.
We should have ability to create float groups in
same manner. This patch adds checkbox "Is local
float group" to group creation feature and new return
policy "Item floats by librarygroup".

To test:
1. Add new float group and some libraries to it.
2. From circulation and fine rules, set default
return policy as "Item floats by library group".
3. Check out an item for a patron.
4. Set library as one that belongs in the same
float group.
5. Check in the item.
=> Observe that notice for transfer doesn't pop up.
6. Check out again.
7. This time set library as one that doen's
belong in the same float group.
8. Check in.
=> Observe that notice for transfer pops up.

Experiment this feature by changing return policy
per library, item type etc.

Also prove t/db_dependent/Koha/Libraries.t

Sponsored-by: Koha-Suomi Oy
Comment 49 Emmi Takkinen 2022-04-07 10:18:20 UTC
Rebased patches and made database update idempotent.
Comment 50 ByWater Sandboxes 2022-08-11 15:57:10 UTC
Created attachment 139024 [details] [review]
Bug 9525: Add ft_local_float_group column

This patch adds new ft_local_float_group column
to library_groups table.

To test:
1. Apply patch and update database
2. Confirm new column is added correctly to the
library_groups table

Sponsored-by: Koha-Suomi Oy

Signed-off-by: Lisette Scheer <lisettePalouse+Koha@gmail.com>
Comment 51 ByWater Sandboxes 2022-08-11 15:57:15 UTC
Created attachment 139025 [details] [review]
Bug 9525: DO NOT PUSH! Schema update

Sponsored-by: Koha-Suomi Oy

Signed-off-by: Lisette Scheer <lisettePalouse+Koha@gmail.com>
Comment 52 ByWater Sandboxes 2022-08-11 15:57:20 UTC
Created attachment 139026 [details] [review]
Bug 9525: Add option to define float groups and rules for float

Bug 22284 introduced ability to create hold groups.
We should have ability to create float groups in
same manner. This patch adds checkbox "Is local
float group" to group creation feature and new return
policy "Item floats by librarygroup".

To test:
1. Add new float group and some libraries to it.
2. From circulation and fine rules, set default
return policy as "Item floats by library group".
3. Check out an item for a patron.
4. Set library as one that belongs in the same
float group.
5. Check in the item.
=> Observe that notice for transfer doesn't pop up.
6. Check out again.
7. This time set library as one that doen's
belong in the same float group.
8. Check in.
=> Observe that notice for transfer pops up.

Experiment this feature by changing return policy
per library, item type etc.

Also prove t/db_dependent/Koha/Libraries.t

Sponsored-by: Koha-Suomi Oy

Signed-off-by: Lisette Scheer <lisettePalouse+Koha@gmail.com>
Comment 53 Lisette Scheer 2022-08-11 15:59:28 UTC
Worked as expected.
Tested with various item types & configurations.
Lisette
Comment 54 Kyle M Hall 2022-09-02 13:41:47 UTC
    not ok 2 - 2nd float group also contains 2 libraries
    #   Failed test '2nd float group also contains 2 libraries'
    #   at t/db_dependent/Koha/Libraries.t line 358.
    #          got: '1'
    #     expected: '2'
Comment 55 Emmi Takkinen 2022-11-11 07:26:14 UTC
Created attachment 143740 [details] [review]
Bug 9525: Add ft_local_float_group column

This patch adds new ft_local_float_group column
to library_groups table.

To test:
1. Apply patch and update database
2. Confirm new column is added correctly to the
library_groups table

Sponsored-by: Koha-Suomi Oy

Signed-off-by: Lisette Scheer <lisettePalouse+Koha@gmail.com>
Comment 56 Emmi Takkinen 2022-11-11 07:26:47 UTC
Created attachment 143741 [details] [review]
Bug 9525: DO NOT PUSH! Schema update

Sponsored-by: Koha-Suomi Oy

Signed-off-by: Lisette Scheer <lisettePalouse+Koha@gmail.com>
Comment 57 Emmi Takkinen 2022-11-11 07:27:32 UTC
Created attachment 143742 [details] [review]
Bug 9525: Add option to define float groups and rules for  float

Bug 22284 introduced ability to create hold groups.
We should have ability to create float groups in
same manner. This patch adds checkbox "Is local
float group" to group creation feature and new return
policy "Item floats by librarygroup".

To test:
1. Add new float group and some libraries to it.
2. From circulation and fine rules, set default
return policy as "Item floats by library group".
3. Check out an item for a patron.
4. Set library as one that belongs in the same
float group.
5. Check in the item.
=> Observe that notice for transfer doesn't pop up.
6. Check out again.
7. This time set library as one that doen's
belong in the same float group.
8. Check in.
=> Observe that notice for transfer pops up.

Experiment this feature by changing return policy
per library, item type etc.

Also prove t/db_dependent/Koha/Libraries.t

Sponsored-by: Koha-Suomi Oy

Signed-off-by: Lisette Scheer <lisettePalouse+Koha@gmail.com>
Comment 58 Emmi Takkinen 2022-11-11 07:28:07 UTC
Created attachment 143743 [details] [review]
Bug 9525: Fix tests

To test prove t/db_dependent/Koha/Libraries.t

Sponsored-by: Koha-Suomi Oy
Comment 59 Emmi Takkinen 2022-11-11 07:28:27 UTC
Rebased patches and fixed tests.
Comment 60 carthur@slolibrary.org 2023-03-09 16:46:26 UTC
Hi,

My name is Charlie, I'm the Technical Services Librarian at the County of San Luis Obispo.  We are interested in partnering up with anyone that would like to help pay for this bug to be a priority solve.

Please let me know if you're interested and I can be reached at <carthur@slolibrary.org>.

Thank you,
Charlie
Comment 61 Katrin Fischer 2023-03-09 18:28:47 UTC
(In reply to carthur@slolibrary.org from comment #60)
> Hi,
> 
> My name is Charlie, I'm the Technical Services Librarian at the County of
> San Luis Obispo.  We are interested in partnering up with anyone that would
> like to help pay for this bug to be a priority solve.
> 
> Please let me know if you're interested and I can be reached at
> <carthur@slolibrary.org>.
> 
> Thank you,
> Charlie

Hi Charly, I have updated the "change sponsored?" field to say "Seeking cosponsors". It might help to get this some attention.
Comment 62 Katrin Fischer 2023-03-09 18:30:58 UTC
(In reply to Katrin Fischer from comment #61)
> (In reply to carthur@slolibrary.org from comment #60)
> > Hi,
> > 
> > My name is Charlie, I'm the Technical Services Librarian at the County of
> > San Luis Obispo.  We are interested in partnering up with anyone that would
> > like to help pay for this bug to be a priority solve.
> > 
> > Please let me know if you're interested and I can be reached at
> > <carthur@slolibrary.org>.
> > 
> > Thank you,
> > Charlie
> 
> Hi Charly, I have updated the "change sponsored?" field to say "Seeking
> cosponsors". It might help to get this some attention.

Hm, I realize now: this patch is already in development. What it needs right now is someone to test it, and anyone can. You could use a sandbox to test and help progress this development.

See: 
https://wiki.koha-community.org/wiki/Development_workflow
https://wiki.koha-community.org/wiki/Sandboxes
Comment 63 Nick Clemens 2023-03-09 20:57:42 UTC
Signed by Lisette, minor rebase and test updates, I think this can go to QA
Comment 64 Nick Clemens 2023-04-26 15:08:28 UTC
Created attachment 150241 [details] [review]
Bug 9525: Add ft_local_float_group column

This patch adds new ft_local_float_group column
to library_groups table.

To test:
1. Apply patch and update database
2. Confirm new column is added correctly to the
library_groups table

Sponsored-by: Koha-Suomi Oy

Signed-off-by: Lisette Scheer <lisettePalouse+Koha@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 65 Nick Clemens 2023-04-26 15:08:31 UTC
Created attachment 150242 [details] [review]
Bug 9525: Add option to define float groups and rules for float

Bug 22284 introduced ability to create hold groups.
We should have ability to create float groups in
same manner. This patch adds checkbox "Is local
float group" to group creation feature and new return
policy "Item floats by librarygroup".

To test:
1. Add new float group and some libraries to it.
2. From circulation and fine rules, set default
return policy as "Item floats by library group".
3. Check out an item for a patron.
4. Set library as one that belongs in the same
float group.
5. Check in the item.
=> Observe that notice for transfer doesn't pop up.
6. Check out again.
7. This time set library as one that doen's
belong in the same float group.
8. Check in.
=> Observe that notice for transfer pops up.

Experiment this feature by changing return policy
per library, item type etc.

Also prove t/db_dependent/Koha/Libraries.t

Sponsored-by: Koha-Suomi Oy

Signed-off-by: Lisette Scheer <lisettePalouse+Koha@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 66 Nick Clemens 2023-04-26 15:08:33 UTC
Created attachment 150243 [details] [review]
Bug 9525: Fix tests

To test prove t/db_dependent/Koha/Libraries.t

Sponsored-by: Koha-Suomi Oy
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 67 Nick Clemens 2023-04-26 15:08:36 UTC
Created attachment 150244 [details] [review]
Bug 9525: DO NOT PUSH! Schema update

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 68 Nick Clemens 2023-04-26 15:08:39 UTC
Created attachment 150245 [details] [review]
Bug 9525: (QA follow-up) Fix QA complaints

Add boolean to schema
Remove stray console.log
Fix subroutine name in POD

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 69 Nick Clemens 2023-04-26 15:08:42 UTC
Created attachment 150246 [details] [review]
Bug 9525: (QA follow-up) Clarify how float groups are selected in circulation rules

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 70 Nick Clemens 2023-04-26 15:09:45 UTC
I had been testing this on a branch, minor rebase to make apply.
All works well, added one patch to clarify how groups are searched, and addressed some simple QA complaints
Comment 71 Nick Clemens 2023-09-28 14:12:01 UTC
Created attachment 156330 [details] [review]
Bug 9525: Add ft_local_float_group column

This patch adds new ft_local_float_group column
to library_groups table.

To test:
1. Apply patch and update database
2. Confirm new column is added correctly to the
library_groups table

Sponsored-by: Koha-Suomi Oy

Signed-off-by: Lisette Scheer <lisettePalouse+Koha@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 72 Nick Clemens 2023-09-28 14:12:04 UTC
Created attachment 156331 [details] [review]
Bug 9525: Add option to define float groups and rules for float

Bug 22284 introduced ability to create hold groups.
We should have ability to create float groups in
same manner. This patch adds checkbox "Is local
float group" to group creation feature and new return
policy "Item floats by librarygroup".

To test:
1. Add new float group and some libraries to it.
2. From circulation and fine rules, set default
return policy as "Item floats by library group".
3. Check out an item for a patron.
4. Set library as one that belongs in the same
float group.
5. Check in the item.
=> Observe that notice for transfer doesn't pop up.
6. Check out again.
7. This time set library as one that doen's
belong in the same float group.
8. Check in.
=> Observe that notice for transfer pops up.

Experiment this feature by changing return policy
per library, item type etc.

Also prove t/db_dependent/Koha/Libraries.t

Sponsored-by: Koha-Suomi Oy

Signed-off-by: Lisette Scheer <lisettePalouse+Koha@gmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 73 Nick Clemens 2023-09-28 14:12:06 UTC
Created attachment 156332 [details] [review]
Bug 9525: Fix tests

To test prove t/db_dependent/Koha/Libraries.t

Sponsored-by: Koha-Suomi Oy
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 74 Nick Clemens 2023-09-28 14:12:09 UTC
Created attachment 156333 [details] [review]
Bug 9525: DO NOT PUSH! Schema update

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 75 Nick Clemens 2023-09-28 14:12:12 UTC
Created attachment 156334 [details] [review]
Bug 9525: (QA follow-up) Fix QA complaints

Add boolean to schema
Remove stray console.log
Fix subroutine name in POD

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 76 Nick Clemens 2023-09-28 14:12:15 UTC
Created attachment 156335 [details] [review]
Bug 9525: (QA follow-up) Clarify how float groups are selected in circulation rules

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 77 Nick Clemens 2023-09-28 14:12:18 UTC
Created attachment 156336 [details] [review]
Bug 9525: (QA follow-up) Tidy
Comment 78 Tomás Cohen Arazi 2023-10-04 20:43:51 UTC
Pushed to master for 23.11.

Nice work everyone, thanks!
Comment 79 Fridolin Somers 2023-10-06 00:40:15 UTC
New feature not pushed to 23.05.x
Comment 80 Martin Renvoize 2023-11-28 12:35:52 UTC
Can we get some release notes for this please?
Comment 81 Katrin Fischer 2023-11-30 15:39:57 UTC
(In reply to Martin Renvoize from comment #80)
> Can we get some release notes for this please?

I improvised something from the commit messages and what I see in Koha.