Bug 34585: Add data-code attribute to chargeperiod_charge_at selector

When one tries to edit circulation rule "When to charge"
columns value is always set as "End of interval". This patch adds
data-code attribute to chargeperiod_charge_at selector
to define existing rules value.

To reproduce:
1. Navigate to Circulation and fine rules page.
2. Find or create a rule with a "When to charge" value set as
"Start of interval".
3. Edit rule.
=> Note that "When to charge" value is now "End of interval",
while as the other values should be copied as they were.
4. Apply this patch.
5. Edit rule again.
=> "When to charge" should now be copied correctly.

Sponsored-by: Koha-Suomi Oy
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 2ca65e0a06)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 86fc6301a7)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
Emmi Takkinen 2023-08-22 13:45:27 +03:00 committed by Fridolin Somers
parent 3b4c4b44d8
commit e8dee53c62
1 changed files with 7 additions and 1 deletions

View File

@ -287,7 +287,13 @@
<td>[% decreaseloanholds | html %]</td>
<td>[% fine | $Price %]</td>
<td>[% chargeperiod | html %]</td>
<td>[% IF chargeperiod_charge_at %]Start of interval[% ELSE %]End of interval[% END %]</td>
<td data-code="[% chargeperiod_charge_at | html %]">
[% IF chargeperiod_charge_at %]
Start of interval
[% ELSE %]
End of interval
[% END %]
</td>
<td>[% firstremind | html %]</td>
<td>[% IF overduefinescap %][% overduefinescap | $Price %][% ELSE %][% END %]</td>
<td>