[Bug 42933] New: ERM - Error adding a license to an agreement when leaving non-mandatory fields empty
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42933 Bug ID: 42933 Summary: ERM - Error adding a license to an agreement when leaving non-mandatory fields empty Initiative type: --- Sponsorship --- status: Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: ERM Assignee: jonathan.druart@gmail.com Reporter: david@davidnind.com QA Contact: testopia@bugs.koha-community.org CC: jonathan.druart@gmail.com, jonathan.field@openfifth.co.uk, martin.renvoize@openfifth.co.uk, matt.blenkinsop@openfifth.co.uk, pedro.amorim@openfifth.co.uk Target Milestone: --- If you add a license to an agreement, and leave all the non-mandatory fields empty you get this error message: Something went wrong: Error: Expected string - got null. If you select data for a non-mandatory field, then the change you made is saved and you don't get an error. If any of the fields when adding a license are required, then they should be marked as required. To reproduce: 1. Enable the ERM module: set the ERMModule system preference to 'Enable'. 2. Got to the ERM module. 3. Add a license: Licenses > New license - Complete the mandatory fields - Click 'Save' 4. Add a test agreement: Agreements > New agreement - Completed the required fields - Under the licenses section, click 'Add new license' - Select the license you created from the dropdown list for the 'Licenses' field - Don't add data for any another fields for the license - none are marked as mandatory - Click 'Save' - Get error with yellow background at the top of the page: "Something went wrong: Error: Expected string - got null." - Select a value for the status field, for example "Controlling" - Click 'Save' - The agreement is now created. This was identified when testing bug 37502. I searched the ERM module for Bugzilla, but couldn't see a bug reflecting this issue. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42933 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |38201 --- Comment #1 from Jonathan Druart <jonathan.druart@gmail.com> --- Caused by bug 38201, "Status" is supposed to be required by the UI. Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38201 [Bug 38201] VueJS architecture rethink -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42933 --- Comment #2 from Jonathan Druart <jonathan.druart@gmail.com> --- commit 01c30072ea2215a0d182f4eb1d33a33b4872f361 Bug 38201: Abstract AgreementLicenses and AgreementPeriods - <label :for="`license_status_${counter}`" class="required" - >{{ $__("Status") }}:</label - > - <v-select - :id="`license_status_${counter}`" - v-model="agreement_license.status" - label="description" - :reduce="av => av.value" - :options="av_agreement_license_statuses" - > - <template #search="{ attributes, events }"> - <input - :required="!agreement_license.status" - class="vs__search" - v-bind="attributes" - v-on="events" - /> - </template> - </v-select> - <span class="required">{{ $__("Required") }}</span> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42933 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42933 --- Comment #3 from Jonathan Druart <jonathan.druart@gmail.com> --- Created attachment 201172 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=201172&action=edit Bug 42933: Add a Cypress test Patch from commit 3ab7e72 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42933 --- Comment #4 from Jonathan Druart <jonathan.druart@gmail.com> --- Created attachment 201173 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=201173&action=edit Bug 42933: Reinstate license.status as a required field Patch from commit ee80607 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42933 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42933 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #201172|0 |1 is obsolete| | Attachment #201173|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42933 --- Comment #5 from David Nind <david@davidnind.com> --- Created attachment 201210 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=201210&action=edit Bug 42933: Add a Cypress test Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42933 --- Comment #6 from David Nind <david@davidnind.com> --- Created attachment 201211 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=201211&action=edit Bug 42933: Reinstate license.status as a required field Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42933 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the| |This fixes an issue for the release notes| |ERM module when adding a | |license to an agreement. | |The status field for the | |license was not shown as | |required. This generated an | |error message if you | |attempted to add a license | |without selecting a value | |for the status field: | |"Something went wrong: | |Error: Expected string - | |got null.". The status | |field is now marked as | |required. | | | |(Related to Bug 38201 - | |VueJS architecture rethink, | |added to Koha 25.11.) --- Comment #7 from David Nind <david@davidnind.com> --- Thanks Jonathan! Testing notes (using KTD): 1. Enable the ERM module: set the ERMModule system preference to 'Enable'. 2. Got to the ERM module. 3. Add a license: Licenses > New license - Complete the mandatory fields - Click 'Save' 4. Add a test agreement: Agreements > New agreement - Completed the required fields - Under the licenses section, click 'Add new license' - Select the license you created from the dropdown list for the 'Licenses' field - Don't add data for any another fields for the license - none are marked as mandatory - Click 'Save' - Get error with yellow background at the top of the page: "Something went wrong: Error: Expected string - got null." - Select a value for the status field, for example "Controlling" - Click 'Save' - The agreement is now created. 5. Apply the patches. 6. Rebuild everything: yarn build 7. Restart everything: restart_all 8. Repeat step 4 for a new agreement - the license status field is now marked as required. If you attempt to save the agreement without selecting a value, you are prompted to complete the required field. 9. Run the tests - these should pass: cypress run --spec t/cypress/integration/ERM/Agreements_spec.ts -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42933 Lisette Scheer <lisette@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |matt.blenkinsop@openfifth.c |y.org |o.uk CC| |lisette@bywatersolutions.co | |m -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org