[Bug 39860] New: Add a system preference to allow for addtional/custom MARC fields in the record display
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 Bug ID: 39860 Summary: Add a system preference to allow for addtional/custom MARC fields in the record display Change sponsored?: --- Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: MARC Bibliographic data support Assignee: koha-bugs@lists.koha-community.org Reporter: lucas@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org It would be nice if we could define additional MARC fields in a system preference via Template Toolkit and then have them display on the results/detail pages. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 --- Comment #1 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Created attachment 182054 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=182054&action=edit Bug 39860: Add ExtraContentForXSLTDisplay system preference -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 --- Comment #2 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Created attachment 182055 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=182055&action=edit Bug 39860: Allow for the defining of custom MARC fields on the staff interface record display pages To test: 1. APPLY PATCH, updatedatabase, restart_all 2. Search for the new 'ExtraContentForXSLTDisplay' system preference 3. Find or create a record that has some MARC fields that don't show up by default in the record display. ( I tested using a 538$a ) 4. Add the following to the ExtraContentForXSLTDisplay sys pref: [% IF record.subfield('538' , 'a') %] <span class="results_summary test1"> <span class="label">The 538a: </span> [% record.subfield('538' , 'a') %] </span> [% END %] 5. Go to the record from step 3, you should see the 538$a labeled as 'The 538a:' with the appropriate data in it. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #182054|0 |1 is obsolete| | --- Comment #3 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Created attachment 182056 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=182056&action=edit Bug 39860: Add ExtraContentForXSLTDisplay system preference -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #182055|0 |1 is obsolete| | --- Comment #4 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Created attachment 182057 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=182057&action=edit Bug 39860: Allow for the defining of custom MARC fields on the staff interface record display pages To test: 1. APPLY PATCH, updatedatabase, restart_all 2. Search for the new 'ExtraContentForXSLTDisplay' system preference 3. Find or create a record that has some MARC fields that don't show up by default in the record display. ( I tested using a 538$a ) 4. Add the following to the ExtraContentForXSLTDisplay sys pref: [% IF record.subfield('538' , 'a') %] <span class="results_summary test1"> <span class="label">The 538a: </span> [% record.subfield('538' , 'a') %] </span> [% END %] 5. Go to the record from step 3, you should see the 538$a labeled as 'The 538a:' with the appropriate data in it. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |lucas@bywatersolutions.com |ity.org | -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 --- Comment #5 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Created attachment 182058 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=182058&action=edit Bug 39860: Use HTML scrubber to sanitize HTML -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #182058|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 --- Comment #6 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Still some problems: -Needs unit tests -I tried using HTML scrubber to scrub script tags but it scrubs too much. I want to be able to use most HTML tags, maybe just not JS? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #182058|1 |0 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 --- Comment #7 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Created attachment 182059 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=182059&action=edit Bug 39860: Fix scrubbing and handling of HTML/TT in MARC21 xsl -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 --- Comment #8 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- This was helpful: https://stackoverflow.com/questions/5268182/how-to-remove-namespaces-from-xm... -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 --- Comment #9 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- For repeating fields: [% IF record.subfield('538' , 'a') %] <span class="results_summary test1"> <span class="label">The 538a: </span> [% FOREACH f IN record.field('538') %] [% f.subfield('a') %] [% END %] </span> [% END %] -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au Status|Needs Signoff |Failed QA --- Comment #10 from David Cook <dcook@prosentient.com.au> --- I've got a few comments: 1. It looks like you figured out the profile/settings argument for C4::Scrubber in the end, but I'd argue that "staff" is too permissive. One could argue since it's a system preference an admin user could already inject malicious JS via *UserJS, but I suppose the danger here is the XSS coming from the MARC record without the admin user's knowledge. I think we'd need a more specific profile/setting for scrubbing this content. I had a bug report somewhere that allowed for scrubber settings that could be deployed locally for maximum flexibility, but I can't find it right now... Failing QA for this one. 2. Why would we need to run this through the XSLTs? Wouldn't it be more efficient add it to the return data of C4::XSLT::XSLTParse4Display()? (That is, right now we return the return value of $engine->transform(), but we could store that, append to it, and then return that concatenated value. You might have a good reason for not doing that, but I don't see what it is at a glance on my own.) 3. Technically, we don't use XHTML anymore - we use HTML5 which isn't fully XML-compatible, so in theory someone could enter valid HTML which might cause XSLT errors. I'd be curious how it handles HTML5's "<br>" instead of XHTML's "<br/>" for instance. I wonder if it would croak on there not being a closing tag. 4. You shouldn't use Koha::TemplateUtils::process_tt() here. I'll DM you with the reason why. Also Failed QA for this one. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 --- Comment #11 from David Cook <dcook@prosentient.com.au> --- (In reply to Lucas Gass (lukeg) from comment #6)
-I tried using HTML scrubber to scrub script tags but it scrubs too much. I want to be able to use most HTML tags, maybe just not JS?
In practice, this is actually pretty challenging to do. The obvious one is to restrict <script> tags, but there's lots of other ways of injecting Javascript via other tags and attributes. (I should compile a list one of these days, as it's difficult to keep track of them all, but that's also part of the problem with a list... maintenance of the list.) Anyway, not going to give away all my security secrets here, but just... yeah it's challenging balancing security and convenience/flexibility. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 --- Comment #12 from David Cook <dcook@prosentient.com.au> --- Note that once we apply Content-Security-Policy, we'll have a great broad layer that prevents XSS, although there's still other malicious things people could do beyond XSS. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 --- Comment #13 from David Cook <dcook@prosentient.com.au> --- That all said, I do think this is an interesting idea! In fact, generally speaking, it's a direction that I'm quite keen to explore! I like the ideas of libraries being able to have more direct control over the display of their data. I just want to make sure we do it in a secure way. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 --- Comment #14 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Disclaimer: I didn't read David's longer comment, but stumbled on the pref name: ExtraContentForXSLTDisplay. It made me think I would have to add XSLT, maybe we could use ExtraContentForDetailPage or similar instead? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 --- Comment #15 from David Cook <dcook@prosentient.com.au> --- (In reply to Katrin Fischer from comment #14)
Disclaimer: I didn't read David's longer comment
The short version is mostly "there are security problems" and a couple other potential gotchas. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 Esther Melander <esther.melander@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |esther.melander@bywatersolu | |tions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 Angela Berrett <angela.berrett@familysearch.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |angela.berrett@familysearch | |.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 --- Comment #16 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Created attachment 182230 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=182230&action=edit Bug 39860: Do not XSLT transform the custom content -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 --- Comment #17 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> ---
2. Why would we need to run this through the XSLTs?
Wouldn't it be more efficient add it to the return data of C4::XSLT::XSLTParse4Display()?
(That is, right now we return the return value of $engine->transform(), but we could store that, append to it, and then return that concatenated value. You might have a good reason for not doing that, but I don't see what it is at a glance on my own.)
You're right, no need to do that. I wrote a follow up to append the content you like suggest, after the XSLT transformation.
3. Technically, we don't use XHTML anymore - we use HTML5 which isn't fully XML-compatible, so in theory someone could enter valid HTML which might cause XSLT errors. I'd be curious how it handles HTML5's "<br>" instead of XHTML's "<br/>" for instance. I wonder if it would croak on there not being a closing tag.
This shouldn't be a problem now with the follow up patch not running through the XSLT transformation. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #182230|0 |1 is obsolete| | --- Comment #18 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Created attachment 182231 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=182231&action=edit Bug 39860: Do not XSLT transform the custom content -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #182056|0 |1 is obsolete| | --- Comment #19 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Created attachment 182232 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=182232&action=edit Bug 39860: Add ExtraContentForXSLTDisplay system preference -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #182057|0 |1 is obsolete| | --- Comment #20 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Created attachment 182233 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=182233&action=edit Bug 39860: Allow for the defining of custom MARC fields on the staff interface record display pages To test: 1. APPLY PATCH, updatedatabase, restart_all 2. Search for the new 'ExtraContentForXSLTDisplay' system preference 3. Find or create a record that has some MARC fields that don't show up by default in the record display. ( I tested using a 538$a ) 4. Add the following to the ExtraContentForXSLTDisplay sys pref: [% IF record.subfield('538' , 'a') %] <span class="results_summary test1"> <span class="label">The 538a: </span> [% record.subfield('538' , 'a') %] </span> [% END %] 5. Go to the record from step 3, you should see the 538$a labeled as 'The 538a:' with the appropriate data in it. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #182231|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #182059|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #182058|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |andrew@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 paxed <pasi.kallinen@koha-suomi.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |pasi.kallinen@koha-suomi.fi --- Comment #21 from paxed <pasi.kallinen@koha-suomi.fi> --- This is interesting, I'll have to look how the xslt changes our libraries want would work with this ... -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 carthur@slolibrary.org <carthur@slolibrary.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |carthur@slolibrary.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 George Williams (NEKLS) <george@nekls.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |george@nekls.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 Brendan Lawlor <blawlor@clamsnet.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |blawlor@clamsnet.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 Lari Strand <lmstrand@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lmstrand@gmail.com --- Comment #22 from Lari Strand <lmstrand@gmail.com> --- Could it be possible to pass the user's selected UI/intranet language so we could build translations based on it like: [% IF record.subfield('020' , 'q') %] [% IF lang == 'fi-FI' %] <span class="results_summary test1"> <span class="label">Sidosasu: </span> [% record.subfield('020' , 'q') %] </span> [% ELSIF lang == 'en' %] ... I tried to pass it as a variable in the XSLT.pm module but couldn't get it to show and the lang TT parameter used in other parts of Koha templates was not available. Could be that I'm not using the TT correctly. It feels like we can't use: [% USE AuthorisedValues %] [% USE Languages %] etc. either but my skills with template toolkit end here :). -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 --- Comment #23 from Lari Strand <lmstrand@gmail.com> --- Our specific need would be to translate codes you get from 942c ( Koha [default] item type ) to a readable form with translations for them. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 --- Comment #24 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- (In reply to Lari Strand from comment #23)
Our specific need would be to translate codes you get from 942c ( Koha [default] item type ) to a readable form with translations for them.
(In reply to Lari Strand from comment #22)
Could it be possible to pass the user's selected UI/intranet language so we could build translations based on it like:
[% IF record.subfield('020' , 'q') %] [% IF lang == 'fi-FI' %] <span class="results_summary test1"> <span class="label">Sidosasu: </span> [% record.subfield('020' , 'q') %] </span> [% ELSIF lang == 'en' %] ...
I tried to pass it as a variable in the XSLT.pm module but couldn't get it to show and the lang TT parameter used in other parts of Koha templates was not available. Could be that I'm not using the TT correctly. It feels like we can't use:
[% USE AuthorisedValues %] [% USE Languages %]
etc. either but my skills with template toolkit end here :).
Translations are a good point, I think the way to deal with that is probably to move this from a system preference to something like an HTML customization/additional contents. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=39184 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 --- Comment #25 from David Cook <dcook@prosentient.com.au> --- (In reply to Lucas Gass (lukeg) from comment #24)
Translations are a good point, I think the way to deal with that is probably to move this from a system preference to something like an HTML customization/additional contents.
Yeah I reckon that's probably the way to do it. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 Anneli Österman <anneli.osterman@koha-suomi.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |anneli.osterman@koha-suomi. | |fi -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 hacheng@pymblelc.nsw.edu.au changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |hacheng@pymblelc.nsw.edu.au -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Add a system preference to |Add a way to allow for |allow for addtional/custom |additional/custom MARC |MARC fields in the record |fields in the record |display |display -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 --- Comment #26 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Created attachment 183007 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=183007&action=edit Bug 39860: Move display control from system preference to additional contents -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #182232|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #182233|0 |1 is obsolete| | --- Comment #27 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Created attachment 183008 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=183008&action=edit Bug 39860: Allow for the defining of custom MARC fields on the staff interface record display pages To test: 0. APPLY PATCH, restart_all 1. Find or create a record that has some MARC fields that don't show up by default in the record display. ( I tested using a 538$a ) 2. Go to Tools and you should see a new link for 'Record display customizations'. 3. From Record display customizations click 'New Entry' 4. Choose a display location, the choices should be StaffResultsPage, StaffDetailPage, OPACResultsPage, and OPACDetailPage 5. Add the following to the entry: [% IF record.subfield('538' , 'a') %] <span class="results_summary test1"> <span class="label">The 538a: </span> [% record.subfield('538' , 'a') %] </span> [% END %] 6. Go to the record from step 1, you should see the 538$a labeled as 'The 538a:' with the appropriate data in it. 7. This should display in the appropriate location depending on if you chose StaffResultsPage, StaffDetailPage, OPACResultsPage, or OPACDetailPage. Check each of the locations. 8. Make a new, or edit existing, Record display customization and mark the 'Library:' field for a specific branch. Make sure that the Record display customization only shows up when you are logged in at that branch. 9. Install a new language pack, I tested with es-ES. 10. Make a new, or edit existing, Record display customization and fill out the language specific tab. Make sure the Record display customization shows correctly with the language you chose. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #183007|0 |1 is obsolete| | --- Comment #28 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Created attachment 183009 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=183009&action=edit Bug 39860: Move display control from system preference to additional contents -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 --- Comment #29 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Moved this over to additional contents and resetting the status to 'Needs sign-off'. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 --- Comment #30 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Created attachment 183010 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=183010&action=edit Bug 39860: Fix OPAC display location -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |39184 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39184 [Bug 39184] Server-side template injection leading to remote code execution -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 --- Comment #31 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Created attachment 183011 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=183011&action=edit Bug 39860: Add options for opac/staff lists -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA --- Comment #32 from David Cook <dcook@prosentient.com.au> --- Sorry but I'm going to fail this one again. I think 3/4 of my original issues from Comment 10 have been resolved, which is awesome. But I notice we're still using the "staff" profile for the HTML scrubber, and that's not going to prevent XSS, because it allows everything. In fact... I don't know why that profile was ever created. It looks like it goes back to the original creating of C4::Scrubber at f8fecb78634 Looking at existing use of the C4::Scrubber... we're using the profiles "note", "comment", and "default". I think we should actually remove the "staff" profile. I'll add a new bug for that... -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 --- Comment #33 from David Cook <dcook@prosentient.com.au> --- Comment on attachment 183008 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=183008 Bug 39860: Allow for the defining of custom MARC fields on the staff interface record display pages Review of attachment 183008: --> (https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=39860&attachment=183008) ----------------------------------------------------------------- ::: koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl @@ +14,3 @@
<xsl:template match="/"> <xsl:apply-templates/> </xsl:template>
Also this looks like an unnecessary whitespace change to this file. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=40087 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 --- Comment #34 from David Cook <dcook@prosentient.com.au> --- (In reply to David Cook from comment #32)
But I notice we're still using the "staff" profile for the HTML scrubber, and that's not going to prevent XSS, because it allows everything.
In fact... I don't know why that profile was ever created. It looks like it goes back to the original creating of C4::Scrubber at f8fecb78634
Looking at existing use of the C4::Scrubber... we're using the profiles "note", "comment", and "default". I think we should actually remove the "staff" profile. I'll add a new bug for that...
I've opened bug 40087 to remove the "staff" profile. I think this bug report should add its own profile to C4::Scrubber. I know it's hard to think up a list of allowed elements. I do think we need better ways of allowing for per-instance configuration of C4::Scrubber profiles (while retaining sensible secure defaults), but for now... especially since this is a new feature... I think we start with a small list and build up. I can't find it anymore, but once upon a time I swear I wrote a patch to make C4::Scrubber per-instance configurable, and I had a comprehensive list of safe elements. I'm sorry I can't find it now. I'd also encourage you to look at bug 38498. I don't have a patch there, but it's important to keep in mind. That is, we need to block many attributes (for instance, anything that starts with "on"), but it would be nice to be able to use some attributes like "id" and "class" at the very least, so we can use CSS. Happy to work with you on this one... -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 --- Comment #35 from Anneli Österman <anneli.osterman@koha-suomi.fi> --- I tested this in a sandbox and it did not work as expected. I added the 538a and the results were like in attached picture detailpage.png. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 --- Comment #36 from Anneli Österman <anneli.osterman@koha-suomi.fi> --- Created attachment 183035 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=183035&action=edit Detail page after adding 538a -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 --- Comment #37 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- (In reply to Anneli Österman from comment #35)
I tested this in a sandbox and it did not work as expected. I added the 538a and the results were like in attached picture detailpage.png.
What exactly did you add? It looks like it was for the OPAC detail page? I am unable to recreate this. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 --- Comment #38 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- (In reply to Anneli Österman from comment #35)
I tested this in a sandbox and it did not work as expected. I added the 538a and the results were like in attached picture detailpage.png.
Oh, I think maybe you copied my example into the WYSIWYG? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |40089 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40089 [Bug 40089] Add a less permissive C4::Scrubber profile to replace staff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 --- Comment #39 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- (In reply to David Cook from comment #32)
Sorry but I'm going to fail this one again.
I think 3/4 of my original issues from Comment 10 have been resolved, which is awesome.
But I notice we're still using the "staff" profile for the HTML scrubber, and that's not going to prevent XSS, because it allows everything.
In fact... I don't know why that profile was ever created. It looks like it goes back to the original creating of C4::Scrubber at f8fecb78634
Looking at existing use of the C4::Scrubber... we're using the profiles "note", "comment", and "default". I think we should actually remove the "staff" profile. I'll add a new bug for that...
I'm just curious why we scrub nothing in HTML customization, News, or Pages ( the other additional contents ) but need to scrub here? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 --- Comment #40 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Maybe what we need is a profile for all additional contents that was based on things to deny, instead of things to allow? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 --- Comment #41 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Created attachment 183077 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=183077&action=edit Bug 39860: Add record_display srubber profile -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 --- Comment #42 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- David, I added a specific 'record_display' scrubber profile. Let me know if you think that is going to restrictive enough. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 Bug 39860 depends on bug 40089, which changed state. Bug 40089 Summary: Add a less permissive C4::Scrubber profile to replace staff https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40089 What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |INVALID -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 Lisette Scheer <lisette@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lisette@bywatersolutions.co | |m --- Comment #52 from Lisette Scheer <lisette@bywatersolutions.com> --- (In reply to David Cook from comment #51)
So the WYSIWYG thing is an issue for sure.
We might want to make a change to the HTML customizations feature (or rather DB schema) that allows us to specify that some can only be edited using the text editor and not the WYSIWYG I reckon...
In my in progress work on css and js snippets I'm doing this to make them always load the text: [% IF ( wysiwyg ) && category != 'js_snippets' && category != 'css_snippets' %] [% SET editmode = "wysiwyg" %] I worry about being too restrictive when the library is already going to be vetting employees. Could we compromise by doing a more restrictive scrub unless you have specific permissions and not allow editing of ones that would be scrubbed if you didn't have the right permission? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 --- Comment #53 from David Cook <dcook@prosentient.com.au> --- (In reply to Lisette Scheer from comment #52)
(In reply to David Cook from comment #51)
So the WYSIWYG thing is an issue for sure.
We might want to make a change to the HTML customizations feature (or rather DB schema) that allows us to specify that some can only be edited using the text editor and not the WYSIWYG I reckon...
In my in progress work on css and js snippets I'm doing this to make them always load the text:
[% IF ( wysiwyg ) && category != 'js_snippets' && category != 'css_snippets' %] [% SET editmode = "wysiwyg" %]
Hard-coding might work for a POC but I think we'll probably want to put that into the database.
I worry about being too restrictive when the library is already going to be vetting employees.
I don't think most libraries worldwide are vetting their employees very carefully or at all.
Could we compromise by doing a more restrictive scrub unless you have specific permissions and not allow editing of ones that would be scrubbed if you didn't have the right permission?
Honestly, I'd say both-and rather than either-or. The person editing the UI should have higher permissions than someone adding a news item. But it should still be scrubbed either way. Content management systems do this, and if we're going to offer content management, we need to do it too. -- Does Bywater already have this feature locally? If so, then it should be easy to come up with a list of elements and attributes to allow list. If not, then I think we use the Wordpress list as a first pass. If there is concern that it won't be comprehensive enough, then we need to make a way to re-configure it on the backend. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 --- Comment #54 from David Cook <dcook@prosentient.com.au> --- (Apologies if it takes me some time to respond. My mail server is blocking Bugzilla so I'm not getting email notifications at this time.) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 Bug 39860 depends on bug 39184, which changed state. Bug 39184 Summary: Server-side template injection leading to remote code execution https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39184 What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to oldoldstable |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #183077|0 |1 is obsolete| | --- Comment #55 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Created attachment 183774 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=183774&action=edit Bug 39860: Add record_display srubber profile -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 --- Comment #56 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- David, I have written a more comprehensive allow list for 'record display'. It is based on the elements I find in the details and results pages. The idea is to be able to use the elements I find there to create similar custom displays. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 --- Comment #57 from David Cook <dcook@prosentient.com.au> --- (In reply to Lucas Gass (lukeg) from comment #56)
David,
I have written a more comprehensive allow list for 'record display'. It is based on the elements I find in the details and results pages. The idea is to be able to use the elements I find there to create similar custom displays.
I've sent you some feedback on Mattermost. Overall, I think it's looking OK although there are some rules missing for elements like "img" and the table related elements. Are you sure that you can use regex for the key names in the rules? A glance at HTML::Scrubber source code suggests that won't work. I would suggest adding a unit test for the C4/Scrubber.pm to test your profile to make sure it's working the way you expect it to work. Overall, I think it's looking good though. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 --- Comment #58 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Created attachment 185835 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=185835&action=edit Bug 39860: Update scrubber profile and add Scrubber.t test -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 --- Comment #59 from David Cook <dcook@prosentient.com.au> --- Thanks again for all your work on this one. I'm going to try to get this one soon. I was actually setting up a new local scrubber recently, and it's given me some thoughts on ways of defining profiles in more concise ways. Looking at the rules, I wasn't familiar with "property", "typeof", and "resource" but then I recalled we have some use of Schema.org with microdata and RDFa. I can't imagine those being needed in many cases, but I suppose I can for record display particularly. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 --- Comment #60 from David Cook <dcook@prosentient.com.au> --- I've tried out the patches and it seems to work. I still don't understand how you can specify a key like 'h1|h2|h3|h4|h5|h6' or 'ul|ol' but it appears to work. I'll have to dig into that more later... -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 --- Comment #61 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> ---
Looking at the rules, I wasn't familiar with "property", "typeof", and "resource" but then I recalled we have some use of Schema.org with microdata and RDFa. I can't imagine those being needed in many cases, but I suppose I can for record display particularly.
Yes, when I was thinking about this scrubber profile I wanted to make sure staff could add everything to a custom record display that is currently included in the default record display. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 --- Comment #62 from David Cook <dcook@prosentient.com.au> --- (In reply to David Cook from comment #60)
I still don't understand how you can specify a key like 'h1|h2|h3|h4|h5|h6' or 'ul|ol' but it appears to work. I'll have to dig into that more later...
Oh man... I need to stop using Splinter Review and just look at the patches. I totally missed that C4/Scrubber.pm was updated in that last patch to not use 'h1|h2|h3|h4|h5|h6' or 'ul|ol'. I like to say to people if something seems like it's magic or like you're going crazy, you're probably just looking at the wrong thing. And that's proven to be true once again... -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #183008|0 |1 is obsolete| | --- Comment #63 from David Cook <dcook@prosentient.com.au> --- Created attachment 185865 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=185865&action=edit Bug 39860: Allow for the defining of custom MARC fields on the staff interface record display pages To test: 0. APPLY PATCH, restart_all 1. Find or create a record that has some MARC fields that don't show up by default in the record display. ( I tested using a 538$a ) 2. Go to Tools and you should see a new link for 'Record display customizations'. 3. From Record display customizations click 'New Entry' 4. Choose a display location, the choices should be StaffResultsPage, StaffDetailPage, OPACResultsPage, and OPACDetailPage 5. Add the following to the entry: [% IF record.subfield('538' , 'a') %] <span class="results_summary test1"> <span class="label">The 538a: </span> [% record.subfield('538' , 'a') %] </span> [% END %] 6. Go to the record from step 1, you should see the 538$a labeled as 'The 538a:' with the appropriate data in it. 7. This should display in the appropriate location depending on if you chose StaffResultsPage, StaffDetailPage, OPACResultsPage, or OPACDetailPage. Check each of the locations. 8. Make a new, or edit existing, Record display customization and mark the 'Library:' field for a specific branch. Make sure that the Record display customization only shows up when you are logged in at that branch. 9. Install a new language pack, I tested with es-ES. 10. Make a new, or edit existing, Record display customization and fill out the language specific tab. Make sure the Record display customization shows correctly with the language you chose. Signed-off-by: David Cook <dcook@prosentient.com.au> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #183009|0 |1 is obsolete| | --- Comment #64 from David Cook <dcook@prosentient.com.au> --- Created attachment 185866 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=185866&action=edit Bug 39860: Move display control from system preference to additional contents Signed-off-by: David Cook <dcook@prosentient.com.au> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #183010|0 |1 is obsolete| | --- Comment #65 from David Cook <dcook@prosentient.com.au> --- Created attachment 185867 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=185867&action=edit Bug 39860: Fix OPAC display location Signed-off-by: David Cook <dcook@prosentient.com.au> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #183011|0 |1 is obsolete| | --- Comment #66 from David Cook <dcook@prosentient.com.au> --- Created attachment 185868 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=185868&action=edit Bug 39860: Add options for opac/staff lists Signed-off-by: David Cook <dcook@prosentient.com.au> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #183774|0 |1 is obsolete| | --- Comment #67 from David Cook <dcook@prosentient.com.au> --- Created attachment 185869 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=185869&action=edit Bug 39860: Add record_display srubber profile Signed-off-by: David Cook <dcook@prosentient.com.au> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #185835|0 |1 is obsolete| | --- Comment #68 from David Cook <dcook@prosentient.com.au> --- Created attachment 185870 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=185870&action=edit Bug 39860: Update scrubber profile and add Scrubber.t test Signed-off-by: David Cook <dcook@prosentient.com.au> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off --- Comment #69 from David Cook <dcook@prosentient.com.au> --- Thanks for all your work on this and your patience, Lucas. It looks great. If someone else wants to Sign Off on this, I'd be happy to upgrade mine to a Passed QA. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 OpenFifth Sandboxes <sandboxes@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #185865|0 |1 is obsolete| | --- Comment #70 from OpenFifth Sandboxes <sandboxes@openfifth.co.uk> --- Created attachment 185900 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=185900&action=edit Bug 39860: Allow for the defining of custom MARC fields on the staff interface record display pages To test: 0. APPLY PATCH, restart_all 1. Find or create a record that has some MARC fields that don't show up by default in the record display. ( I tested using a 538$a ) 2. Go to Tools and you should see a new link for 'Record display customizations'. 3. From Record display customizations click 'New Entry' 4. Choose a display location, the choices should be StaffResultsPage, StaffDetailPage, OPACResultsPage, and OPACDetailPage 5. Add the following to the entry: [% IF record.subfield('538' , 'a') %] <span class="results_summary test1"> <span class="label">The 538a: </span> [% record.subfield('538' , 'a') %] </span> [% END %] 6. Go to the record from step 1, you should see the 538$a labeled as 'The 538a:' with the appropriate data in it. 7. This should display in the appropriate location depending on if you chose StaffResultsPage, StaffDetailPage, OPACResultsPage, or OPACDetailPage. Check each of the locations. 8. Make a new, or edit existing, Record display customization and mark the 'Library:' field for a specific branch. Make sure that the Record display customization only shows up when you are logged in at that branch. 9. Install a new language pack, I tested with es-ES. 10. Make a new, or edit existing, Record display customization and fill out the language specific tab. Make sure the Record display customization shows correctly with the language you chose. Signed-off-by: David Cook <dcook@prosentient.com.au> Signed-off-by: Anneli Österman <anneli.osterman@koha-suomi.fi> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 OpenFifth Sandboxes <sandboxes@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #185866|0 |1 is obsolete| | --- Comment #71 from OpenFifth Sandboxes <sandboxes@openfifth.co.uk> --- Created attachment 185901 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=185901&action=edit Bug 39860: Move display control from system preference to additional contents Signed-off-by: David Cook <dcook@prosentient.com.au> Signed-off-by: Anneli Österman <anneli.osterman@koha-suomi.fi> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 OpenFifth Sandboxes <sandboxes@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #185867|0 |1 is obsolete| | --- Comment #72 from OpenFifth Sandboxes <sandboxes@openfifth.co.uk> --- Created attachment 185902 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=185902&action=edit Bug 39860: Fix OPAC display location Signed-off-by: David Cook <dcook@prosentient.com.au> Signed-off-by: Anneli Österman <anneli.osterman@koha-suomi.fi> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 OpenFifth Sandboxes <sandboxes@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #185868|0 |1 is obsolete| | --- Comment #73 from OpenFifth Sandboxes <sandboxes@openfifth.co.uk> --- Created attachment 185903 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=185903&action=edit Bug 39860: Add options for opac/staff lists Signed-off-by: David Cook <dcook@prosentient.com.au> Signed-off-by: Anneli Österman <anneli.osterman@koha-suomi.fi> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 OpenFifth Sandboxes <sandboxes@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #185869|0 |1 is obsolete| | --- Comment #74 from OpenFifth Sandboxes <sandboxes@openfifth.co.uk> --- Created attachment 185904 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=185904&action=edit Bug 39860: Add record_display srubber profile Signed-off-by: David Cook <dcook@prosentient.com.au> Signed-off-by: Anneli Österman <anneli.osterman@koha-suomi.fi> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 OpenFifth Sandboxes <sandboxes@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #185870|0 |1 is obsolete| | --- Comment #75 from OpenFifth Sandboxes <sandboxes@openfifth.co.uk> --- Created attachment 185905 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=185905&action=edit Bug 39860: Update scrubber profile and add Scrubber.t test Signed-off-by: David Cook <dcook@prosentient.com.au> Signed-off-by: Anneli Österman <anneli.osterman@koha-suomi.fi> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 --- Comment #76 from Anneli Österman <anneli.osterman@koha-suomi.fi> --- I'm still a bit worried about how poorly WYSIWYG handles things but otherwise everything worked according to test plan so I signed this off. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 --- Comment #77 from David Cook <dcook@prosentient.com.au> --- (In reply to Anneli Österman from comment #76)
I'm still a bit worried about how poorly WYSIWYG handles things but otherwise everything worked according to test plan so I signed this off.
That's a good point actually. Maybe we should add a patch that forces the code editor for this type of HTML customization since it just can't work with WYSIWYG at this stage. For bug 11583 I worked on making the WYSIWYG editor compatible with the <<>> and [%%] syntax, but... it couldn't work with Template Toolkit embedded in HTML. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 --- Comment #78 from David Cook <dcook@prosentient.com.au> --- Lucas, do you think you could do a patch to force the editor to just be the code editor and not the WYSIWYG? Just to help protect people from themselves a bit? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 Katie Bliss <kebliss@dmpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kebliss@dmpl.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 Michael Adamyk <michael.adamyk@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |michael.adamyk@bywatersolut | |ions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 --- Comment #79 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Created attachment 187898 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=187898&action=edit Bug 39860: Disable WYSIWYG for record display entries -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 --- Comment #80 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- (In reply to David Cook from comment #78)
Lucas, do you think you could do a patch to force the editor to just be the code editor and not the WYSIWYG? Just to help protect people from themselves a bit?
Yes! I made a follow-up to disable the WYSIWYG for this. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the| |Adds a way to enhance release notes| |bibliographic displays | |including the staff | |interface result and detail | |pages, and the OPAC's | |result and detail pages. | |This is done through | |"Tools" > "Additional | |content" > "Record display | |customizations". -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=40659 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 Mathieu Saby <mathsabypro@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mathsabypro@gmail.com --- Comment #81 from Mathieu Saby <mathsabypro@gmail.com> --- I did not read all the comments but I am not sure to understand the purpose of this bug. In my library we wanted to display some new fields in our records, and to hide others, and we just made changes to the XSLT files. It's very easy to do, especially with the help of an LLM. Why add a new way to manage the display of records? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 --- Comment #82 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- (In reply to Mathieu Saby from comment #81)
I did not read all the comments but I am not sure to understand the purpose of this bug. In my library we wanted to display some new fields in our records, and to hide others, and we just made changes to the XSLT files. It's very easy to do, especially with the help of an LLM. Why add a new way to manage the display of records?
Mathieu, thanks for having a look here! Using custom XSLT is not a sustainable solution for us. First of all, it is not something that can be done by most library staff. Writing XSLT is a technical bar for many. Template Toolkit is much easier and is something that many librarians are already familiar with from notices and slips. Custom XSLT also must be rebased against changes to the XSLT that happen in community. This can take a lot of time OR you end up with XSLT files that are far behind the community versions. So the purpose of this bug, and the reason to add a new way to manage record display, is to provide a tool that librarians can use to modify there record display in a sustainable way. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 --- Comment #83 from David Cook <dcook@prosentient.com.au> --- (In reply to Lucas Gass (lukeg) from comment #82)
(In reply to Mathieu Saby from comment #81)
I did not read all the comments but I am not sure to understand the purpose of this bug. In my library we wanted to display some new fields in our records, and to hide others, and we just made changes to the XSLT files. It's very easy to do, especially with the help of an LLM. Why add a new way to manage the display of records?
Using custom XSLT is not a sustainable solution for us.
When supporting many Koha instances across many platforms around the world, it's also quite onerous for devs to push changes for a tiny little MARC display customization. I think this enhancement will improve maintainability and customization of Koha. I'll be doing another round of review today on this, and hopefully moving it forward! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |40659 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40659 [Bug 40659] Allow "My virtual card" format and content to be customizable -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 --- Comment #84 from David Cook <dcook@prosentient.com.au> --- Comment on attachment 187898 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=187898 Bug 39860: Disable WYSIWYG for record display entries Review of attachment 187898: --> (https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=39860&attachment=187898) ----------------------------------------------------------------- ::: koha-tmpl/intranet-tmpl/prog/en/modules/tools/additional-contents.tt @@ +351,4 @@
><button class="btn btn-default dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false"> </button> <ul class="dropdown-menu"> <li> + [% IF ( wysiwy || category == 'record_display' ) %]
It looks like you've got a little typo there where you've turned "wysiwyg" into "wysiwy". I can just add a follow-up for that... -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 --- Comment #85 from David Cook <dcook@prosentient.com.au> --- Comment on attachment 187898 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=187898 Bug 39860: Disable WYSIWYG for record display entries Review of attachment 187898: --> (https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=39860&attachment=187898) ----------------------------------------------------------------- Hmm... actually this patch doesn't seem to work at all... and the typo didn't seem to do anything which is interesting... -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 --- Comment #86 from David Cook <dcook@prosentient.com.au> --- (In reply to David Cook from comment #85)
Comment on attachment 187898 [details] [review] Bug 39860: Disable WYSIWYG for record display entries
Review of attachment 187898 [details] [review]: -----------------------------------------------------------------
Hmm... actually this patch doesn't seem to work at all... and the typo didn't seem to do anything which is interesting...
Ah my bad. I'm looking at the wrong spot. The patch changes "New entry", but the problem is with the toggle next to the "Edit" button in the Action column. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 --- Comment #87 from David Cook <dcook@prosentient.com.au> --- Test plan doesn't mention OPACListPage and StaffListPage but they do work so that's awesome :D -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 --- Comment #88 from David Cook <dcook@prosentient.com.au> --- I noticed the "Preview content" was still vulnerable to XSS, so I've fixed that in a follow-up as well. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #185900|0 |1 is obsolete| | --- Comment #89 from David Cook <dcook@prosentient.com.au> --- Created attachment 188724 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=188724&action=edit Bug 39860: Allow for the defining of custom MARC fields on the staff interface record display pages To test: 0. APPLY PATCH, restart_all 1. Find or create a record that has some MARC fields that don't show up by default in the record display. ( I tested using a 538$a ) 2. Go to Tools and you should see a new link for 'Record display customizations'. 3. From Record display customizations click 'New Entry' 4. Choose a display location, the choices should be StaffResultsPage, StaffDetailPage, OPACResultsPage, and OPACDetailPage 5. Add the following to the entry: [% IF record.subfield('538' , 'a') %] <span class="results_summary test1"> <span class="label">The 538a: </span> [% record.subfield('538' , 'a') %] </span> [% END %] 6. Go to the record from step 1, you should see the 538$a labeled as 'The 538a:' with the appropriate data in it. 7. This should display in the appropriate location depending on if you chose StaffResultsPage, StaffDetailPage, OPACResultsPage, or OPACDetailPage. Check each of the locations. 8. Make a new, or edit existing, Record display customization and mark the 'Library:' field for a specific branch. Make sure that the Record display customization only shows up when you are logged in at that branch. 9. Install a new language pack, I tested with es-ES. 10. Make a new, or edit existing, Record display customization and fill out the language specific tab. Make sure the Record display customization shows correctly with the language you chose. Signed-off-by: David Cook <dcook@prosentient.com.au> Signed-off-by: Anneli Österman <anneli.osterman@koha-suomi.fi> Signed-off-by: David Cook <dcook@prosentient.com.au> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #185901|0 |1 is obsolete| | --- Comment #90 from David Cook <dcook@prosentient.com.au> --- Created attachment 188725 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=188725&action=edit Bug 39860: Move display control from system preference to additional contents Signed-off-by: David Cook <dcook@prosentient.com.au> Signed-off-by: Anneli Österman <anneli.osterman@koha-suomi.fi> Signed-off-by: David Cook <dcook@prosentient.com.au> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #185902|0 |1 is obsolete| | --- Comment #91 from David Cook <dcook@prosentient.com.au> --- Created attachment 188726 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=188726&action=edit Bug 39860: Fix OPAC display location Signed-off-by: David Cook <dcook@prosentient.com.au> Signed-off-by: Anneli Österman <anneli.osterman@koha-suomi.fi> Signed-off-by: David Cook <dcook@prosentient.com.au> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #185903|0 |1 is obsolete| | --- Comment #92 from David Cook <dcook@prosentient.com.au> --- Created attachment 188727 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=188727&action=edit Bug 39860: Add options for opac/staff lists Signed-off-by: David Cook <dcook@prosentient.com.au> Signed-off-by: Anneli Österman <anneli.osterman@koha-suomi.fi> Signed-off-by: David Cook <dcook@prosentient.com.au> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #185904|0 |1 is obsolete| | --- Comment #93 from David Cook <dcook@prosentient.com.au> --- Created attachment 188728 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=188728&action=edit Bug 39860: Add record_display srubber profile Signed-off-by: David Cook <dcook@prosentient.com.au> Signed-off-by: Anneli Österman <anneli.osterman@koha-suomi.fi> Signed-off-by: David Cook <dcook@prosentient.com.au> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #185905|0 |1 is obsolete| | --- Comment #94 from David Cook <dcook@prosentient.com.au> --- Created attachment 188729 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=188729&action=edit Bug 39860: Update scrubber profile and add Scrubber.t test Signed-off-by: David Cook <dcook@prosentient.com.au> Signed-off-by: Anneli Österman <anneli.osterman@koha-suomi.fi> Signed-off-by: David Cook <dcook@prosentient.com.au> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #187898|0 |1 is obsolete| | --- Comment #95 from David Cook <dcook@prosentient.com.au> --- Created attachment 188730 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=188730&action=edit Bug 39860: Disable WYSIWYG for record display entries Signed-off-by: David Cook <dcook@prosentient.com.au> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 --- Comment #96 from David Cook <dcook@prosentient.com.au> --- Created attachment 188731 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=188731&action=edit Bug 39860: (QA follow-up) fix XSS vulnerability and fix disabling of WYSIWYG Signed-off-by: David Cook <dcook@prosentient.com.au> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 --- Comment #97 from Lisette Scheer <lisette@bywatersolutions.com> --- (In reply to David Cook from comment #96)
Created attachment 188731 [details] [review] Bug 39860: (QA follow-up) fix XSS vulnerability and fix disabling of WYSIWYG
Signed-off-by: David Cook <dcook@prosentient.com.au>
Wouldn't this: [% IF ( wysiwyg || category == 'record_display' ) %] make it show the dropdown when there's a record display even though it should just be loading the text editor, not the dropdown? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 --- Comment #98 from David Cook <dcook@prosentient.com.au> --- (In reply to Lisette Scheer from comment #97)
Wouldn't this:
[% IF ( wysiwyg || category == 'record_display' ) %]
make it show the dropdown when there's a record display even though it should just be loading the text editor, not the dropdown?
Could you elaborate? The dropdown is shown either way. This just makes the dropdown show the correct option(s). Are you saying it would be better to just not show the dropdown all together? I think you'd probably be correct there. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 --- Comment #99 from Lisette Scheer <lisette@bywatersolutions.com> --- (In reply to David Cook from comment #98)
Could you elaborate?
The dropdown is shown either way. This just makes the dropdown show the correct option(s).
Are you saying it would be better to just not show the dropdown all together? I think you'd probably be correct there.
Ah, yeah I misread where in the building of the button that was. I would think there doesn't need to be a dropdown because there's only one way to edit it. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |dcook@prosentient.com.au |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |25.11.00 released in| | Status|Passed QA |Pushed to main -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 --- Comment #100 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Nice work everyone! Pushed to main for 25.11 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 --- Comment #101 from Jonathan Druart <jonathan.druart@gmail.com> --- Created attachment 189146 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=189146&action=edit Bug 39860: Fix selenium/opac_holds.t # Failed test 'Correctly in search results page' # at t/db_dependent/selenium/opac_holds.t line 88. # 'Error: Can't use an undefined value as a HASH reference at /kohadevbox/koha/C4/XSLT.pm line 247' # doesn't match '(?^u:Results of search for 'opac holds test place hold button')' might be a conflict with bug 40943 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@gmail.com Keywords| |additional_work_needed -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 Miranda Nero <mnero@oslri.net> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mnero@oslri.net -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|additional_work_needed | --- Comment #102 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- follow-up pushed to main -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 Chip Halvorsen <Chip.Halvorsen@WestlakeLibrary.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |Chip.Halvorsen@WestlakeLibr | |ary.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 --- Comment #103 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Displaying a single subfield works really well. Could we have some examples on how to display controlfield contents and full fields or a list of subfields as well? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 --- Comment #104 from Anneli Österman <anneli.osterman@koha-suomi.fi> --- Here are some examples that we have tested. They are created with the help of Copilot. We haven't had need for controlfield's so no examples of those ones. <!-- Binding form --> [% IF record.subfield('020' , 'q') %] <span class="results_summary binding"> <span class="label">Binding form: </span> [% record.subfield('020' , 'q') %] </span> [% END %] <!-- Age limit --> [% IF record.subfield('049','c') %] <span class="results_summary agelimit"> <span class="label">Age limit: </span> [% record.subfield('049','c') %] </span> [% END %] <!-- Producing country --> [% SET values = [] %] [% FOREACH f IN record.fields %] [% IF f.tag == '257' %] [% FOREACH sf IN f.subfields %] [% IF sf.0 == 'a' && sf.1 %] [% values.push(sf.1) %] [% END %] [% END %] [% END %] [% END %] [% IF values.size %] <span class="results_summary producing_country"> <span class="label">Producing country: </span> [% values.join(', ') %] </span> [% END %] <!-- Current publication frequency --> [% IF record.subfield('310' , 'a') %] <span class="results_summary publication_frequency"> <span class="label">Current publication frequency: </span> [% record.subfield('310' , 'a') %] </span> [% END %] <!-- Encoding format --> [% vals = [] %] [% FOREACH f IN record.fields %] [% IF f.tag == '347' %] [% FOREACH sf IN f.subfields %] [% IF sf.0 == 'b' %] [% vals.push(sf.1) %] [% END %] [% END %] [% END %] [% END %] [% IF vals.size %] <span class="results_summary encoding_format"> <span class="label">Encoding format: </span> [% vals.join(', ') %] </span> [% END %] <!-- Associated place --> [% SET parts = [] %] [% IF record.subfield('370','c'); parts.push(record.subfield('370','c')); END %] [% IF record.subfield('370','f'); parts.push(record.subfield('370','f')); END %] [% IF record.subfield('370','g'); parts.push(record.subfield('370','g')); END %] [% IF parts.size %] <span class="results_summary associated_place"> <span class="label">Associated place: </span> [% parts.join(', ') %] </span> [% END %] [% SET allparts = [] %] <!-- Performance medium --> [% SET allparts = [] %] [% FOREACH f IN record.fields %] [% IF f.tag != '382' %] [% NEXT %] [% END %] [% SET mediums = [] %] [% SET soloists = [] %] [% FOREACH sf IN f.subfields %] [% IF sf.0 == 'a' %] [% SET m = { a => sf.1, n => '' } %] [% mediums.push(m) %] [% ELSIF sf.0 == 'n' %] [% SET mcount = mediums.size %] [% IF mcount > 0 %] [% SET last_idx = mcount - 1 %] [% IF !mediums.$last_idx.n %] [% SET mediums.$last_idx.n = sf.1 %] [% ELSE %] [% SET mediums.$last_idx.n = sf.1 %] [% END %] [% END %] [% ELSIF sf.0 == 'b' %] [% soloists.push(sf.1) %] [% END %] [% END %] [% SET parts = [] %] [% FOREACH m IN mediums %] [% IF m.a %] [% IF m.n %] [% parts.push(m.a _ ' (' _ m.n _ ')') %] [% ELSE %] [% parts.push(m.a) %] [% END %] [% END %] [% END %] [% IF soloists.size %] [% FOREACH b IN soloists %] [% parts.push(b) %] [% END %] [% END %] [% IF parts.size %] [% allparts.push(parts.join(', ')) %] [% END %] [% END %] [% IF allparts.size %] <span class="results_summary performance_medium"> <span class="label">Esityskokoonpano: </span> [% allparts.join('; ') %] </span> [% END %] <!-- Creator/contributor characteristics --> [% SET parts = [] %] [% IF record.subfield('386','m'); parts.push(record.subfield('386','m')); END %] [% IF record.subfield('386','a'); parts.push(record.subfield('386','a')); END %] [% IF parts.size %] <span class="results_summary creator_characteristics"> <span class="label">Creator/contributor characteristics: </span> [% parts.join(': ') %] </span> [% END %] <!-- Creation time --> [% SET values = [] %] [% FOREACH f IN record.fields %] [% IF f.tag == '388' %] [% FOREACH sf IN f.subfields %] [% IF sf.0 == 'a' %] [% values.push(sf.1) %] [% END %] [% END %] [% END %] [% END %] [% IF values.size %] <span class="results_summary creation_time"> <span class="label">Creation time: </span> [% values.join(', ') %] </span> [% END %] -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 Michelle Spinney <mspinney@clamsnet.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mspinney@clamsnet.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 David Liddle <david_liddle@sil.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |david_liddle@sil.org --- Comment #105 from David Liddle <david_liddle@sil.org> --- Hello! I was directed here from Bug 38677 by Lucas. What you've done here seems fantastic, though I have yet to give it a try in a sandbox. I will need to do that soon and pass the results on to my colleagues. Our group chose to follow LTS versions from 22.11 onward, but we may need to make an exception on this occasion. Thank you each for the work you put into this effort! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 Irene <i.tortorella@arts.ac.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |i.tortorella@arts.ac.uk -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 Hanna Dehlin <hanna.dehlin@hkr.se> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |hanna.dehlin@hkr.se --- Comment #106 from Hanna Dehlin <hanna.dehlin@hkr.se> --- (In reply to Katrin Fischer from comment #103)
Displaying a single subfield works really well. Could we have some examples on how to display controlfield contents and full fields or a list of subfields as well?
Here is an example of how to display data from controlfield 001: <span class="results_summary record_id"> <span class="label">Record ID: </span> [% record.field('001').data %] </span> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to main |Needs documenting -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 justin.swink@littleelm.gov <Justin.Swink@littleelm.gov> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |Justin.Swink@littleelm.gov -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39860 Philip Orr <philip.orr@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs documenting |RESOLVED Documentation| |Philip Orr contact| | Documentation| |https://gitlab.com/koha-com submission| |munity/koha-manual/-/merge_ | |requests/1189 Resolution|--- |FIXED CC| |philip.orr@lmscloud.de -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org