[Bug 35151] New: Convert ILLModuleCopyrightClearance system preference to additional contents
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35151 Bug ID: 35151 Summary: Convert ILLModuleCopyrightClearance system preference to additional contents Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: OPAC Assignee: oleonard@myacpl.org Reporter: oleonard@myacpl.org QA Contact: testopia@bugs.koha-community.org CC: testopia@bugs.koha-community.org Depends on: 31383, 35065 Blocks: 26050 Building on 22318, the ILLModuleCopyrightClearance system preference should be converted to an HTML customization option. Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26050 [Bug 26050] [OMNIBUS] Convert system preferences to HTML customizations https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31383 [Bug 31383] Additional contents: We need a parent and child table https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35065 [Bug 35065] Convert SelfCheckHelpMessage system preference to HTML customization -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35151 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |35152 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35152 [Bug 35152] Convert RoutingListNote 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=35151 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35151 --- Comment #1 from Owen Leonard <oleonard@myacpl.org> --- This bug is trickier than other similar ones because we don't just show the ILLModuleCopyrightClearance message or not based on whether it is present. Instead, there is an additional step to the OPAC ILL request process if ILLModuleCopyrightClearance is present. This is easy to do with a system preference, but I don't think there are any instances of Koha checking for the existence of an html customization at the perl module level. I brought up this issue on IRC: https://irc.koha-community.org/koha/2023-10-26#i_2517477 There's not a consensus that this is the way to go, but this is what I got working in Illrequest.pm: sub backend_create { my ( $self, $params ) = @_; # Establish whether we need to do a generic copyright clearance. if ( $params->{opac} ) { my $copyright_content = Koha::AdditionalContents->search_for_display( { category => 'html_customizations', location => ['ILLModuleCopyrightClearance'], lang => $params->{lang}, library_id => $params->{branchcode}, } ); if ( ( !$params->{stage} || $params->{stage} eq 'init' ) && $copyright_content->count ) { ... Is this a terrible idea? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35151 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |pedro.amorim@ptfs-europe.co | |m --- Comment #2 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Adding our ILL topic expert :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35151 --- Comment #3 from Pedro Amorim <pedro.amorim@ptfs-europe.com> --- I think, ideally, this is what we'd do: 1) Update ILLModuleCopyrightClearance handling to be a ILL:Workflow stage like TypeDisclaimer or Availability, see bug 33716. The difference between CopyrightClearance and the other 2 is that CopyrightClearance only shows up in the OPAC and comes up before the create form, whereas the other 2 show up after the create form. I wanted to do this in bug 33716 but was out of scope for that specific bug. 2) sub backend_create should not handle ILLModuleCopyrightClearance directly, but instead have something like Koha::Illrequest::Workflow::CopyrightClearance->show_copyrightclearance and have that class do all the HTML customization logic handling. (In reply to Owen Leonard from comment #1)
sub backend_create { my ( $self, $params ) = @_;
# Establish whether we need to do a generic copyright clearance. if ( $params->{opac} ) {
my $copyright_content = Koha::AdditionalContents->search_for_display( { category => 'html_customizations', location => ['ILLModuleCopyrightClearance'], lang => $params->{lang}, library_id => $params->{branchcode}, } );
if ( ( !$params->{stage} || $params->{stage} eq 'init' ) && $copyright_content->count ) { ...
Is this a terrible idea?
I think this works, but I'm not familiar with HTML customizations enough to see possible issues this may open. What happens if more than one HTML customization exists for 'ILLModuleCopyrightClearance' location? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35151 --- Comment #4 from Owen Leonard <oleonard@myacpl.org> --- (In reply to Pedro Amorim from comment #3)
What happens if more than one HTML customization exists for 'ILLModuleCopyrightClearance' location?
It will show them all, in the order specified. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35151 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff 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=35151 --- Comment #5 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 158668 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=158668&action=edit Bug 35151: Convert ILLModuleCopyrightClearance system preference to additional contents This patch moves the ILLModuleCopyrightClearance system preference into HTML customizations, making it possible to have language- and library-specific content. To test you should have some content in the ILLModuleCopyrightClearance system preference before applying the patch. Apply the patch, run the database update process, and rebuild the OPAC CSS. - In the staff client, go to Tools -> HTML customizations and verify that the content from ILLModuleCopyrightClearance is now stored there. - The HTML customization entry form should offer ILLModuleCopyrightClearance as a choice under "Display location." - Update and reinstall active translations (for instance fr-FR): - perl misc/translator/translate update fr-FR - perl misc/translator/translate install fr-FR - Enable the translation if necessary under Administration -> System preferences -> language. - Enable the "opaclanguagesdisplay" preference if necessary. - Edit the ILLModuleCopyrightClearance HTML customization and add unique content to the "fr-FR" tab. - Enable the "ILLModule" and "ILLModuleUnmediated" system preferences if necessary. You must have at least one ILL backend installed. - Log into the OPAC and click the "Interlibrary loan requests" in the sidebar menu on the user summary page. - Click "Create new request." - You should be taken to a page with your ILLModuleCopyrightClearance content shown along with "Yes" and "No" buttons. - Clicking "Yes" should take you to the form for creating a new request. - Switch to your updated translation and confirm that the content appears correctly. - Remove all "ILLModuleCopyrightClearance" html customizations. Test the "Create new request" process in the OPAC again. - There should be no confirmation step before arriving at the form for creating a new ILL request. - Go to Administration -> System preferences and search for "ILLModuleCopyrightClearance." It should return no results. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35151 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #158668|0 |1 is obsolete| | --- Comment #6 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 158741 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=158741&action=edit Bug 35151: Convert ILLModuleCopyrightClearance system preference to additional contents This patch moves the ILLModuleCopyrightClearance system preference into HTML customizations, making it possible to have language- and library-specific content. To test you should have some content in the ILLModuleCopyrightClearance system preference before applying the patch. Apply the patch, run the database update process, and rebuild the OPAC CSS. - In the staff client, go to Tools -> HTML customizations and verify that the content from ILLModuleCopyrightClearance is now stored there. - The HTML customization entry form should offer ILLModuleCopyrightClearance as a choice under "Display location." - Update and reinstall active translations (for instance fr-FR): - perl misc/translator/translate update fr-FR - perl misc/translator/translate install fr-FR - Enable the translation if necessary under Administration -> System preferences -> language. - Enable the "opaclanguagesdisplay" preference if necessary. - Edit the ILLModuleCopyrightClearance HTML customization and add unique content to the "fr-FR" tab. - Enable the "ILLModule" and "ILLModuleUnmediated" system preferences if necessary. You must have at least one ILL backend installed. - Log into the OPAC and click the "Interlibrary loan requests" in the sidebar menu on the user summary page. - Click "Create new request." - You should be taken to a page with your ILLModuleCopyrightClearance content shown along with "Yes" and "No" buttons. - Clicking "Yes" should take you to the form for creating a new request. - Switch to your updated translation and confirm that the content appears correctly. - Remove all "ILLModuleCopyrightClearance" html customizations. Test the "Create new request" process in the OPAC again. - There should be no confirmation step before arriving at the form for creating a new ILL request. - Go to Administration -> System preferences and search for "ILLModuleCopyrightClearance." It should return no results. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35151 --- Comment #7 from Pedro Amorim <pedro.amorim@ptfs-europe.com> --- I'll be looking into this when I get the chance, it's in my pile! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35151 Pedro Amorim <pedro.amorim@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35151 Pedro Amorim <pedro.amorim@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #158741|0 |1 is obsolete| | --- Comment #8 from Pedro Amorim <pedro.amorim@ptfs-europe.com> --- Created attachment 159659 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=159659&action=edit Bug 35151: Convert ILLModuleCopyrightClearance system preference to additional contents This patch moves the ILLModuleCopyrightClearance system preference into HTML customizations, making it possible to have language- and library-specific content. To test you should have some content in the ILLModuleCopyrightClearance system preference before applying the patch. Apply the patch, run the database update process, and rebuild the OPAC CSS. - In the staff client, go to Tools -> HTML customizations and verify that the content from ILLModuleCopyrightClearance is now stored there. - The HTML customization entry form should offer ILLModuleCopyrightClearance as a choice under "Display location." - Update and reinstall active translations (for instance fr-FR): - perl misc/translator/translate update fr-FR - perl misc/translator/translate install fr-FR - Enable the translation if necessary under Administration -> System preferences -> language. - Enable the "opaclanguagesdisplay" preference if necessary. - Edit the ILLModuleCopyrightClearance HTML customization and add unique content to the "fr-FR" tab. - Enable the "ILLModule" and "ILLModuleUnmediated" system preferences if necessary. You must have at least one ILL backend installed. - Log into the OPAC and click the "Interlibrary loan requests" in the sidebar menu on the user summary page. - Click "Create new request." - You should be taken to a page with your ILLModuleCopyrightClearance content shown along with "Yes" and "No" buttons. - Clicking "Yes" should take you to the form for creating a new request. - Switch to your updated translation and confirm that the content appears correctly. - Remove all "ILLModuleCopyrightClearance" html customizations. Test the "Create new request" process in the OPAC again. - There should be no confirmation step before arriving at the form for creating a new ILL request. - Go to Administration -> System preferences and search for "ILLModuleCopyrightClearance." It should return no results. Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35151 --- Comment #9 from Pedro Amorim <pedro.amorim@ptfs-europe.com> --- This is great, not only the language specific but also library specific option. My only minor concern (not about this patch) is that, before, ILL related options where somewhat exclusive to sys prefs, now it's sys prefs and html customizations (among others, like ILL batch statuses in the Koha admin) but this relates to a different problem, one that could maybe be addressed by having an ILL config dedicated admin page where all ILL related configs would be accessible through that. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35151 Bug 35151 depends on bug 35065, which changed state. Bug 35065 Summary: Convert SelfCheckHelpMessage system preference to HTML customization https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35065 What |Removed |Added ---------------------------------------------------------------------------- Status|Needs documenting |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=35151 Pedro Amorim <pedro.amorim@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |pedro.amorim@ptfs-europe.co |y.org |m CC| |david@davidnind.com, | |martin.renvoize@ptfs-europe | |.com, nugged@gmail.com, | |victor@tuxayo.net --- Comment #10 from Pedro Amorim <pedro.amorim@ptfs-europe.com> --- Adding others to this bug to have more eyes on it. If someone else SOs feel free to convert my SO to PQA. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35151 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #159659|0 |1 is obsolete| | --- Comment #11 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 162590 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=162590&action=edit Bug 35151: Convert ILLModuleCopyrightClearance system preference to additional contents This patch moves the ILLModuleCopyrightClearance system preference into HTML customizations, making it possible to have language- and library-specific content. To test you should have some content in the ILLModuleCopyrightClearance system preference before applying the patch. Apply the patch, run the database update process, and rebuild the OPAC CSS. - In the staff client, go to Tools -> HTML customizations and verify that the content from ILLModuleCopyrightClearance is now stored there. - The HTML customization entry form should offer ILLModuleCopyrightClearance as a choice under "Display location." - Update and reinstall active translations (for instance fr-FR): - perl misc/translator/translate update fr-FR - perl misc/translator/translate install fr-FR - Enable the translation if necessary under Administration -> System preferences -> language. - Enable the "opaclanguagesdisplay" preference if necessary. - Edit the ILLModuleCopyrightClearance HTML customization and add unique content to the "fr-FR" tab. - Enable the "ILLModule" and "ILLModuleUnmediated" system preferences if necessary. You must have at least one ILL backend installed. - Log into the OPAC and click the "Interlibrary loan requests" in the sidebar menu on the user summary page. - Click "Create new request." - You should be taken to a page with your ILLModuleCopyrightClearance content shown along with "Yes" and "No" buttons. - Clicking "Yes" should take you to the form for creating a new request. - Switch to your updated translation and confirm that the content appears correctly. - Remove all "ILLModuleCopyrightClearance" html customizations. Test the "Create new request" process in the OPAC again. - There should be no confirmation step before arriving at the form for creating a new ILL request. - Go to Administration -> System preferences and search for "ILLModuleCopyrightClearance." It should return no results. Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35151 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA --- Comment #12 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Adding my own testing here and upgrading Pedro to a PQA. I would love to have seen some unit tests, but alas I think that's a little more involved given where this touches. Current unit tests are all passing and the QA script is happy. PQA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35151 --- Comment #13 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- You missed removing the system preference from sysprefs.sql. I'll provide 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=35151 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to main Version(s)| |24.05.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35151 --- Comment #14 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Pushed for 24.05! Well done everyone, thank you! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35151 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |additional_work_needed --- Comment #15 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- We also missed removing the ILLModuleCopyrightClearance preference from the YAML files. Please fix! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35151 --- Comment #16 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- (In reply to Katrin Fischer from comment #15)
We also missed removing the ILLModuleCopyrightClearance preference from the YAML files. Please fix!
I've written the follow-up. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35151 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- 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=35151 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m Status|Pushed to main |Needs documenting --- Comment #17 from Fridolin Somers <fridolin.somers@biblibre.com> --- Not backported to 23.11.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35151 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com Component|OPAC |ILL Assignee|oleonard@myacpl.org |koha-bugs@lists.koha-commun | |ity.org -- 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=35151 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |oleonard@myacpl.org |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=35151 Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Documentation| |https://gitlab.com/koha-com submission| |munity/koha-manual/-/merge_ | |requests/908 Status|Needs documenting |RESOLVED CC| |caroline.cyr-la-rose@inlibr | |o.com Resolution|--- |FIXED Documentation| |Caroline Cyr La Rose contact| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35151 Bug 35151 depends on bug 31383, which changed state. Bug 31383 Summary: Additional contents: We need a parent and child table https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31383 What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to main |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=35151 Pedro Amorim <pedro.amorim@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |41237 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41237 [Bug 41237] OPAC created requests ignore library selection, always default to patron's library -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org