<div dir="auto">All valid points raise<div dir="auto"><br></div><div dir="auto">Tl:Dr</div><div dir="auto"><span style="font-family:sans-serif">I'll be watching this idea with interest but am currently on the fence as to the benefits and drawbacks</span><br></div><div dir="auto"><span style="font-family:sans-serif"><br></span></div><div dir="auto">Spurious mind stream follows<br><div dir="auto"><br></div><div dir="auto">At the moment I'm comfortable with the slow progression I'm seeing with circ type system preferences migrating unit the circ rules matrix (and that'll be more manageable with the new UX that's in the pipe there too).</div><div dir="auto"><br></div><div dir="auto">I've felt for a very long time that we could do with some better dependancy management in our preferences highlighting how they interact with each other and depend upon each other.. but that's another story.</div><div dir="auto"><br></div><div dir="auto">As for the general approach taken by Tomas I'm excited by it, but also not entirely sure about the filtering criteria matching the existing circ rules sets.  I feel like at least some of the Prefs make allot of sense in their own tables with a specific UI.</div><div dir="auto"><br></div><div dir="auto">.</div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, 4 Aug 2020, 7:37 pm Tomas Cohen Arazi, <<a href="mailto:tomascohen@gmail.com">tomascohen@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">When I said pattern, I was pointing to some recent devs I've been involved in, in which there existed a global syspref, and we added category-spcific overrides (for example password strength enforcement) or if an itemtype is excluded from LocalHoldsPriority.<div><br></div><div>In those cases we added a new column to the related table (categories, itemtypes).</div><div><br></div><div>As a general rule, I'd say most of the sysprefs could be moved as 'global' (i.e. no library, on item type or category) unless there's room to enhance them to make them per some of the other criterias.</div><div>I personally prefer  to keep my dev as-is (it is almost finished and happy with the smtp_servers table). But there was some room for thinking about a more general approach to sysprefs. which sometimes are combined with information from other places and it is not that easy for the end user to understand the different interactions between them. Take the password strength sysprefs, and the category-specific overrides. It would be better to provide a nice UI for setting global and on a per-category basis this. And we could have some flag to identify the ones to be displayed on the system preferences pages specifically.</div><div><br></div><div>Regarding 'how to choose the right SMTP' server, I think it really depends on the context. My guess is we should use the library from which the 'From' attribute is picked. And we will be safe.</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">El mar., 4 ago. 2020 a las 12:15, Frédéric Demians (<<a href="mailto:frederic@tamil.fr" target="_blank" rel="noreferrer">frederic@tamil.fr</a>>) escribió:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">I concur with Julian observations. A configuration selection per<br>
library-item_type-category will be too much or not enough depending on the<br>
context. We will end up with another table containing zillions of records for<br>
trivial things. Tomas, have you considered a hierarchical configuration data<br>
structure like the one found in Sublime text editor (I recall you're a Sublime<br>
user...) ? We currently also have all those "YAML" configurations that are<br>
stored in files (OAI, ElasticSeach) or in system preferences that won't fit in<br>
a new library-type-category configuration table. The XML configuration files<br>
fall into the same category of data structure.<br>
<br>
Another onservation. You express this need:<br>
<br>
  the ability to set values with per-library, per-item type and per-category<br>
  basis, as well as default catch-all<br>
<br>
We have this need (this 'pattern' as you said) potentially everywhere in Koha.<br>
But we also need (1) more, and (2) a clear understanding of how the<br>
'catch-all' or the 'fall-back' works.<br>
<br>
(1) We need more (eventually). For example, you may need to combine the item<br>
type with the ccode,  item homebranch, and borrowr branch, in order to select<br>
a claim letter. This could be something like this:<br>
<br>
  item.homebranch ne 'MAIN' && item.ccode eq 'EBOOK' &&<br>
  borrower.country ne 'Monaco' && borrower.branchcode eq 'SCIENCE'<br>
<br>
(2) We need to understand how the various criteria are evaluated and in which<br>
order. Sequential order seems reasonable. With this, having an issue, you<br>
evaluate 3 criteria in order to select a value:<br>
<br>
[<br>
  {<br>
    "criteria": "item.homebranch eq 'MAIN' && borrower.category eq 'ADULT'",<br>
    "value": "abcd"<br>
  },<br>
  {<br>
    "criteria": "borrower.category eq 'PRO'",<br>
    "value": "efghi"<br>
  },<br>
  {<br>
    "value": "abcd"<br>
  }<br>
]<br>
_______________________________________________<br>
Koha-devel mailing list<br>
<a href="mailto:Koha-devel@lists.koha-community.org" target="_blank" rel="noreferrer">Koha-devel@lists.koha-community.org</a><br>
<a href="https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel" rel="noreferrer noreferrer" target="_blank">https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel</a><br>
website : <a href="http://www.koha-community.org/" rel="noreferrer noreferrer" target="_blank">http://www.koha-community.org/</a><br>
git : <a href="http://git.koha-community.org/" rel="noreferrer noreferrer" target="_blank">http://git.koha-community.org/</a><br>
bugs : <a href="http://bugs.koha-community.org/" rel="noreferrer noreferrer" target="_blank">http://bugs.koha-community.org/</a><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr"><div dir="ltr"><div><div dir="ltr"><div style="font-size:12.8px">Tomás Cohen Arazi</div><div style="font-size:12.8px">Theke Solutions (<a href="http://theke.io/" target="_blank" rel="noreferrer">http://theke.io</a>)<br>✆ +54 9351 3513384<br>GPG: B2F3C15F</div></div></div></div></div>
_______________________________________________<br>
Koha-devel mailing list<br>
<a href="mailto:Koha-devel@lists.koha-community.org" target="_blank" rel="noreferrer">Koha-devel@lists.koha-community.org</a><br>
<a href="https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel" rel="noreferrer noreferrer" target="_blank">https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel</a><br>
website : <a href="http://www.koha-community.org/" rel="noreferrer noreferrer" target="_blank">http://www.koha-community.org/</a><br>
git : <a href="http://git.koha-community.org/" rel="noreferrer noreferrer" target="_blank">http://git.koha-community.org/</a><br>
bugs : <a href="http://bugs.koha-community.org/" rel="noreferrer noreferrer" target="_blank">http://bugs.koha-community.org/</a><br>
</blockquote></div>