[Koha-bugs] [Bug 34585] "When to charge" columns value not copied when editing circulation rule

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Jan 3 17:32:06 CET 2024


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34585

Lucas Gass <lucas at bywatersolutions.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #160370|0                           |1
        is obsolete|                            |

--- Comment #7 from Lucas Gass <lucas at bywatersolutions.com> ---
Created attachment 160488
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=160488&action=edit
Bug 34585: Fix behaviour of select dropdowns when editing circulation rules

When chancing rule to edit via "Edit" button in circulation rules table,
dropdown values aren't always changed correctly. Pressing "Edit" first time
works, but after that previous rules values persist. Same happens when one
tries to clear edit row, values aren't set to default values. This happens
with every input with a dropdown in it. This mostly happanes because we set
attribute "selected" to selected options, but never clear them which leads
to values persisting. In columns "Patron category" and "Itemtype" value "All",
or "*" as it is in code, doesn't match to any existing values from database
and can't be changed via pressing "Edit" button.

To reproduce:
1. Select a rule to edit and then select another rule to edit.
2. Repeat this couple of times and observe what values dropdowns fields display
in edit row.
=> Selected values in dropdowns aren't always changed based on rule that you
are
currently editing. Instead after changing rule couple of times value doesn't
change at all.
3. Press "Clear" button to return edit rows values back to default values.
=> Values in dropdowns aren't set back as default, instead they have same
values as rule
you edited before pressing "Clear".

After reproducing problem, apply this patch and proceed to test "Clear" and
"Edit" buttons.

To test "Edit" button:
1. Again, select a rule to edit and then select a another rule to edit.
2. Observe what values dropdowns fields display in edit row.
=> Confirm that values are changed based on rule that you are currently editing
and this behaviour doesn't change after selecting new rule to edit couple of
times.

To test "Clear" button:
1. Press "Clear" button.
=> Values in dropdowns should now be set as default values.

Sponsored-by: Koha-Suomi Oy
Signed-off-by: Lucas Gass <lucas at bywatersolutions.com>

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list