Summary: | Cannot change module for notice templates | ||
---|---|---|---|
Product: | Koha | Reporter: | Nicole C. Engard <nengard> |
Component: | Tools | Assignee: | Owen Leonard <oleonard> |
Status: | CLOSED FIXED | QA Contact: | Bugs List <koha-bugs> |
Severity: | major | ||
Priority: | P5 - low | CC: | chris, koha.sekjal |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
URL: | cgi-bin/koha/tools/letter.pl | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Attachments: |
Proposed fix
[SIGNED-OFF] Fix for Bug 4419 - cannot change module for notice templates |
Description
Chris Cormack
2010-05-21 01:26:57 UTC
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. |