[Bug 36880] New: Record overlay rules are not validated on add or edit
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36880 Bug ID: 36880 Summary: Record overlay rules are not validated on add or edit Change sponsored?: --- Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: minor Priority: P5 - low Component: System Administration Assignee: koha-bugs@lists.koha-community.org Reporter: bibliothek@th-wildau.de QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com The validation of record overlay rules does not work when adding a new rule or editing an existing rule. To reproduce: a) open http://localhost:8081/cgi-bin/koha/admin/marc-overlay-rules.pl b) just click + Add rule c) a new rule with an empty tag is saved Expected behavior: the input 'tag' should be marked as required -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36880 Jan Kissig <bibliothek@th-wildau.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Patch complexity|--- |Trivial patch -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36880 --- Comment #1 from Jan Kissig <bibliothek@th-wildau.de> --- Created attachment 166808 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=166808&action=edit Bug 36880: Record overlay rules are not validated on add or edit This patch fixes the validation of record overlay rules on operation add or edit. Testplan: a) open http://localhost:8081/cgi-bin/koha/admin/marc-overlay-rules.pl b) just click + Add rule c) a new rule with an empty tag is saved apply patch: a) open http://localhost:8081/cgi-bin/koha/admin/marc-overlay-rules.pl b) just click + Add rule c) the input for Tag gets marked as required -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36880 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA Assignee|koha-bugs@lists.koha-commun |bibliothek@th-wildau.de |ity.org | CC| |david@davidnind.com --- Comment #2 from David Nind <david@davidnind.com> --- Failing QA, because if you edit an existing rule, you can remove the value in the tag field and still save (when you click on save, the tag input field is briefly red, but it still saves without a value). I also added Jan as the assignee. Testing notes (using KTD): 1. Go to: Administration > Catalog > Record overlay rules 2. Before the patch, if you click '+Add rule' a single rule is added, even if no value is entered in the tag field. Clicking on '+Add rule' after this results in table refreshing, but no new rule added. 3. After the patch, the tag field is highlighted in a dark red and a rule isn't added until a value is entered. I haven't noticed this pattern elsewhere in Koha, maybe there needs to be a separate bug for colour contrast as the black text on the dark red background for the input field could be hard to read for some. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36880 Jan Kissig <bibliothek@th-wildau.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff Patch complexity|Trivial patch |Small patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36880 Jan Kissig <bibliothek@th-wildau.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #166808|0 |1 is obsolete| | --- Comment #3 from Jan Kissig <bibliothek@th-wildau.de> --- Created attachment 167182 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=167182&action=edit Bug 36880: Record overlay rules are not validated This patch fixes validation of rules, confirmation on deletion of rules and removes some unused source code. 1) Validation of record overlay rules on edit and add action 2) Validation when editing an existing rule 3) Adds confirm when deleting multiple rules Test plan: 1) a) open http://localhost:8081/cgi-bin/koha/admin/marc-overlay-rules.pl b) just click + Add rule c) a new rule with an empty tag is saved 2) a) edit an existing rule b) empty input value for tag c) click Save and check that the rule has now an empty value for tag 3) a) delete a rule by checking the checkbox and clicking Delete selected b) delete a rule by clicking the Delete button under Actions c) notice that b) asks for confirmation apply patch 1) redo steps and check that form does not get submitted and the input is marked as required 2) redo steps and check that clicking on Save will not submit the form and mark input as required 3) redo steps and check that a standard confirm popup appears -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36880 --- Comment #4 from Jan Kissig <bibliothek@th-wildau.de> --- Created attachment 167190 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=167190&action=edit Bug 36880: (follow-up) Translation of confirm was missing -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36880 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA --- Comment #5 from David Nind <david@davidnind.com> --- Have changed to Failed QA: 1. After the patch, with no rules: . Without changing anything or adding a tag, I can click + Add rule, and a rule is added . After the first rule is added, clicking + Add rule again (without changing anything) just refreshes the page . If I then change one of the settings, such as changing skip to append in the appended column, a new rule is added without a tag being required . Can edit any existing rule, without needing to have anything in the tag field -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36880 Jan Kissig <bibliothek@th-wildau.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36880 Jan Kissig <bibliothek@th-wildau.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #167182|0 |1 is obsolete| | Attachment #167190|0 |1 is obsolete| | --- Comment #6 from Jan Kissig <bibliothek@th-wildau.de> --- Created attachment 167207 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=167207&action=edit Bug 36880: Record overlay rules are not validated This patch fixes validation of rules, confirmation on deletion of rules and removes some unused source code. 1) Validation of record overlay rules on edit and add action 2) Validation when editing an existing rule 3) Adds confirm when deleting multiple rules Test plan: 1) a) open http://localhost:8081/cgi-bin/koha/admin/marc-overlay-rules.pl b) just click + Add rule c) a new rule with an empty tag is saved 2) a) edit an existing rule b) empty input value for tag c) click Save and check that the rule has now an empty value for tag 3) a) delete a rule by checking the checkbox and clicking Delete selected b) delete a rule by clicking the Delete button under Actions c) notice that b) asks for confirmation apply patch 1) redo steps and check that form does not get submitted and the input is marked as required 2) redo steps and check that clicking on Save will not submit the form and mark input as required 3) redo steps and check that a standard confirm popup appears -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36880 --- Comment #7 from Jan Kissig <bibliothek@th-wildau.de> --- (In reply to David Nind from comment #5)
Have changed to Failed QA:
1. After the patch, with no rules: . Without changing anything or adding a tag, I can click + Add rule, and a rule is added . After the first rule is added, clicking + Add rule again (without changing anything) just refreshes the page . If I then change one of the settings, such as changing skip to append in the appended column, a new rule is added without a tag being required . Can edit any existing rule, without needing to have anything in the tag field
Hi David, sorry for the troubles. The reason it did not work was that some important changes were part of the obsoleted patch. On my local machine everything worked as expected. I now merged (squashed) the 3 parts into one new patch and submitted it. It should work as expected now. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36880 --- Comment #8 from David Nind <david@davidnind.com> --- Thanks Jan! Sign off on the way. I'll leave it up to the QA to comment on the background colour of the required field and how to display it. In other areas, yellow is used to highlight required fields with no entry once the submit/action button is selected. David -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36880 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=36880 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #167207|0 |1 is obsolete| | --- Comment #9 from David Nind <david@davidnind.com> --- Created attachment 167234 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=167234&action=edit Bug 36880: Record overlay rules are not validated This patch fixes validation of rules, confirmation on deletion of rules and removes some unused source code. 1) Validation of record overlay rules on edit and add action 2) Validation when editing an existing rule 3) Adds confirm when deleting multiple rules Test plan: 1) a) open http://localhost:8081/cgi-bin/koha/admin/marc-overlay-rules.pl b) just click + Add rule c) a new rule with an empty tag is saved 2) a) edit an existing rule b) empty input value for tag c) click Save and check that the rule has now an empty value for tag 3) a) delete a rule by checking the checkbox and clicking Delete selected b) delete a rule by clicking the Delete button under Actions c) notice that b) asks for confirmation apply patch 1) redo steps and check that form does not get submitted and the input is marked as required 2) redo steps and check that clicking on Save will not submit the form and mark input as required 3) redo steps and check that a standard confirm popup appears 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=36880 Nick Clemens (kidclamp) <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- 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=36880 Nick Clemens (kidclamp) <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #167234|0 |1 is obsolete| | --- Comment #10 from Nick Clemens (kidclamp) <nick@bywatersolutions.com> --- Created attachment 168088 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=168088&action=edit Bug 36880: Record overlay rules are not validated This patch fixes validation of rules, confirmation on deletion of rules and removes some unused source code. 1) Validation of record overlay rules on edit and add action 2) Validation when editing an existing rule 3) Adds confirm when deleting multiple rules Test plan: 1) a) open http://localhost:8081/cgi-bin/koha/admin/marc-overlay-rules.pl b) just click + Add rule c) a new rule with an empty tag is saved 2) a) edit an existing rule b) empty input value for tag c) click Save and check that the rule has now an empty value for tag 3) a) delete a rule by checking the checkbox and clicking Delete selected b) delete a rule by clicking the Delete button under Actions c) notice that b) asks for confirmation apply patch 1) redo steps and check that form does not get submitted and the input is marked as required 2) redo steps and check that clicking on Save will not submit the form and mark input as required 3) redo steps and check that a standard confirm popup appears Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36880 Nick Clemens (kidclamp) <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nick@bywatersolutions.com --- Comment #11 from Nick Clemens (kidclamp) <nick@bywatersolutions.com> --- This page should be updated to use validation as per coding guidelines, and the styling improved, however, this fixes the current validation and improves the deletion process so I think we should move this forward. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36880 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |additional_work_needed --- Comment #12 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- (In reply to Nick Clemens (kidclamp) from comment #11)
This page should be updated to use validation as per coding guidelines, and the styling improved, however, this fixes the current validation and improves the deletion process so I think we should move this forward.
Could we please have a new bug for this? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36880 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to main Version(s)| |24.11.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=36880 --- Comment #13 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Pushed for 24.11! Well done everyone, thank you! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36880 --- Comment #14 from Jan Kissig <bibliothek@th-wildau.de> --- I opened Bug 37209(In reply to Katrin Fischer from comment #12)
(In reply to Nick Clemens (kidclamp) from comment #11)
This page should be updated to use validation as per coding guidelines, and the styling improved, however, this fixes the current validation and improves the deletion process so I think we should move this forward.
Could we please have a new bug for this?
BUG 37209 is ready to be fixed -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36880 Jan Kissig <bibliothek@th-wildau.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |37209 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37209 [Bug 37209] improve Record overlay rules validation and styling -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36880 Katrin Fischer <katrin.fischer@bsz-bw.de> 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=36880 --- Comment #15 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Thanks! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36880 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|24.11.00 |24.11.00,24.05.02 released in| | Status|Pushed to main |Pushed to stable CC| |lucas@bywatersolutions.com --- Comment #16 from Lucas Gass <lucas@bywatersolutions.com> --- Backported to 24.05.x for upcoming 24.05.02 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36880 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the| |This fixes the record release notes| |overlay rules page so that | |a tag is now required when | |adding and editing a rule. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36880 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m --- Comment #17 from Fridolin Somers <fridolin.somers@biblibre.com> --- Does not apply easy on 23.11.x Please provide patches if needed -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36880 --- Comment #18 from Jan Kissig <bibliothek@th-wildau.de> --- (In reply to Fridolin Somers from comment #17)
Does not apply easy on 23.11.x Please provide patches if needed
This bug is related to CSRF changes in 24.05 and the original code works in 23.11.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36880 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |Needs documenting -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36880 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|Needs documenting |RESOLVED --- Comment #19 from David Nind <david@davidnind.com> --- Bug fix, no changes to the manual required. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org