Summary: | Add additional fields support to ERM agreements | ||
---|---|---|---|
Product: | Koha | Reporter: | Michaela Sieber <michaela.sieber> |
Component: | ERM | Assignee: | Jake Deery <jake.deery> |
Status: | Needs documenting --- | QA Contact: | Nick Clemens (kidclamp) <nick> |
Severity: | enhancement | ||
Priority: | P5 - low | CC: | andrew.auld, clemens.tubach, jonathan.druart, jonathan.field, katrin.fischer, lucas, martin.renvoize, matt.blenkinsop, pedro.amorim |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
See Also: | https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35287 | ||
Change sponsored?: | Sponsored | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: |
This adds the option to add additional fields to ERM agreements. The fields can be either free text or linked to an authorized value for a pull down list. They be set to repeatable and made searchable.
|
Version(s) released in: |
24.11.00
|
Circulation function: | |||
Bug Depends on: | 35287 | ||
Bug Blocks: | 37577 | ||
Attachments: |
Bug 37576: Add additional fields for ERM agreements
Bug 37576: Add additional fields for ERM agreements Bug 37576: Add additional fields for ERM agreements Bug 37576: (follow-up) fix missed cypress change Bug 37576: Add additional fields for ERM agreements Bug 37576: (follow-up) fix missed cypress change Bug 37576: (QA follow-up) Tidy Bug 37576: (follow-up) fix broken cypress tests Bug 37576: (follow-up) fix broken cypress tests Bug 37576: (follow-up) Fix for UserRoles test |
Description
Michaela Sieber
2024-08-06 12:29:15 UTC
Created attachment 171181 [details] [review] Bug 37576: Add additional fields for ERM agreements This bug adds support for additional fields in the ERM module's agreements, similar to how Bug 35287 added support for additional fields in the ERM module's licences. To test (k.t.d): a) APPLY PATCH b) Run cypress --spec t/cypress/integration/AdditionalFields_spec.ts 1) Note how the tests pass c) Add new additional fields for 'erm_agreements' 1) Go to /cgi-bin/koha/admin/additional-fields.pl?tablename=erm_agreements 2) Create field one called 'text non-repeatable' 3) Create field two called 'text repeatable', check 'repeatable' 4) Create field three called 'av non-repeatable', pick LANG authorised value 5) Create field four called 'av repeatable', pick LOC authorised value, check repeatable d) Create new agreement 1) Go to /cgi-bin/koha/erm/agreements/add, notice the new additional fields section 2) Complete all mandatory fields for a new licence 3) Experiment with the four different additional field types – it may be useful to watch the Cypress-generated test video for guidance 4) Select some AV options from the AV fields, deselect them, notice the repeatable one allows for multiple selection, the non-repeatable one does not e) Save the agreement, then view it 1) To view the licence, click its name in the table list on /cgi-bin/koha/erm/agreements 2) notice the additional fields on display 3) also notice that the authorised values are in their human-readable form, and not their coded form f) Edit the agreement, then view it again 1) Go to /cgi-bin/koha/erm/agreements/edit/1 2) Play around again with the fields. Save. 3) Repeat step e, have the edits shown up? g) Test searchability 1) Go to /cgi-bin/koha/admin/additional-fields.pl?tablename=erm_agreements 2) Edit one of the fields and make sure searchable is checked (ensure you choose a field that has some data in it) 3) Go to /cgi-bin/koha/erm/agreements 4) Notice that the searchable field(s) are now columns in the table 5) Notice that searchable AV fields contain a drop-down 6) Notice that searchable text fields have an input field 7) Perform a search on the additional field 8) Notice that the searching is working as expected h) SIGN OFF When trying to edit the existing additional fields they are not displayed, see here:https://staff-b37576.sandboxes.biblibre.eu/cgi-bin/koha/erm/agreements/1 Created attachment 171268 [details] [review] Bug 37576: Add additional fields for ERM agreements This bug adds support for additional fields in the ERM module's agreements, similar to how Bug 35287 added support for additional fields in the ERM module's licences. To test (k.t.d): a) APPLY PATCH b) Run cypress --spec t/cypress/integration/AdditionalFields_spec.ts 1) Note how the tests pass c) Add new additional fields for 'erm_agreements' 1) Go to /cgi-bin/koha/admin/additional-fields.pl?tablename=erm_agreements 2) Create field one called 'text non-repeatable' 3) Create field two called 'text repeatable', check 'repeatable' 4) Create field three called 'av non-repeatable', pick LANG authorised value 5) Create field four called 'av repeatable', pick LOC authorised value, check repeatable d) Create new agreement 1) Go to /cgi-bin/koha/erm/agreements/add, notice the new additional fields section 2) Complete all mandatory fields for a new licence 3) Experiment with the four different additional field types – it may be useful to watch the Cypress-generated test video for guidance 4) Select some AV options from the AV fields, deselect them, notice the repeatable one allows for multiple selection, the non-repeatable one does not e) Save the agreement, then view it 1) To view the licence, click its name in the table list on /cgi-bin/koha/erm/agreements 2) notice the additional fields on display 3) also notice that the authorised values are in their human-readable form, and not their coded form f) Edit the agreement, then view it again 1) Go to /cgi-bin/koha/erm/agreements/edit/1 2) Play around again with the fields. Save. 3) Repeat step e, have the edits shown up? g) Test searchability 1) Go to /cgi-bin/koha/admin/additional-fields.pl?tablename=erm_agreements 2) Edit one of the fields and make sure searchable is checked (ensure you choose a field that has some data in it) 3) Go to /cgi-bin/koha/erm/agreements 4) Notice that the searchable field(s) are now columns in the table 5) Notice that searchable AV fields contain a drop-down 6) Notice that searchable text fields have an input field 7) Perform a search on the additional field 8) Notice that the searching is working as expected h) SIGN OFF Hi Michaela, Well spotted, it was a challenge to identify this issue, but in the end it was one single missing character!! Argh!! I've attached a new patch. Could you try this out on one of the sandbox servers and let me know how testing goes? Ta, Jake. Created attachment 171379 [details] [review] Bug 37576: Add additional fields for ERM agreements This bug adds support for additional fields in the ERM module's agreements, similar to how Bug 35287 added support for additional fields in the ERM module's licences. To test (k.t.d): a) APPLY PATCH b) Run cypress --spec t/cypress/integration/AdditionalFields_spec.ts 1) Note how the tests pass c) Add new additional fields for 'erm_agreements' 1) Go to /cgi-bin/koha/admin/additional-fields.pl?tablename=erm_agreements 2) Create field one called 'text non-repeatable' 3) Create field two called 'text repeatable', check 'repeatable' 4) Create field three called 'av non-repeatable', pick LANG authorised value 5) Create field four called 'av repeatable', pick LOC authorised value, check repeatable d) Create new agreement 1) Go to /cgi-bin/koha/erm/agreements/add, notice the new additional fields section 2) Complete all mandatory fields for a new licence 3) Experiment with the four different additional field types – it may be useful to watch the Cypress-generated test video for guidance 4) Select some AV options from the AV fields, deselect them, notice the repeatable one allows for multiple selection, the non-repeatable one does not e) Save the agreement, then view it 1) To view the licence, click its name in the table list on /cgi-bin/koha/erm/agreements 2) notice the additional fields on display 3) also notice that the authorised values are in their human-readable form, and not their coded form f) Edit the agreement, then view it again 1) Go to /cgi-bin/koha/erm/agreements/edit/1 2) Play around again with the fields. Save. 3) Repeat step e, have the edits shown up? g) Test searchability 1) Go to /cgi-bin/koha/admin/additional-fields.pl?tablename=erm_agreements 2) Edit one of the fields and make sure searchable is checked (ensure you choose a field that has some data in it) 3) Go to /cgi-bin/koha/erm/agreements 4) Notice that the searchable field(s) are now columns in the table 5) Notice that searchable AV fields contain a drop-down 6) Notice that searchable text fields have an input field 7) Perform a search on the additional field 8) Notice that the searching is working as expected h) SIGN OFF Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu> Thanks Jake, signed off :-) Created attachment 171397 [details] [review] Bug 37576: (follow-up) fix missed cypress change This patch fixes a single line in our cypress tests which didn't cause the test to fail, but nonetheless should be addressed. Thanks for the sign-off, Michaela. :-) Jake. Created attachment 173774 [details] [review] Bug 37576: Add additional fields for ERM agreements This bug adds support for additional fields in the ERM module's agreements, similar to how Bug 35287 added support for additional fields in the ERM module's licences. To test (k.t.d): a) APPLY PATCH b) Run cypress --spec t/cypress/integration/AdditionalFields_spec.ts 1) Note how the tests pass c) Add new additional fields for 'erm_agreements' 1) Go to /cgi-bin/koha/admin/additional-fields.pl?tablename=erm_agreements 2) Create field one called 'text non-repeatable' 3) Create field two called 'text repeatable', check 'repeatable' 4) Create field three called 'av non-repeatable', pick LANG authorised value 5) Create field four called 'av repeatable', pick LOC authorised value, check repeatable d) Create new agreement 1) Go to /cgi-bin/koha/erm/agreements/add, notice the new additional fields section 2) Complete all mandatory fields for a new licence 3) Experiment with the four different additional field types – it may be useful to watch the Cypress-generated test video for guidance 4) Select some AV options from the AV fields, deselect them, notice the repeatable one allows for multiple selection, the non-repeatable one does not e) Save the agreement, then view it 1) To view the licence, click its name in the table list on /cgi-bin/koha/erm/agreements 2) notice the additional fields on display 3) also notice that the authorised values are in their human-readable form, and not their coded form f) Edit the agreement, then view it again 1) Go to /cgi-bin/koha/erm/agreements/edit/1 2) Play around again with the fields. Save. 3) Repeat step e, have the edits shown up? g) Test searchability 1) Go to /cgi-bin/koha/admin/additional-fields.pl?tablename=erm_agreements 2) Edit one of the fields and make sure searchable is checked (ensure you choose a field that has some data in it) 3) Go to /cgi-bin/koha/erm/agreements 4) Notice that the searchable field(s) are now columns in the table 5) Notice that searchable AV fields contain a drop-down 6) Notice that searchable text fields have an input field 7) Perform a search on the additional field 8) Notice that the searching is working as expected h) SIGN OFF Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Created attachment 173775 [details] [review] Bug 37576: (follow-up) fix missed cypress change This patch fixes a single line in our cypress tests which didn't cause the test to fail, but nonetheless should be addressed. Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Created attachment 173776 [details] [review] Bug 37576: (QA follow-up) Tidy Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Pushed for 24.11! Well done everyone, thank you! It looks like we have failing Cypress tests, that probably didn't show up before while we fixed other tests. Can you please have provide a follow-up? Show agreement.Agreement CRUD operations Show agreement 0 ms 1 Delete agreement.Agreement CRUD operations Delete agreement 0 ms 1 Show package.Package CRUD operations Show package 0 ms 1 Delete package.Package CRUD operations Delete package 0 ms 1 Add agreement.Add/search user Add agreement Created attachment 174530 [details] [review] Bug 37576: (follow-up) fix broken cypress tests This patch is intended to fix failing Cypress tests by including the correct payload in get_agreement() found in e2e.js Just looking at packages. That also appears to be broken. Created attachment 174531 [details] [review] Bug 37576: (follow-up) fix broken cypress tests This patch is intended to fix failing Cypress tests by including the correct payload in get_agreement() found in e2e.js, and by moving get_package to the e2e.js with corrected payload also Rebased and expanded follow-up to also fix packages. That appears to be all Cypress tests passing now :-) Jake. Text fix patch picked for main. Created attachment 174532 [details] [review] Bug 37576: (follow-up) Fix for UserRoles test This patch, although not directly caused by Bug 37576, fixes issues with the UserRoles cypress test due to a change in the data structure brought on by recent ERM bugs. Picked follow-up "Fix for UserRoles test" for main. Enhancement, no 24.05.x backport. |