---- Reported by nengard@gmail.com 2010-04-27 20:22:28 ---- I created a notice template and picked the wrong module so i went back to edit it. I chose a new module and hit save and it did not change the module. --- Bug imported by chris@bigballofwax.co.nz 2010-05-21 01:26 UTC --- This bug was previously known as _bug_ 4419 at http://bugs.koha.org/cgi-bin/bugzilla3/show_bug.cgi?id=4419 Actual time not defined. Setting to 0.0 Setting qa contact to the default for this product. This bug either had no qa contact or an invalid one.
In my test the problem isn't that submitting the form doesn't do anything, it's that it does the wrong thing. What happens is a *new* notice is created with the update values you set. You end up with a duplicate notice with the updated module value. This problem happens because of the way submissions are handled. First the code checks to see if you're updating a notice or editing it: if (letter_exists($module, $code)) {... The letter isn't going to exist, because the value for $module is the *new* value you're trying to update it to. There for the code proceeds to performing an insert instead of an update.
Created attachment 5086 [details] [review] Proposed fix Adding a hidden form field to contain the original module so that it can be used in the check for an existing entry. Before applying this patch, editing a notice and changing its module will result in a duplicate notice being created with just the module changed. After applying this patch the notice you edit will be updated with the new module without creating a duplicate.
Created attachment 5135 [details] [review] [SIGNED-OFF] Fix for Bug 4419 - cannot change module for notice templates Adding a hidden form field to contain the original module so that it can be used in the check for an existing entry. Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Simple change, easy to read. Some changes to spacing that are purely aesthetic and do not cause any breakage. Marking as Passed QA.
Pushed, please test
The fix for this bug was published in the 3.4.5 release. If you were the reporter of this bug, please take time to verify the fix and update the status of this bug report accordingly. If the bug is fixed to your satisfaction, please close this report.