Bug 9836 - Filtering sort1 list according to patron category in patron data
Summary: Filtering sort1 list according to patron category in patron data
Status: CLOSED WONTFIX
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Bugs List
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-18 14:51 UTC by Koha Team University Lyon 3
Modified: 2023-12-28 20:42 UTC (History)
8 users (show)

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


Attachments
Bug 9836 Filtering sort1 list according to patron category in patron data (13.91 KB, patch)
2013-03-18 14:55 UTC, Koha Team University Lyon 3
Details | Diff | Splinter Review
linked_with column in Bsort1 Authorized values (22.08 KB, image/png)
2013-03-18 14:58 UTC, Koha Team University Lyon 3
Details
Bug 9836 Filtering sort1 list according to patron category in patron data (13.91 KB, patch)
2013-03-18 18:22 UTC, Koha Team University Lyon 3
Details | Diff | Splinter Review
Bug 9836 Filtering sort1 list according to patron category in patron data (15.22 KB, patch)
2013-05-03 13:33 UTC, Koha Team University Lyon 3
Details | Diff | Splinter Review
Bug 9836 Filtering sort1 list according to patron category in patron data (15.83 KB, patch)
2013-05-10 15:36 UTC, Koha Team University Lyon 3
Details | Diff | Splinter Review
Bug 9836 Filtering sort1 list according to patron category in patron data (16.78 KB, patch)
2013-05-28 12:45 UTC, Koha Team University Lyon 3
Details | Diff | Splinter Review
Bug 9836 Filtering sort1 list according to patron category in patron data (16.18 KB, patch)
2013-05-29 11:44 UTC, Koha Team University Lyon 3
Details | Diff | Splinter Review
Bug 9836 Filtering sort1 list according to patron category in patron data (16.46 KB, patch)
2013-05-31 09:05 UTC, Koha Team University Lyon 3
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Koha Team University Lyon 3 2013-03-18 14:51:44 UTC
Sort1 criterias are often used as subcategories of patron ones
This patch adds the possibility to link a sort1 criteria to a patron category in the Bsort1 authorised_values settings.
Then in the patron edition Library management block, the sort1 list is filtered according to the selected patron category and displays only the criterias linked to it.

Test plan :
1) Apply patch
2) Go to  Administration/Authorized values and select Bsort1 category
3) Edit a value you 'd like to bind with a patron category
4) Select the patron category in "Linked to" list and save
5) Do same thing for some other values
6) Go to an existing patron page, Details tab and set the patron category to the one you had linked some Bsort1 values with;
7) If you click below on Sort1 list, you 'll see that only these values are displayed.
8) From Patrons home module choose the category for a new patron in "New patron" list : again, you 'll see that only the linked values are to be seen in Sort1 list
9) Sign off the patch.
Comment 1 Koha Team University Lyon 3 2013-03-18 14:55:33 UTC Comment hidden (obsolete)
Comment 2 Koha Team University Lyon 3 2013-03-18 14:58:56 UTC
Created attachment 16258 [details]
linked_with column in Bsort1 Authorized values
Comment 3 cedric.vita 2013-03-18 15:17:58 UTC
Something went wrong !
Applying: Bug 9836 Filtering sort1 list according to patron category in patron data
Using index info to reconstruct a base tree...
Falling back to patching base and 3-way merge...
Auto-merging installer/data/mysql/updatedatabase.pl
CONFLICT (content): Merge conflict in installer/data/mysql/updatedatabase.pl
Failed to merge in the changes.
Patch failed at 0001 Bug 9836 Filtering sort1 list according to patron category in patron data
When you have resolved this problem run "git am --resolved".
If you would prefer to skip this patch, instead run "git am --skip".
To restore the original branch and stop patching run "git am --abort".
Bug 9836 - Filtering sort1 list according to patron category in patron data

Bug 9836 Filtering sort1 list according to patron category in patron data
Apply? [yn]
Patch left in /tmp/Bug-9836-Filtering-sort1-list-according-to-patron--nJMbY9.patch
Comment 4 Koha Team University Lyon 3 2013-03-18 18:22:06 UTC Comment hidden (obsolete)
Comment 5 jmbroust 2013-03-20 15:44:24 UTC
Tested on sandbox :
Maybe your patch is too restrictive, it would be more useful if :
- we could link an authorised value to several borrowers categories (as it works for branches limitation in the same table)
- we could use an authorised value linked to a patron category for other categories 

Last point : When you edit your bsort1 authorised value, you loose the link to the category.
Comment 6 Koha Team University Lyon 3 2013-05-03 13:33:23 UTC Comment hidden (obsolete)
Comment 7 Koha Team University Lyon 3 2013-05-10 15:36:35 UTC Comment hidden (obsolete)
Comment 8 jmbroust 2013-05-28 11:53:18 UTC
I tried to test on sandbox1 and had this message (it might not be tested on sandbox ?)

Something went wrong !
Applying: Bug 9836 Filtering sort1 list according to patron category in patron data
Using index info to reconstruct a base tree...
Falling back to patching base and 3-way merge...
Auto-merging installer/data/mysql/kohastructure.sql
Auto-merging installer/data/mysql/updatedatabase.pl
CONFLICT (content): Merge conflict in installer/data/mysql/updatedatabase.pl
Auto-merging koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt
Failed to merge in the changes.
Patch failed at 0001 Bug 9836 Filtering sort1 list according to patron category in patron data
When you have resolved this problem run "git am --resolved".
If you would prefer to skip this patch, instead run "git am --skip".
To restore the original branch and stop patching run "git am --abort".
Bug 9836 - Filtering sort1 list according to patron category in patron data

Bug 9836 Filtering sort1 list according to patron category in patron data
Apply? [yn]
Patch left in /tmp/Bug-9836-Filtering-sort1-list-according-to-patron--ED9Blz.patch
Comment 9 Koha Team University Lyon 3 2013-05-28 12:45:06 UTC Comment hidden (obsolete)
Comment 10 jmbroust 2013-05-28 13:15:28 UTC
Sorry Olivier, I don't have private sandbox and there's a merge conflict. Database might be updated with the command u mentionned in your plan test ? There are 5 other users of this patch, maybe somenone with private ("fromagere") sandbox could test it ?
Applying: Bug 9836 Filtering sort1 list according to patron category in patron data
Using index info to reconstruct a base tree...
Falling back to patching base and 3-way merge...
Auto-merging admin/authorised_values.pl
Auto-merging installer/data/mysql/kohastructure.sql
Auto-merging installer/data/mysql/updatedatabase.pl
CONFLICT (content): Merge conflict in installer/data/mysql/updatedatabase.pl
Auto-merging koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt
CONFLICT (content): Merge conflict in koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt
Auto-merging members/memberentry.pl
Failed to merge in the changes.
Patch failed at 0001 Bug 9836 Filtering sort1 list according to patron category in patron data
When you have resolved this problem run "git am --resolved".
If you would prefer to skip this patch, instead run "git am --skip".
To restore the original branch and stop patching run "git am --abort".
Bug 9836 - Filtering sort1 list according to patron category in patron data
Comment 11 Koha Team University Lyon 3 2013-05-29 11:44:32 UTC Comment hidden (obsolete)
Comment 12 jmbroust 2013-05-29 12:25:50 UTC
Applying: Bug 9836 Filtering sort1 list according to patron category in patron data
Using index info to reconstruct a base tree...
Falling back to patching base and 3-way merge...
Auto-merging admin/authorised_values.pl
Auto-merging installer/data/mysql/kohastructure.sql
Auto-merging installer/data/mysql/updatedatabase.pl
CONFLICT (content): Merge conflict in installer/data/mysql/updatedatabase.pl
Auto-merging koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt
CONFLICT (content): Merge conflict in koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt
Auto-merging members/memberentry.pl
Failed to merge in the changes.
Patch failed at 0001 Bug 9836 Filtering sort1 list according to patron category in patron data
When you have resolved this problem run "git am --resolved".
If you would prefer to skip this patch, instead run "git am --skip".
To restore the original branch and stop patching run "git am --abort".
Bug 9836 - Filtering sort1 list according to patron category in patron data
Comment 13 Koha Team University Lyon 3 2013-05-31 09:05:29 UTC
Created attachment 18541 [details] [review]
Bug 9836 Filtering sort1 list according to patron category in patron data

Hey Jean-Manuel,
I corrected a displaying error on the modified sort1 criteria

Olivier
Comment 14 jmbroust 2013-05-31 12:35:19 UTC
tested on sandbox pro. Seems to work fine. Thanks for someone to do the QA.
Comment 15 Jonathan Druart 2013-06-19 12:31:56 UTC
QA comment:

There is a design issue in this patch:
First, you add a column in a sql table only for some rows (in this case for categorycode=Bsort1).
Then, multiple values are added into this column (you lost the foreign key to the patron categories).
I don't like to say that but maybe a syspref is much more appropriate here.

Ergonomic issue:
A new column is added in the authorised values table, but the header only exists for the Bsort1 category. So there is a shift in others categories.

Looking at the code:
1/ You use an unused tt variable (looploop).
2/
-          SELECT  id, category, authorised_value, lib, lib_opac, imageurl
+          SELECT *
It is preferable to enumerate fields.

Marked as Failed QA.
Comment 16 Marc Véron 2016-05-23 15:55:00 UTC
Still valid?
Comment 17 Koha Team University Lyon 3 2016-05-27 14:22:20 UTC
No, I gave up this patch

Olivier Crouzet
Comment 18 Owen Leonard 2016-07-18 14:10:59 UTC
(In reply to Koha Team Lyon 3 from comment #17)
> No, I gave up this patch

Resetting this to "new."
Comment 19 Katrin Fischer 2023-01-08 01:14:35 UTC
(In reply to Koha Team University Lyon 3 from comment #17)
> No, I gave up this patch
> 
> Olivier Crouzet

Setting to WONTFIX - please reopen if you disagree!