Bug 40357

Summary: Notices and Slips library selection
Product: Koha Reporter: Christopher Brannon <cbrannon>
Component: ToolsAssignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: alex, dcook, george, lisette
Version: Main   
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: --- Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
Circulation function:

Description Christopher Brannon 2025-07-12 21:38:37 UTC
Currently, if a group of libraries out of the entire selection of libraries need to customize a slip or notice, you have to create a template for each library.

It would be more efficient if the templates applied to selected libraries in the template, much like we do for other things in Koha (like attributes).  Obviously it would cause issue if more than one copy of a particular template had the same library selected in both, so we could have Koha refuse to save the template with the offending duplicate library if detected.

If that were the case, it would need to show which library is being used in a similar template, and which template.  The editor could then either give the option to save without the offending libraries, or an option could be given to remove the offending libraries from the other template(s).

This workflow would allow us to maintain less templates, and not have to duplicate so much work.

Thoughts?
Comment 1 David Cook 2025-07-14 02:17:32 UTC
It's an interesting idea. 

At the moment, we store the "branchcode" in the "letter" table, which is why each library would need to create its own template. 

But your proposal would have us move "branchcode" out of that table and into a mapping/linking table. Generally speaking, this tends to be a better approach anyway.

So instead of creating a new template per library, you'd just be choosing which notice you're using for a given library and a given module/code combination. Sounds good to me. We could also instruct the database to enforce the unique constraint so we don't have to worry about duplicates. (Although we'd have to update the constraints of the current "letter" table.)

That said, if you could make many templates for a given module/code... you'd either have to specify every notice for every library, which could be burdensome (and have maintenance issues for new templates), or 1 given module/code could be labelled as "default". 

--

Anyway, it's not an enhancement I'll be working on, but it's an interesting idea.
Comment 2 Alex Carver 2025-07-24 16:34:04 UTC
+1 -- Would save a good deal of copying and would be much easier to keep track of which libraries are using which notices.