[Bug 32495] New: Required fields in API and UI form don't match
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32495 Bug ID: 32495 Summary: Required fields in API and UI form don't match Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: ERM Assignee: jonathan.druart+koha@gmail.com Reporter: matt.blenkinsop@ptfs-europe.com CC: jonathan.druart+koha@gmail.com, jonathan.field@ptfs-europe.com, martin.renvoize@ptfs-europe.com, pedro.amorim@ptfs-europe.com The required fields in the API for adding a new agreement and the form on the UI to add it don't match. The API endpoint for POST "/api/v1/erm/agreements" requires "name, status, is_perpetual" The form on the UI requires the fields above (is_perpetual is a checkbox with a default value selected) but also requires "Description". Description should either be added to the API or the flag on the UI should be removed. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32495 --- Comment #1 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Jonathan, what's correct here? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32495 --- Comment #2 from Jonathan Field <jonathan.field@ptfs-europe.com> --- I would say that the Description could definitely be an optional field (in UI and therefore API). In fact, is_perpetual could also be deemed not required. It is in the UI right now as it's a Yes/No option. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32495 --- Comment #3 from Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> --- Created attachment 145149 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=145149&action=edit Bug 32495: Mis-matched required fields in UI and api The "description" field is marked as required in the UI when creating a new Agreement. This flag has been removed to match the API where it is not a required field. Is Perpetual has not been marked as required as it is a checkbox with a default selection so will always provide a value. Test plan: 1) In the ERM module, add a new agreement and observe that the Description field is required 2) Apply patch 3) Repeat step 1 but this time the Required flag will not be visible. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32495 Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Assignee|jonathan.druart+koha@gmail. |matt.blenkinsop@ptfs-europe |com |.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32495 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=32495 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #145149|0 |1 is obsolete| | --- Comment #4 from David Nind <david@davidnind.com> --- Created attachment 145205 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=145205&action=edit Bug 32495: Mis-matched required fields in UI and api The "description" field is marked as required in the UI when creating a new Agreement. This flag has been removed to match the API where it is not a required field. Is Perpetual has not been marked as required as it is a checkbox with a default selection so will always provide a value. Test plan: 1) In the ERM module, add a new agreement and observe that the Description field is required 2) Apply patch 3) Repeat step 1 but this time the Required flag will not be visible. 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=32495 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |david@davidnind.com Text to go in the| |This enhancement changes release notes| |the new agreement form so | |that the description field | |is no longer required (to | |match with the API). --- Comment #5 from David Nind <david@davidnind.com> --- Testing notes (using KTD): 1. After step 2 (apply the patch), you have to yarn build_js 2. Then I flushed the cached (flush_memcached) and restarted everything (restart_all). -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32495 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32495 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #145205|0 |1 is obsolete| | --- Comment #6 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 147290 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=147290&action=edit Bug 32495: Mis-matched required fields in UI and api The "description" field is marked as required in the UI when creating a new Agreement. This flag has been removed to match the API where it is not a required field. Is Perpetual has not been marked as required as it is a checkbox with a default selection so will always provide a value. Test plan: 1) In the ERM module, add a new agreement and observe that the Description field is required 2) Apply patch 3) Repeat step 1 but this time the Required flag will not be visible. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32495 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |m.de.rooy@rijksmuseum.nl QA Contact| |m.de.rooy@rijksmuseum.nl -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32495 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |23.05.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32495 --- Comment #7 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Pushed to master for 23.05. Nice work everyone, thanks! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32495 Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |additional_work_needed -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32495 --- Comment #8 from Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> --- Created attachment 147555 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=147555&action=edit Bug 32495: (follow-up) Remove required property This follow-up removes the required property from the text area as this was missed previously. Test plan: 1) In the ERM module, add a new agreement and observe that the Description field is required 2) Apply patch 3) Repeat step 1 but this time the Required flag will not be visible. 4) Submit the form with the Description field blank - the submission should work -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32495 Pedro Amorim <pedro.amorim@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #147555|0 |1 is obsolete| | --- Comment #9 from Pedro Amorim <pedro.amorim@ptfs-europe.com> --- Created attachment 147558 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=147558&action=edit Bug 32495: (follow-up) Remove required property This follow-up removes the required property from the text area as this was missed previously. Test plan: 1) In the ERM module, add a new agreement and observe that the Description field is required 2) Apply patch 3) Repeat step 1 but this time the Required flag will not be visible. 4) Submit the form with the Description field blank - the submission should work Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32495 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com Keywords| |rel_22_11_candidate --- Comment #10 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Follow-up pushed to master. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32495 --- Comment #11 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- You broke the tests. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32495 --- Comment #12 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- (In reply to Jonathan Druart from comment #11)
You broke the tests.
Timed out retrying after 4000ms: Not enough elements found. Found '2', expected '3'. t/cypress/integration/Agreements_spec.ts:188:65 186 | 187 | cy.get("#agreements_add").contains("Submit").click();
188 | cy.get("input:invalid,textarea:invalid,select:invalid").should( | ^ 189 | "have.length", 190 | 3 191 | );
-- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32495 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |33235 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33235 [Bug 33235] Cypress tests are failing -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32495 Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |Pushed to stable Version(s)|23.05.00 |23.05.00,22.11.04 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32495 --- Comment #13 from Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> --- Nice work everyone! Pushed to stable for 22.11.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32495 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|additional_work_needed, | |rel_22_11_candidate | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32495 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|enhancement |normal -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32495 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |RESOLVED CC| |lucas@bywatersolutions.com Resolution|--- |FIXED --- Comment #14 from Lucas Gass <lucas@bywatersolutions.com> --- Not needed in 22.05.x, no backport -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org