[Bug 40655] New: Transport cost matrix doesn't save changes
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40655 Bug ID: 40655 Summary: Transport cost matrix doesn't save changes Change sponsored?: --- Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: System Administration Assignee: koha-bugs@lists.koha-community.org Reporter: lisette@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com When editing transport-cost-matrix, it will save the numbers but not if you've enabled transfers. It also doesn't reflect disabled/enabled correctly from the database, so if you go in and make changes it re-disables them. To recreate: 1. Turn on the UseTransportCostMatrix system preference 2. Got to Administration/transport cost matrix 3. Edit a number of boxes to add numbers and uncheck the 'disabled' box 4. save 5. Observe that all (or most?) of the boxes are still disabled. 6. Run a report: select * from transport_cost where cost !='0.00' 7. Observe that they are disabled. 8. in koha-mysql: update transport_cost set disable_transfer = 0 where cost !=0.00; 9. Repeat step 6, they should have 0 instead of 1 for disable_transfer 10. Navigate to the transport cost matrix (don't refresh the page!) 11. Observe that the boxes are still disabled 12. Save (no changes needed) 13. Repeat step 6 14. Observe they are once again marked as disable_transfer 1 -- 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=40655 Lisette Scheer <lisette@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=40620 -- 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=40655 --- Comment #1 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Created attachment 187117 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=187117&action=edit Bug 40655: Fix logic of adding the disabled class -- 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=40655 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com Patch complexity|--- |Trivial patch -- 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=40655 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- 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=40655 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |lucas@bywatersolutions.com |ity.org | -- 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=40655 Michelle Spinney <mspinney@clamsnet.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mspinney@clamsnet.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40655 Kyle M Hall (khall) <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #187117|0 |1 is obsolete| | --- Comment #2 from Kyle M Hall (khall) <kyle@bywatersolutions.com> --- Created attachment 187218 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=187218&action=edit Bug 40655: Fix logic of adding the disabled class Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40655 Kyle M Hall (khall) <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kyle@bywatersolutions.com 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=40655 Kyle M Hall (khall) <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|normal |major -- You are receiving this mail because: You are watching all bug changes.
The number saves as expected
Disabled is saved, but the number is not
This time when the page loads that cell can't be edited anymore and you get an error like: There were problems with your submission Invalid value for Centerville -> Fairfield
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40655 Brendan Lawlor <blawlor@clamsnet.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |blawlor@clamsnet.org Status|Signed Off |Failed QA --- Comment #3 from Brendan Lawlor <blawlor@clamsnet.org> --- This fixes the two issues described by Lisette, but there is still a bad bug with saving the matrix. To recreate: 1. Apply the patch 2. Enable UseTransportCostMatrix and go to Administration > Transport cost matrix 3. Click in a box, uncheck disable, add a number and click save 4. In the same box click again, check disable and click save 5. In the same box click again, uncheck disabled and click save 6. Refresh the page, same error and you still can't edit that cell. The user can break the ability to edit any cell like this. For number 4, is the value supposed to be cleared when you disable it? The function check_transport_cost(e) only runs on blur. That doesn't prevent the user from clicking the save button when there's an empty value there and that breaks the way the form is rendered. This may be a separate bug , but even if the alert pops up, the user can just ignore it and put any string value and click save, it's not doing proper form validation. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40655 --- Comment #4 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- (In reply to Brendan Lawlor from comment #3)
This fixes the two issues described by Lisette, but there is still a bad bug with saving the matrix.
The number saves as expected
Disabled is saved, but the number is not
This time when the page loads that cell can't be edited anymore and you get an error like: There were problems with your submission Invalid value for Centerville -> Fairfield
To recreate: 1. Apply the patch 2. Enable UseTransportCostMatrix and go to Administration > Transport cost matrix 3. Click in a box, uncheck disable, add a number and click save 4. In the same box click again, check disable and click save 5. In the same box click again, uncheck disabled and click save 6. Refresh the page, same error and you still can't edit that cell. The user can break the ability to edit any cell like this.
For number 4, is the value supposed to be cleared when you disable it?
The function check_transport_cost(e) only runs on blur. That doesn't prevent the user from clicking the save button when there's an empty value there and that breaks the way the form is rendered.
This may be a separate bug , but even if the alert pops up, the user can just ignore it and put any string value and click save, it's not doing proper form validation.
Hey Brendan, I notice this behavior is also present as far back as 24.11.x. I also wondered if the value should be lost when we disable it. Since the bugfix in the patch is bad, libraries cannot edit their TCM, can we file this as a seperate bug and get this one in ASAP? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40655 Brendan Lawlor <blawlor@clamsnet.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40655 Brendan Lawlor <blawlor@clamsnet.org> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |blawlor@clamsnet.org |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40655 Brendan Lawlor <blawlor@clamsnet.org> 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=40655 Brendan Lawlor <blawlor@clamsnet.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #187218|0 |1 is obsolete| | --- Comment #5 from Brendan Lawlor <blawlor@clamsnet.org> --- Created attachment 187396 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=187396&action=edit Bug 40655: Fix logic of adding the disabled class Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40655 Brendan Lawlor <blawlor@clamsnet.org> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=40948 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40655 --- Comment #6 from Brendan Lawlor <blawlor@clamsnet.org> --- I filed a new bug for the form validation issue: bug 40948 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40655 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the| |This fixes a problem with release notes| |the transport cost matrix | |where fields that were | |disabled could not be made | |enabled via the interface, -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40655 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |25.11.00 released in| | Status|Passed QA |Pushed to main -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40655 --- Comment #7 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Nice work everyone! Pushed to main for 25.11 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40655 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to main |Pushed to stable Version(s)|25.11.00 |25.11.00,25.05.05 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40655 --- Comment #8 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Nice work everyone! Pushed to 25.05.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40655 Baptiste Wojtkowski (bwoj) <baptiste.wojtkowski@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |baptiste.wojtkowski@biblibr | |e.com Status|Pushed to stable |Needs documenting --- Comment #9 from Baptiste Wojtkowski (bwoj) <baptiste.wojtkowski@biblibre.com> --- Code is correct in 24.11.x, not backported -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org