https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36716
--- Comment #2 from Emily Lamancusa <[email protected]> --- Created attachment 170214 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=170214&action=edit Bug 36716: Do special processing based on input id, not column index When a user clicks "Edit" ( .editrule ) we use JavaScript to loop through each of the columns in the table to copy the appropriate values into the input fields. Fields that need special processing are identified by the column index, which can lead to problems when the index varies between Koha versions or columns are shown/hidden based on syspref settings. In the current main, there is at least one such bug causing the value for "no automatic renewal before" not to propagate, but to get silently saved in the "no automatic renewal before (hard limit)" field instead. Identifying fields for special processing based on input id rather than index should fix the above issue and avoid similar regressions. To test: 1. Create a circulation rule that has: a) a value (such as 30) in the column "No automatic renewal after" b) no value in the column "No automatic renewal after (hard limit)" 2. Click the button to edit the circulation rule from step 1 --> The text field for "No automatic renewal after" is blank 3. Save the rule without making any changes --> "No automatic renewal after" is now blank for this rule, but "No automatic renewal after (hard limit)" has a date in it 4. Apply patch 5. Repeat steps 1-3 --> "No automatic renewal after" and "No automatic renewal after (hard limit)" now preserve their values correctly 6. Create a circulation rule that has a non-default value in every field 7. Edit the circulation rule from step 6 --> Confirm that all values are copied to the edit fields correctly 8. Save the rule without making any changes --> Confirm that the rule saved correctly 9. Create a circulation rule, leaving the following columns blank: "Current checkouts allowed" "Current on-site checkouts allowed" "Holds allowed (total)" "Holds allowed (daily)" "Holds per record (count)" --> The above columns should display as "Unlimited" 10. Edit the rule from step 9 --> The input fields for the above columns should be blank 11. Save the rule without making any changes --> The above fields should still display as "Unlimited" -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
