Bug 41431 - Circulation rule notes dropping when editing rule
Summary: Circulation rule notes dropping when editing rule
Status: Pushed to main
Alias: None
Product: Koha
Classification: Unclassified
Component: System Administration (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low major
Assignee: Emmi Takkinen
QA Contact: Kyle M Hall (khall)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-12-11 12:20 UTC by Gretchen Maxeiner
Modified: 2026-02-09 13:36 UTC (History)
4 users (show)

See Also:
GIT URL:
Initiative type: ---
Sponsorship status: ---
Comma delimited list of Sponsors:
Crowdfunding goal: 0
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
This fixes editing circulation and fine rules with notes - notes are now correctly shown when editing, and are not lost when saving the rule. Previously, if you edited a rule with a note, it was not displayed in the edit field and was removed when the rule was saved.
Version(s) released in:
26.05.00
Circulation function:


Attachments
Bug 41431: Use correct data-attribute to fetch existing circulation rule note (1.94 KB, patch)
2025-12-29 09:40 UTC, Emmi Takkinen
Details | Diff | Splinter Review
Bug 41431: Use correct data-attribute to fetch existing circulation rule note (1.98 KB, patch)
2025-12-29 17:33 UTC, David Nind
Details | Diff | Splinter Review
Bug 41431: Use correct data-attribute to fetch existing circulation rule note (2.05 KB, patch)
2026-02-06 14:25 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Gretchen Maxeiner 2025-12-11 12:20:56 UTC
In the circulation rules, there is a note field for each policy line. If you click Edit on a line with a note, the note field is not displayed in the editing line and is blanked upon save (i.e., the note is lost, even if you made no edits on the note). This behavior is new since 24.11.03, the last time we made edits on our rules with notes.
Comment 1 Emmi Takkinen 2025-12-29 09:40:28 UTC
Created attachment 190754 [details] [review]
Bug 41431: Use correct data-attribute to fetch existing circulation rule note

If you click Edit on a line with a note, the note field is not displayed
in the editing line and is blanked upon save (i.e., the note is lost,
even if you made no edits on the note). Value of the note is stored to
data-attribute which was changed to use Bootstraps own data-attribute.
So now the value must be fetched with keyword "bsContent" instead of
just "content".

To test:
1. Add note for a circulation rule.
2. Edit the rule.
=> Note that notes value is not displayed in editing row.
3. Apply this patch.
4. Edit rule again.
=> Note that notes value is now displayed as expected.

Sponsored-by: Koha-Suomi Oy
Comment 2 David Nind 2025-12-29 17:33:45 UTC
Created attachment 190765 [details] [review]
Bug 41431: Use correct data-attribute to fetch existing circulation rule note

If you click Edit on a line with a note, the note field is not displayed
in the editing line and is blanked upon save (i.e., the note is lost,
even if you made no edits on the note). Value of the note is stored to
data-attribute which was changed to use Bootstraps own data-attribute.
So now the value must be fetched with keyword "bsContent" instead of
just "content".

To test:
1. Add note for a circulation rule.
2. Edit the rule.
=> Note that notes value is not displayed in editing row.
3. Apply this patch.
4. Edit rule again.
=> Note that notes value is now displayed as expected.

Sponsored-by: Koha-Suomi Oy
Signed-off-by: David Nind <david@davidnind.com>
Comment 3 Kyle M Hall (khall) 2026-02-06 14:25:36 UTC
Created attachment 192618 [details] [review]
Bug 41431: Use correct data-attribute to fetch existing circulation rule note

If you click Edit on a line with a note, the note field is not displayed
in the editing line and is blanked upon save (i.e., the note is lost,
even if you made no edits on the note). Value of the note is stored to
data-attribute which was changed to use Bootstraps own data-attribute.
So now the value must be fetched with keyword "bsContent" instead of
just "content".

To test:
1. Add note for a circulation rule.
2. Edit the rule.
=> Note that notes value is not displayed in editing row.
3. Apply this patch.
4. Edit rule again.
=> Note that notes value is now displayed as expected.

Sponsored-by: Koha-Suomi Oy
Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 4 Lucas Gass (lukeg) 2026-02-06 22:21:23 UTC
Nice work everyone!

Pushed to main for 26.05
Comment 5 Gretchen Maxeiner 2026-02-09 13:33:13 UTC
Is this a candidate for backport? That would help us out at the end of the academic term when we make daily edits in the circ rules.
Comment 6 Katrin Fischer 2026-02-09 13:36:25 UTC
This is a data loss bug so I have increased the severity. It would create quite a problem for our libraries if the notes were accidentally lost (there is also no logging for circulation rules, so no way to restore).