Bug 26573 - Limit patron attribute types to more than one patron category
Summary: Limit patron attribute types to more than one patron category
Status: Failed QA
Alias: None
Product: Koha
Classification: Unclassified
Component: System Administration (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Julian Maurice
QA Contact: Martin Renvoize (ashimema)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-09-29 19:18 UTC by Caroline Cyr La Rose
Modified: 2025-06-24 22:20 UTC (History)
17 users (show)

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


Attachments
Bug 26573: Limit patron attribute types to more than one patron category (25.79 KB, patch)
2022-08-26 11:50 UTC, Julian Maurice
Details | Diff | Splinter Review
[DO NOT PUSH] DBIX schema update (8.88 KB, patch)
2022-11-03 13:34 UTC, Victor Grousset/tuxayo
Details | Diff | Splinter Review
DBIX schema update (8.92 KB, patch)
2022-11-03 14:03 UTC, PTFS Europe Sandboxes
Details | Diff | Splinter Review
Bug 26573: Limit patron attribute types to more than one patron category (25.85 KB, patch)
2022-11-03 14:19 UTC, PTFS Europe Sandboxes
Details | Diff | Splinter Review
DBIX schema update (8.99 KB, patch)
2022-11-03 14:19 UTC, PTFS Europe Sandboxes
Details | Diff | Splinter Review
Bug 26573: Limit patron attribute types to more than one patron category (25.83 KB, patch)
2022-12-07 15:01 UTC, Julian Maurice
Details | Diff | Splinter Review
Bug 26573: Remove remaining reference to category_code column (1.32 KB, patch)
2022-12-07 15:01 UTC, Julian Maurice
Details | Diff | Splinter Review
Bug 26573: Limit patron attribute types to more than one patron category (25.86 KB, patch)
2023-11-23 16:48 UTC, Shi Yao Wang
Details | Diff | Splinter Review
Bug 26573: Remove remaining reference to category_code column (1.32 KB, patch)
2023-11-23 16:48 UTC, Shi Yao Wang
Details | Diff | Splinter Review
Bug 26573: Limit patron attribute types to more than one patron category (28.51 KB, patch)
2024-09-05 07:26 UTC, Julian Maurice
Details | Diff | Splinter Review
[DO NOT PUSH] DBIX schema update (7.07 KB, patch)
2024-12-17 15:46 UTC, Hammat wele
Details | Diff | Splinter Review
Bug 26573: Limit patron attribute types to more than one patron category (28.08 KB, patch)
2024-12-17 15:46 UTC, Hammat wele
Details | Diff | Splinter Review
Bug 26573: Limit patron attribute types to more than one patron category (28.18 KB, patch)
2025-02-06 10:52 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 26573: DBIC Schema (5.08 KB, patch)
2025-02-06 10:52 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 26573: Limit patron attribute types to more than one patron category (352.37 KB, patch)
2025-02-18 11:16 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 26573: DBIC Schema (5.36 KB, patch)
2025-02-18 11:16 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 26573: Limit patron attribute types to more than one patron category (33.67 KB, patch)
2025-02-18 14:05 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 26573: (QA follow-up) Remove category_code from tests (4.50 KB, patch)
2025-02-18 14:05 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 26573: (QA follow-up) Correction to foreign key (2.72 KB, patch)
2025-02-18 14:05 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 26573: DBIC Schema (7.79 KB, patch)
2025-02-18 14:05 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 26573: Limit patron attribute types to more than one patron category (33.53 KB, patch)
2025-02-18 14:26 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 26573: (QA follow-up) Remove category_code from tests (4.50 KB, patch)
2025-02-18 14:26 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 26573: (QA follow-up) Correction to foreign key (2.72 KB, patch)
2025-02-18 14:26 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 26573: DBIC Schema (7.79 KB, patch)
2025-02-18 14:26 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 26573: Limit patron attribute types to more than one patron category (32.94 KB, patch)
2025-06-18 09:11 UTC, Julian Maurice
Details | Diff | Splinter Review
Bug 26573: (QA follow-up) Remove category_code from tests (4.50 KB, patch)
2025-06-18 09:11 UTC, Julian Maurice
Details | Diff | Splinter Review
Bug 26573: (QA follow-up) Correction to foreign key (2.45 KB, patch)
2025-06-18 09:11 UTC, Julian Maurice
Details | Diff | Splinter Review
Bug 26573: DBIC Schema (7.19 KB, patch)
2025-06-18 09:11 UTC, Julian Maurice
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Caroline Cyr La Rose 2020-09-29 19:18:45 UTC
Currently, Koha doesn't allow to limit a patron attribute type to more than one patron category.

Let's say I have a patron attribute type STUDENTID, and I want to limit this attribute to the categories "undergrad students" and "grad students". I have to create two different patron attribute types.

To replicate:
1) Go to Administration > Patron attribute types
2) Create a new patron attribute
3) Note that the "Category" field is a dropdown and you can't choose more than one patron category to assign this attribute type to.
Comment 1 George Williams (NEKLS) 2020-10-01 14:24:49 UTC
The ability to limit a patron extended attribute to more than 1 category at a time would be great.
Comment 2 Barbara Johnson 2021-05-11 14:57:04 UTC
I had to create a whole duplicate set of attributes for a different patron category.  It took me awhile to figure that out and now if feels clunky to have these 'near duplicate' attributes in the system. This functionality is really needed.
Comment 3 Andrew Fuerste-Henry 2022-02-23 16:20:53 UTC
Agreed, this would be helpful!
Comment 4 Julian Maurice 2022-08-26 11:50:23 UTC
Created attachment 139823 [details] [review]
Bug 26573: Limit patron attribute types to more than one patron category

Test plan:
1. Create patron attribute types, some with a category limit, some
   without
2. Apply patch
3. Run installer/data/mysql/updatedatabase.pl
4. Run misc/devel/update_dbix_class_files.pl --koha-conf
5. Restart koha
6. Verify that existing category limits were kept
7. Create a new patron attribute type and select multiple category
   limits. Verify that they have been saved correctly.
8. Edit this patron attribute type and modify category limits. Verify
   that the changes have been saved correctly
9. Go to the patron creation form, and verify that patron attributes are
   shown/hidden accordingly when categorycode is changed.
10. Go to patron batch modification tool, enter a cardnumber (or a
    borrowernumber) and submit the form to go to the next step.
    Now select a patron attribute type that has category limits and
    verify that the message shown to the right is correct
Comment 5 Victor Grousset/tuxayo 2022-11-03 13:34:06 UTC
Created attachment 143113 [details] [review]
[DO NOT PUSH] DBIX schema update
Comment 6 PTFS Europe Sandboxes 2022-11-03 14:03:38 UTC
Created attachment 143114 [details] [review]
DBIX schema update

https://bugs.koha-community.org/show_bug.cgi?id=26573

Signed-off-by: Aude Charillon <aude-charillon@ptfs-europe.com>
Comment 7 PTFS Europe Sandboxes 2022-11-03 14:19:13 UTC
Created attachment 143115 [details] [review]
Bug 26573: Limit patron attribute types to more than one patron category

Test plan:
1. Create patron attribute types, some with a category limit, some
   without
2. Apply patch
3. Run installer/data/mysql/updatedatabase.pl
4. Run misc/devel/update_dbix_class_files.pl --koha-conf
5. Restart koha
6. Verify that existing category limits were kept
7. Create a new patron attribute type and select multiple category
   limits. Verify that they have been saved correctly.
8. Edit this patron attribute type and modify category limits. Verify
   that the changes have been saved correctly
9. Go to the patron creation form, and verify that patron attributes are
   shown/hidden accordingly when categorycode is changed.
10. Go to patron batch modification tool, enter a cardnumber (or a
    borrowernumber) and submit the form to go to the next step.
    Now select a patron attribute type that has category limits and
    verify that the message shown to the right is correct

Signed-off-by: Aude Charillon <aude-charillon@ptfs-europe.com>
Comment 8 PTFS Europe Sandboxes 2022-11-03 14:19:18 UTC
Created attachment 143116 [details] [review]
DBIX schema update

https://bugs.koha-community.org/show_bug.cgi?id=26573

Signed-off-by: Aude Charillon <aude-charillon@ptfs-europe.com>

Signed-off-by: Aude Charillon <aude-charillon@ptfs-europe.com>
Comment 9 Aude Charillon 2022-11-03 14:23:19 UTC
All works! A lot of library colleagues will find this useful.
Comment 10 Kyle M Hall (khall) 2022-11-04 18:37:22 UTC
Something went wrong loading file /kohadevbox/koha/installer/data/mysql/kohastructure.sql ([SQL ERROR]: CREATE TABLE `borrower_attribute_types` (
  `code` varchar(10) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'unique key used to identify each custom field',
  `description` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'description for each custom field',
  `repeatable` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'defines whether one patron/borrower can have multiple values for this custom field  (1 for yes, 0 for no)',
  `unique_id` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'defines if this value needs to be unique (1 for yes, 0 for no)',
  `opac_display` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'defines if this field is visible to patrons on their account in the OPAC (1 for yes, 0 for no)',
  `opac_editable` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'defines if this field is editable by patrons on their account in the OPAC (1 for yes, 0 for no)',
  `staff_searchable` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'defines if this field is searchable via the patron search in the staff interface (1 for yes, 0 for no)',
  `authorised_value_category` varchar(32) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'foreign key from authorised_values that links this custom field to an authorized value category',
  `display_checkout` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'defines if this field displays in checkout screens',
  `class` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT 'defines a class for an attribute_type',
  `keep_for_pseudonymization` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'defines if this field is copied to anonymized_borrower_attributes (1 for yes, 0 for no)',
  `mandatory` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'defines if the attribute is mandatory or not',
  PRIMARY KEY (`code`),
  KEY `auth_val_cat_idx` (`authorised_value_category`),
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci
) at /kohadevbox/koha/C4/Installer.pm line 583.
Comment 11 Julian Maurice 2022-12-07 15:01:08 UTC
Created attachment 144470 [details] [review]
Bug 26573: Limit patron attribute types to more than one patron category

Test plan:
1. Create patron attribute types, some with a category limit, some
   without
2. Apply patch
3. Run installer/data/mysql/updatedatabase.pl
4. Run misc/devel/update_dbix_class_files.pl --koha-conf
5. Restart koha
6. Verify that existing category limits were kept
7. Create a new patron attribute type and select multiple category
   limits. Verify that they have been saved correctly.
8. Edit this patron attribute type and modify category limits. Verify
   that the changes have been saved correctly
9. Go to the patron creation form, and verify that patron attributes are
   shown/hidden accordingly when categorycode is changed.
10. Go to patron batch modification tool, enter a cardnumber (or a
    borrowernumber) and submit the form to go to the next step.
    Now select a patron attribute type that has category limits and
    verify that the message shown to the right is correct

Signed-off-by: Aude Charillon <aude-charillon@ptfs-europe.com>
Comment 12 Julian Maurice 2022-12-07 15:01:14 UTC
Created attachment 144471 [details] [review]
Bug 26573: Remove remaining reference to category_code column
Comment 13 Julian Maurice 2022-12-07 15:03:02 UTC
Patch rebased on master (with the offending comma removed from kohastructure.sql)
+ a fix in the latest patch
Back to needs signoff
Comment 14 Shi Yao Wang 2022-12-09 21:39:39 UTC
Patch doesn't apply.

Bug 26573 - Limit patron attribute types to more than one patron category

143113 - [DO NOT PUSH] DBIX schema update
144470 - Bug 26573: Limit patron attribute types to more than one patron category
144471 - Bug 26573: Remove remaining reference to category_code column

Apply? [(y)es, (n)o, (i)nteractive] y
Applying: DBIX schema update
Using index info to reconstruct a base tree...
M	Koha/Schema/Result/Category.pm
M	Koha/Schema/Result/TmpHoldsqueue.pm
Falling back to patching base and 3-way merge...
Auto-merging Koha/Schema/Result/TmpHoldsqueue.pm
CONFLICT (content): Merge conflict in Koha/Schema/Result/TmpHoldsqueue.pm
Auto-merging Koha/Schema/Result/Category.pm
CONFLICT (content): Merge conflict in Koha/Schema/Result/Category.pm
error: Failed to merge in the changes.
Patch failed at 0001 DBIX schema update
Comment 15 Julian Maurice 2023-03-03 09:35:03 UTC
Comment on attachment 143113 [details] [review]
[DO NOT PUSH] DBIX schema update

Patches apply correctly without the DBIx schema patch, so I'm removing this one. Do not forget to run update_dbix_class_files.pl when testing.
Comment 16 Benjamin Daeuber 2023-03-30 22:00:19 UTC
Patches apply for me, but after running 

installer/data/mysql/updatedatabase.pl and misc/devel/update_dbix_class_files.pl --koha-conf

And after restarting koha I get an error when loading patron-attr-types.pl. The trace is quite long, but begins with: 

DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::mysql::st execute failed: Unknown column 'me.category_code' in 'field list' at /kohadevbox/koha/Koha/Objects.pm line 394
 at /usr/share/perl5/DBIx/Class/Exception.pm line 77
Comment 17 Benjamin Daeuber 2023-03-31 14:06:12 UTC
Never mind, I was in the wrong branch. However, patches to not seem to apply to master at the moment.
Comment 18 Laura Escamilla 2023-04-07 12:15:20 UTC
Marking as "Patch doesn't apply" per Benjamin's comment.
Comment 19 Shi Yao Wang 2023-11-23 16:48:36 UTC
Created attachment 159210 [details] [review]
Bug 26573: Limit patron attribute types to more than one patron category

Test plan:
1. Create patron attribute types, some with a category limit, some
   without
2. Apply patch
3. Run installer/data/mysql/updatedatabase.pl
4. Run misc/devel/update_dbix_class_files.pl --koha-conf
5. Restart koha
6. Verify that existing category limits were kept
7. Create a new patron attribute type and select multiple category
   limits. Verify that they have been saved correctly.
8. Edit this patron attribute type and modify category limits. Verify
   that the changes have been saved correctly
9. Go to the patron creation form, and verify that patron attributes are
   shown/hidden accordingly when categorycode is changed.
10. Go to patron batch modification tool, enter a cardnumber (or a
    borrowernumber) and submit the form to go to the next step.
    Now select a patron attribute type that has category limits and
    verify that the message shown to the right is correct

Signed-off-by: Aude Charillon <aude-charillon@ptfs-europe.com>
Comment 20 Shi Yao Wang 2023-11-23 16:48:39 UTC
Created attachment 159211 [details] [review]
Bug 26573: Remove remaining reference to category_code column
Comment 21 Shi Yao Wang 2023-11-23 16:48:55 UTC
rebase
Comment 22 Anneli Österman 2023-12-15 12:20:11 UTC
I tested this in PTFS Europe's sandbox. Everything works according to the test plan but if I try to actually make batch modification from the step 10 I get this error message:

The method Koha::Patron::Attribute::Type->category_code is not covered by tests!

Trace begun at /kohadevbox/koha/Koha/Object.pm line 964
Koha::Object::AUTOLOAD('Koha::Patron::Attribute::Type=HASH(0x557cbecdce30)') called at /kohadevbox/koha/tools/modborrowers.pl line 408
eval {...} at /kohadevbox/koha/tools/modborrowers.pl line 2
CGI::Compile::ROOT::kohadevbox_koha_tools_modborrowers_2epl::__ANON__('CGI::Compile=HASH(0x557cbec1b4f8)', '', '/kohadevbox/koha/tools/modborrowers.pl', '/kohadevbox/koha/tools', 'ARRAY(0x557cbf067bc8)') called at /usr/share/perl5/CGI/Compile.pm line 151
CGI::Compile::ROOT::kohadevbox_koha_tools_modborrowers_2epl::modborrowers_2epl at /usr/share/perl5/CGI/Emulate/PSGI.pm line 30
CGI::Emulate::PSGI::__ANON__('HASH(0x557cbf1c69d8)') called at /usr/share/perl5/Plack/App/WrapCGI.pm line 95.....

I also tested without the patch and batch modification works without it.
Comment 23 Fridolin Somers 2024-08-13 13:31:39 UTC
This must also impact REST API routes ?
Maybe not since I dont see category in :
api/v1/swagger/definitions/patron_extended_attribute.yaml
Comment 24 Julian Maurice 2024-09-05 07:26:40 UTC
Created attachment 171048 [details] [review]
Bug 26573: Limit patron attribute types to more than one patron category

Test plan:
1. Create patron attribute types, some with a category limit, some
   without
2. Apply patch
3. Run installer/data/mysql/updatedatabase.pl
4. Run misc/devel/update_dbix_class_files.pl --koha-conf
5. Restart koha
6. Verify that existing category limits were kept
7. Create a new patron attribute type and select multiple category
   limits. Verify that they have been saved correctly.
8. Edit this patron attribute type and modify category limits. Verify
   that the changes have been saved correctly
9. Go to the patron creation form, and verify that patron attributes are
   shown/hidden accordingly when categorycode is changed.
10. Go to patron batch modification tool, enter a cardnumber (or a
    borrowernumber) and submit the form to go to the next step.
    Now select a patron attribute type that has category limits and
    verify that the message shown to the right is correct

Signed-off-by: Aude Charillon <aude-charillon@ptfs-europe.com>
Comment 25 Julian Maurice 2024-09-05 07:27:27 UTC
Rebased + fixed the batch modification
Comment 26 Hammat wele 2024-12-17 15:46:39 UTC
Created attachment 175628 [details] [review]
[DO NOT PUSH] DBIX schema update
Comment 27 Hammat wele 2024-12-17 15:46:46 UTC
Created attachment 175629 [details] [review]
Bug 26573: Limit patron attribute types to more than one patron category

Test plan:
1. Create patron attribute types, some with a category limit, some
   without
2. Apply patch
3. Run installer/data/mysql/updatedatabase.pl
4. Run misc/devel/update_dbix_class_files.pl --koha-conf
5. Restart koha
6. Verify that existing category limits were kept
7. Create a new patron attribute type and select multiple category
   limits. Verify that they have been saved correctly.
8. Edit this patron attribute type and modify category limits. Verify
   that the changes have been saved correctly
9. Go to the patron creation form, and verify that patron attributes are
   shown/hidden accordingly when categorycode is changed.
10. Go to patron batch modification tool, enter a cardnumber (or a
    borrowernumber) and submit the form to go to the next step.
    Now select a patron attribute type that has category limits and
    verify that the message shown to the right is correct

Signed-off-by: Aude Charillon <aude-charillon@ptfs-europe.com>
Comment 28 Martin Renvoize (ashimema) 2025-02-06 10:52:49 UTC
Created attachment 177565 [details] [review]
Bug 26573: Limit patron attribute types to more than one patron category

Test plan:
1. Create patron attribute types, some with a category limit, some
   without
2. Apply patch
3. Run installer/data/mysql/updatedatabase.pl
4. Run misc/devel/update_dbix_class_files.pl --koha-conf
5. Restart koha
6. Verify that existing category limits were kept
7. Create a new patron attribute type and select multiple category
   limits. Verify that they have been saved correctly.
8. Edit this patron attribute type and modify category limits. Verify
   that the changes have been saved correctly
9. Go to the patron creation form, and verify that patron attributes are
   shown/hidden accordingly when categorycode is changed.
10. Go to patron batch modification tool, enter a cardnumber (or a
    borrowernumber) and submit the form to go to the next step.
    Now select a patron attribute type that has category limits and
    verify that the message shown to the right is correct

Signed-off-by: Aude Charillon <aude-charillon@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 29 Martin Renvoize (ashimema) 2025-02-06 10:52:53 UTC
Created attachment 177566 [details] [review]
Bug 26573: DBIC Schema
Comment 30 Martin Renvoize (ashimema) 2025-02-06 10:53:17 UTC
Working on QA here.
Comment 31 Martin Renvoize (ashimema) 2025-02-18 11:16:03 UTC
Created attachment 178171 [details] [review]
Bug 26573: Limit patron attribute types to more than one patron category

Test plan:
1. Create patron attribute types, some with a category limit, some
   without
2. Apply patch
3. Run installer/data/mysql/updatedatabase.pl
4. Run misc/devel/update_dbix_class_files.pl --koha-conf
5. Restart koha
6. Verify that existing category limits were kept
7. Create a new patron attribute type and select multiple category
   limits. Verify that they have been saved correctly.
8. Edit this patron attribute type and modify category limits. Verify
   that the changes have been saved correctly
9. Go to the patron creation form, and verify that patron attributes are
   shown/hidden accordingly when categorycode is changed.
10. Go to patron batch modification tool, enter a cardnumber (or a
    borrowernumber) and submit the form to go to the next step.
    Now select a patron attribute type that has category limits and
    verify that the message shown to the right is correct

Signed-off-by: Aude Charillon <aude-charillon@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 32 Martin Renvoize (ashimema) 2025-02-18 11:16:06 UTC
Created attachment 178172 [details] [review]
Bug 26573: DBIC Schema
Comment 33 Martin Renvoize (ashimema) 2025-02-18 11:18:09 UTC
Rebased and fixed the QA script highlights... there's still work to do here though, lots of tests are failing and I think they may be highlighting genuine concerns..  I don't have the time to dig much further myself however..

Are you able to take another look Julian?
Comment 34 Martin Renvoize (ashimema) 2025-02-18 14:05:44 UTC
Created attachment 178252 [details] [review]
Bug 26573: Limit patron attribute types to more than one patron category

Test plan:
1. Create patron attribute types, some with a category limit, some
   without
2. Apply patch
3. Run installer/data/mysql/updatedatabase.pl
4. Run misc/devel/update_dbix_class_files.pl --koha-conf
5. Restart koha
6. Verify that existing category limits were kept
7. Create a new patron attribute type and select multiple category
   limits. Verify that they have been saved correctly.
8. Edit this patron attribute type and modify category limits. Verify
   that the changes have been saved correctly
9. Go to the patron creation form, and verify that patron attributes are
   shown/hidden accordingly when categorycode is changed.
10. Go to patron batch modification tool, enter a cardnumber (or a
    borrowernumber) and submit the form to go to the next step.
    Now select a patron attribute type that has category limits and
    verify that the message shown to the right is correct

Signed-off-by: Aude Charillon <aude-charillon@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 35 Martin Renvoize (ashimema) 2025-02-18 14:05:47 UTC
Created attachment 178253 [details] [review]
Bug 26573: (QA follow-up) Remove category_code from tests
Comment 36 Martin Renvoize (ashimema) 2025-02-18 14:05:51 UTC
Created attachment 178254 [details] [review]
Bug 26573: (QA follow-up) Correction to foreign key
Comment 37 Martin Renvoize (ashimema) 2025-02-18 14:05:54 UTC
Created attachment 178255 [details] [review]
Bug 26573: DBIC Schema
Comment 38 Martin Renvoize (ashimema) 2025-02-18 14:07:58 UTC
I'm confused.. the QA script is complaining of untidy templates.. using the mentioned script to tidy completely nukes them.. I've re-uploaded my QA'd branch but the tidy part of the qa script now fails as I'm scared to run the tidy
Comment 39 Martin Renvoize (ashimema) 2025-02-18 14:26:40 UTC
Created attachment 178270 [details] [review]
Bug 26573: Limit patron attribute types to more than one patron category

Test plan:
1. Create patron attribute types, some with a category limit, some
   without
2. Apply patch
3. Run installer/data/mysql/updatedatabase.pl
4. Run misc/devel/update_dbix_class_files.pl --koha-conf
5. Restart koha
6. Verify that existing category limits were kept
7. Create a new patron attribute type and select multiple category
   limits. Verify that they have been saved correctly.
8. Edit this patron attribute type and modify category limits. Verify
   that the changes have been saved correctly
9. Go to the patron creation form, and verify that patron attributes are
   shown/hidden accordingly when categorycode is changed.
10. Go to patron batch modification tool, enter a cardnumber (or a
    borrowernumber) and submit the form to go to the next step.
    Now select a patron attribute type that has category limits and
    verify that the message shown to the right is correct

Signed-off-by: Aude Charillon <aude-charillon@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 40 Martin Renvoize (ashimema) 2025-02-18 14:26:44 UTC
Created attachment 178271 [details] [review]
Bug 26573: (QA follow-up) Remove category_code from tests
Comment 41 Martin Renvoize (ashimema) 2025-02-18 14:26:48 UTC
Created attachment 178272 [details] [review]
Bug 26573: (QA follow-up) Correction to foreign key
Comment 42 Martin Renvoize (ashimema) 2025-02-18 14:26:53 UTC
Created attachment 178273 [details] [review]
Bug 26573: DBIC Schema
Comment 43 Martin Renvoize (ashimema) 2025-02-18 14:30:26 UTC
OK.. another re-run after a node_modules nuke and full pull of ktd again and we seem to be good..

Passing QA
Comment 44 Katrin Fischer 2025-02-28 14:35:27 UTC
There are some conflicts in .vue file and I don't know my way around there well enough yet, can you please resolve?

	both modified:   koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementsList.vue
	both modified:   koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/LicensesList.vue
Comment 45 Julian Maurice 2025-06-18 09:11:14 UTC
Created attachment 183322 [details] [review]
Bug 26573: Limit patron attribute types to more than one patron category

Test plan:
1. Create patron attribute types, some with a category limit, some
   without
2. Apply patch
3. Run installer/data/mysql/updatedatabase.pl
4. Run misc/devel/update_dbix_class_files.pl --koha-conf
5. Restart koha
6. Verify that existing category limits were kept
7. Create a new patron attribute type and select multiple category
   limits. Verify that they have been saved correctly.
8. Edit this patron attribute type and modify category limits. Verify
   that the changes have been saved correctly
9. Go to the patron creation form, and verify that patron attributes are
   shown/hidden accordingly when categorycode is changed.
10. Go to patron batch modification tool, enter a cardnumber (or a
    borrowernumber) and submit the form to go to the next step.
    Now select a patron attribute type that has category limits and
    verify that the message shown to the right is correct

Signed-off-by: Aude Charillon <aude-charillon@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 46 Julian Maurice 2025-06-18 09:11:17 UTC
Created attachment 183323 [details] [review]
Bug 26573: (QA follow-up) Remove category_code from tests
Comment 47 Julian Maurice 2025-06-18 09:11:20 UTC
Created attachment 183324 [details] [review]
Bug 26573: (QA follow-up) Correction to foreign key
Comment 48 Julian Maurice 2025-06-18 09:11:23 UTC
Created attachment 183325 [details] [review]
Bug 26573: DBIC Schema
Comment 49 Julian Maurice 2025-06-18 09:15:14 UTC
(In reply to Katrin Fischer from comment #44)
> There are some conflicts in .vue file and I don't know my way around there
> well enough yet, can you please resolve?
> 
> 	both modified:  
> koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementsList.vue
> 	both modified:  
> koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/LicensesList.vue

Wrong bug ? Patches on this bug do not touch .vue files

They needed a rebase anyway so here it is.
Changing status back to Passed QA because the conflicts were trivial to fix.
Comment 50 Lucas Gass (lukeg) 2025-06-24 22:20:10 UTC
Julian, there seems to be a few tests that are now failing here. Can you take a look?