Currently we have a generic 'Report a problem' link at the bottom of all pages on the OPAC.. however there's no easy way to report a problem about a specific biblio. We could add a more specific 'Report a problem with this record' option on the details display and record the biblionumber so staff can quickly see the record in context.
Created attachment 137412 [details] Specification
I've opted to specify this as an independence feature.. it more closely resembled checkout notes from a workflow perspective than it does the opac problem reports system and the sponsor wanted to be able to enabled/disable the features separately. I can see a route to merging the checkout notes feature into this piece as part of a modernisation effort at a later date too.
Created attachment 139222 [details] [review] Bug 31028: Add catalog_concerns table
Created attachment 139223 [details] [review] Bug 31028: DBIC Schema
Created attachment 139224 [details] [review] Bug 31028: Add `CatalogConcerns` and `OpacCatalogConcerns` preferences This patch adds the `CatalogConcerns` and `OpacCatalogeConcerns` system preferences to enable/disable the catalog concerns feature on the OPAC and Staff client interfaces.
Created attachment 139225 [details] [review] Bug 31028: Add catalog concerns endpoints This patch adds the staff accessible REST API endpoints for catalog concerns. New endpoints available: * POST /catalog/concerns * GET /catalog/concerns * GET /catalog/concerns/{concern_id} * PUT /catalog/concerns/{concern_id} * DELETE /catalog/concenrs/{concern_id}
Created attachment 139226 [details] [review] Bug 31028: Add relations to Catalog::Concern This patch adds the reporter, resolver and biblio relations to the Catalog::Concern class and exposes them to the API as appropriate.
Created attachment 139227 [details] [review] Bug 31028: Add Public API endpoint
Created attachment 139228 [details] [review] Bug 31028: Add 'Report a concern' to OPAC details This patch adds a new 'Report a concern' option to the right sidebar on the opac detail page. On clicking the link, a modal will display allowing the user to enter a short message regarding their concerns and then submission will record said message.
Created attachment 139229 [details] [review] Bug 31028: Trigger login modal when not logged in This isn't perfect, we detect if there is a logged in user on the OPAC and replace the concern report modal with the login modal if we don't find a valid session. Unfortunelty, we can't then trigger a redirect back to the record details as that's not how our get_template_and_user authentication system works.. instead we end up back at opac-user.pl.
Created attachment 139230 [details] [review] Bug 31028: Tie OPAC display to logged in state This is an alternative to th previous patch.. we can't easily redirect back to the right location after login from our modal. It would be preferable to display the button and prompt a login if we don't have a valid session.. but that's not trivial using the API's and our login flows at the moment.
Created attachment 139231 [details] [review] Bug 31028: Add a catalog concerns management page This patch adds a new cataloguing concerns page to the staff client for managing reported catalog concerns.
Created attachment 139232 [details] [review] Bug 31028: Add 'special:undefined' to handle passing 'null' We can't pass 'null' to the column.search as it gets stringified. This patch adds a special string 'special:undefined' to denote that we want to search on undef for the field in question.
Created attachment 139233 [details] [review] Bug 31028: Add filters to concerns management
Created attachment 139234 [details] [review] Bug 31028: Add resolution endpoint This patch adds a /resolve endpoint to the catalog concerns endpoints.
Created attachment 139235 [details] [review] Bug 31028: Add resolve action This patch adds a resolution workflow to the catalog concerns management page.
Created attachment 139236 [details] [review] Bug 31028: Add 'Add catalog concern' to cataloguing toolbar This patch moves the add concern modal js and template markup into their own files and then references them to add the 'Add concern' option to the cataloguing toolbar.
Created attachment 139237 [details] [review] Bug 31028: Add notice trigger for catalog concerns This patch adds a new system prefernce, `CatalogerEmails`. If set with a valid email address adding a new catalog concern should produce a notification email sent to that address.
Created attachment 139238 [details] [review] Bug 31028: Add trigger and notice to resolve This patch adds a sample notice and sets up the trigger to notify the concern reporter when a concern is marked as resolved. The notification itself is optional at resolve time.
The text in the template, "A short summary of what the library policy is for dealing with such concerns and what constitutes a valid concern" should be customizable via Additional Contents
* Should we prevent the user from submitting more than one concern on a record? I'm thinking in particular about how this feature might be abused. * The breadcrumbs on the page say Cataloging > Concerns, but currently the feature is only accessible via tools or the home page. I would probably pick tools for now and maybe revise that choice after the new cataloging home page arrives? Same with the sidebar menu. * I get an error in the browser console when I click "Configure" on the datatable on the catalog concerns page.
(In reply to Owen Leonard from comment #21) > * Should we prevent the user from submitting more than one concern on a > record? I'm thinking in particular about how this feature might be abused. That's probably a good idea, though I don't think we do anything like this for OPAC Problem Reports which could face similar abuse. I'd be tempted to add this as a follow-up bug to keep the submission here a little smaller if you'd be happy with that? > * The breadcrumbs on the page say Cataloging > Concerns, but currently the > feature is only accessible via tools or the home page. I would probably pick > tools for now and maybe revise that choice after the new cataloging home > page arrives? Same with the sidebar menu. Good point.. Adding a link to tools was somewhat of an afterthought to be honest.. I initially only exposed it via the 'Pending catalog concerns' display on the main page. I can strip those bits out here, though it could also lead to code inconsistencies as the templates and controllers live under /cataloguing at the moment. > * I get an error in the browser console when I click "Configure" on the > datatable on the catalog concerns page. Oh, good catch.
Created attachment 139572 [details] [review] Bug 31028: Add catalog_concerns table
Created attachment 139573 [details] [review] Bug 31028: DBIC Schema
Created attachment 139574 [details] [review] Bug 31028: Add `CatalogConcerns` and `OpacCatalogConcerns` preferences This patch adds the `CatalogConcerns` and `OpacCatalogeConcerns` system preferences to enable/disable the catalog concerns feature on the OPAC and Staff client interfaces.
Created attachment 139575 [details] [review] Bug 31028: Add catalog concerns endpoints This patch adds the staff accessible REST API endpoints for catalog concerns. New endpoints available: * POST /catalog/concerns * GET /catalog/concerns * GET /catalog/concerns/{concern_id} * PUT /catalog/concerns/{concern_id} * DELETE /catalog/concenrs/{concern_id}
Created attachment 139576 [details] [review] Bug 31028: Add relations to Catalog::Concern This patch adds the reporter, resolver and biblio relations to the Catalog::Concern class and exposes them to the API as appropriate.
Created attachment 139577 [details] [review] Bug 31028: Add Public API endpoint
Created attachment 139578 [details] [review] Bug 31028: Add 'Report a concern' to OPAC details This patch adds a new 'Report a concern' option to the right sidebar on the opac detail page. On clicking the link, a modal will display allowing the user to enter a short message regarding their concerns and then submission will record said message.
Created attachment 139579 [details] [review] Bug 31028: Trigger login modal when not logged in This isn't perfect, we detect if there is a logged in user on the OPAC and replace the concern report modal with the login modal if we don't find a valid session. Unfortunelty, we can't then trigger a redirect back to the record details as that's not how our get_template_and_user authentication system works.. instead we end up back at opac-user.pl.
Created attachment 139580 [details] [review] Bug 31028: Tie OPAC display to logged in state This is an alternative to th previous patch.. we can't easily redirect back to the right location after login from our modal. It would be preferable to display the button and prompt a login if we don't have a valid session.. but that's not trivial using the API's and our login flows at the moment.
Created attachment 139581 [details] [review] Bug 31028: Add a catalog concerns management page This patch adds a new cataloguing concerns page to the staff client for managing reported catalog concerns.
Created attachment 139582 [details] [review] Bug 31028: Add 'special:undefined' to handle passing 'null' We can't pass 'null' to the column.search as it gets stringified. This patch adds a special string 'special:undefined' to denote that we want to search on undef for the field in question.
Created attachment 139583 [details] [review] Bug 31028: Add filters to concerns management
Created attachment 139584 [details] [review] Bug 31028: Add resolution endpoint This patch adds a /resolve endpoint to the catalog concerns endpoints.
Created attachment 139585 [details] [review] Bug 31028: Add resolve action This patch adds a resolution workflow to the catalog concerns management page.
Created attachment 139586 [details] [review] Bug 31028: Add 'Add catalog concern' to cataloguing toolbar This patch moves the add concern modal js and template markup into their own files and then references them to add the 'Add concern' option to the cataloguing toolbar.
Created attachment 139587 [details] [review] Bug 31028: Add notice trigger for catalog concerns This patch adds a new system prefernce, `CatalogerEmails`. If set with a valid email address adding a new catalog concern should produce a notification email sent to that address.
Created attachment 139588 [details] [review] Bug 31028: Add trigger and notice to resolve This patch adds a sample notice and sets up the trigger to notify the concern reporter when a concern is marked as resolved. The notification itself is optional at resolve time.
Created attachment 139589 [details] [review] Bug 31028: (QA follow-up) This is a 'tool' At the moment, this feature is accessible under tools only rather than cataloging. Whilst we await the new cataloging homepage and sidebar this path replaces the breadcrumb with 'Tools' and removes the 'cat-menu' include.
Created attachment 139590 [details] [review] Bug 31028: (QA follow-up) Table configuration This patch properly adds the table configuration options to the catalog concerns table.
Created attachment 139591 [details] [review] Bug 31028: Use additional_contents for help block This patch updates the modal to use the additional_contents system for the modals help block
Thanks for testing Owen.. I think that should deal with all but one of your pieces of feedback.. the final one as noted I think should be on it's own bug.
Created attachment 140289 [details] [review] Bug 31028: Add catalog_concerns table
Created attachment 140290 [details] [review] Bug 31028: DBIC Schema
Created attachment 140291 [details] [review] Bug 31028: Add `CatalogConcerns` and `OpacCatalogConcerns` preferences This patch adds the `CatalogConcerns` and `OpacCatalogeConcerns` system preferences to enable/disable the catalog concerns feature on the OPAC and Staff client interfaces.
Created attachment 140292 [details] [review] Bug 31028: Add catalog concerns endpoints This patch adds the staff accessible REST API endpoints for catalog concerns. New endpoints available: * POST /catalog/concerns * GET /catalog/concerns * GET /catalog/concerns/{concern_id} * PUT /catalog/concerns/{concern_id} * DELETE /catalog/concenrs/{concern_id}
Created attachment 140293 [details] [review] Bug 31028: Add relations to Catalog::Concern This patch adds the reporter, resolver and biblio relations to the Catalog::Concern class and exposes them to the API as appropriate.
Created attachment 140294 [details] [review] Bug 31028: Add Public API endpoint
Created attachment 140295 [details] [review] Bug 31028: Add 'Report a concern' to OPAC details This patch adds a new 'Report a concern' option to the right sidebar on the opac detail page. On clicking the link, a modal will display allowing the user to enter a short message regarding their concerns and then submission will record said message.
Created attachment 140296 [details] [review] Bug 31028: Trigger login modal when not logged in This isn't perfect, we detect if there is a logged in user on the OPAC and replace the concern report modal with the login modal if we don't find a valid session. Unfortunelty, we can't then trigger a redirect back to the record details as that's not how our get_template_and_user authentication system works.. instead we end up back at opac-user.pl.
Created attachment 140297 [details] [review] Bug 31028: Tie OPAC display to logged in state This is an alternative to th previous patch.. we can't easily redirect back to the right location after login from our modal. It would be preferable to display the button and prompt a login if we don't have a valid session.. but that's not trivial using the API's and our login flows at the moment.
Created attachment 140298 [details] [review] Bug 31028: Add a catalog concerns management page This patch adds a new cataloguing concerns page to the staff client for managing reported catalog concerns.
Created attachment 140299 [details] [review] Bug 31028: Add 'special:undefined' to handle passing 'null' We can't pass 'null' to the column.search as it gets stringified. This patch adds a special string 'special:undefined' to denote that we want to search on undef for the field in question.
Created attachment 140300 [details] [review] Bug 31028: Add filters to concerns management
Created attachment 140301 [details] [review] Bug 31028: Add resolution endpoint This patch adds a /resolve endpoint to the catalog concerns endpoints.
Created attachment 140302 [details] [review] Bug 31028: Add resolve action This patch adds a resolution workflow to the catalog concerns management page.
Created attachment 140303 [details] [review] Bug 31028: Add 'Add catalog concern' to cataloguing toolbar This patch moves the add concern modal js and template markup into their own files and then references them to add the 'Add concern' option to the cataloguing toolbar.
Created attachment 140304 [details] [review] Bug 31028: Add notice trigger for catalog concerns This patch adds a new system prefernce, `CatalogerEmails`. If set with a valid email address adding a new catalog concern should produce a notification email sent to that address.
Created attachment 140305 [details] [review] Bug 31028: Add trigger and notice to resolve This patch adds a sample notice and sets up the trigger to notify the concern reporter when a concern is marked as resolved. The notification itself is optional at resolve time.
Created attachment 140306 [details] [review] Bug 31028: (QA follow-up) This is a 'tool' At the moment, this feature is accessible under tools only rather than cataloging. Whilst we await the new cataloging homepage and sidebar this path replaces the breadcrumb with 'Tools' and removes the 'cat-menu' include.
Created attachment 140307 [details] [review] Bug 31028: (QA follow-up) Table configuration This patch properly adds the table configuration options to the catalog concerns table.
Created attachment 140308 [details] [review] Bug 31028: Use additional_contents for help block This patch updates the modal to use the additional_contents system for the modals help block
Created attachment 140436 [details] [review] Bug 31028: Add catalog_concerns table
Created attachment 140437 [details] [review] Bug 31028: DBIC Schema
Created attachment 140438 [details] [review] Bug 31028: Add `CatalogConcerns` and `OpacCatalogConcerns` preferences This patch adds the `CatalogConcerns` and `OpacCatalogeConcerns` system preferences to enable/disable the catalog concerns feature on the OPAC and Staff client interfaces.
Created attachment 140439 [details] [review] Bug 31028: Add catalog concerns endpoints This patch adds the staff accessible REST API endpoints for catalog concerns. New endpoints available: * POST /catalog/concerns * GET /catalog/concerns * GET /catalog/concerns/{concern_id} * PUT /catalog/concerns/{concern_id} * DELETE /catalog/concenrs/{concern_id}
Created attachment 140440 [details] [review] Bug 31028: Add relations to Catalog::Concern This patch adds the reporter, resolver and biblio relations to the Catalog::Concern class and exposes them to the API as appropriate.
Created attachment 140441 [details] [review] Bug 31028: Add Public API endpoint
Created attachment 140442 [details] [review] Bug 31028: Add 'Report a concern' to OPAC details This patch adds a new 'Report a concern' option to the right sidebar on the opac detail page. On clicking the link, a modal will display allowing the user to enter a short message regarding their concerns and then submission will record said message.
Created attachment 140443 [details] [review] Bug 31028: Trigger login modal when not logged in This isn't perfect, we detect if there is a logged in user on the OPAC and replace the concern report modal with the login modal if we don't find a valid session. Unfortunelty, we can't then trigger a redirect back to the record details as that's not how our get_template_and_user authentication system works.. instead we end up back at opac-user.pl.
Created attachment 140444 [details] [review] Bug 31028: Tie OPAC display to logged in state This is an alternative to th previous patch.. we can't easily redirect back to the right location after login from our modal. It would be preferable to display the button and prompt a login if we don't have a valid session.. but that's not trivial using the API's and our login flows at the moment.
Created attachment 140445 [details] [review] Bug 31028: Add a catalog concerns management page This patch adds a new cataloguing concerns page to the staff client for managing reported catalog concerns.
Created attachment 140446 [details] [review] Bug 31028: Add 'special:undefined' to handle passing 'null' We can't pass 'null' to the column.search as it gets stringified. This patch adds a special string 'special:undefined' to denote that we want to search on undef for the field in question.
Created attachment 140447 [details] [review] Bug 31028: Add filters to concerns management
Created attachment 140448 [details] [review] Bug 31028: Add resolution endpoint This patch adds a /resolve endpoint to the catalog concerns endpoints.
Created attachment 140449 [details] [review] Bug 31028: Add resolve action This patch adds a resolution workflow to the catalog concerns management page.
Created attachment 140450 [details] [review] Bug 31028: Add 'Add catalog concern' to cataloguing toolbar This patch moves the add concern modal js and template markup into their own files and then references them to add the 'Add concern' option to the cataloguing toolbar.
Created attachment 140451 [details] [review] Bug 31028: Add notice trigger for catalog concerns This patch adds a new system prefernce, `CatalogerEmails`. If set with a valid email address adding a new catalog concern should produce a notification email sent to that address.
Created attachment 140452 [details] [review] Bug 31028: Add trigger and notice to resolve This patch adds a sample notice and sets up the trigger to notify the concern reporter when a concern is marked as resolved. The notification itself is optional at resolve time.
Created attachment 140453 [details] [review] Bug 31028: (QA follow-up) This is a 'tool' At the moment, this feature is accessible under tools only rather than cataloging. Whilst we await the new cataloging homepage and sidebar this path replaces the breadcrumb with 'Tools' and removes the 'cat-menu' include.
Created attachment 140454 [details] [review] Bug 31028: (QA follow-up) Table configuration This patch properly adds the table configuration options to the catalog concerns table.
Created attachment 140455 [details] [review] Bug 31028: Use additional_contents for help block This patch updates the modal to use the additional_contents system for the modals help block
Created attachment 140764 [details] [review] Bug 31028: Add catalog_concerns table
Created attachment 140765 [details] [review] Bug 31028: DBIC Schema
Created attachment 140766 [details] [review] Bug 31028: Add `CatalogConcerns` and `OpacCatalogConcerns` preferences This patch adds the `CatalogConcerns` and `OpacCatalogeConcerns` system preferences to enable/disable the catalog concerns feature on the OPAC and Staff client interfaces.
Created attachment 140767 [details] [review] Bug 31028: Add catalog concerns endpoints This patch adds the staff accessible REST API endpoints for catalog concerns. New endpoints available: * POST /catalog/concerns * GET /catalog/concerns * GET /catalog/concerns/{concern_id} * PUT /catalog/concerns/{concern_id} * DELETE /catalog/concenrs/{concern_id}
Created attachment 140768 [details] [review] Bug 31028: Add relations to Catalog::Concern This patch adds the reporter, resolver and biblio relations to the Catalog::Concern class and exposes them to the API as appropriate.
Created attachment 140769 [details] [review] Bug 31028: Add Public API endpoint
Created attachment 140770 [details] [review] Bug 31028: Add 'Report a concern' to OPAC details This patch adds a new 'Report a concern' option to the right sidebar on the opac detail page. On clicking the link, a modal will display allowing the user to enter a short message regarding their concerns and then submission will record said message.
Created attachment 140771 [details] [review] Bug 31028: Trigger login modal when not logged in This isn't perfect, we detect if there is a logged in user on the OPAC and replace the concern report modal with the login modal if we don't find a valid session. Unfortunelty, we can't then trigger a redirect back to the record details as that's not how our get_template_and_user authentication system works.. instead we end up back at opac-user.pl.
Created attachment 140772 [details] [review] Bug 31028: Tie OPAC display to logged in state This is an alternative to th previous patch.. we can't easily redirect back to the right location after login from our modal. It would be preferable to display the button and prompt a login if we don't have a valid session.. but that's not trivial using the API's and our login flows at the moment.
Created attachment 140773 [details] [review] Bug 31028: Add a catalog concerns management page This patch adds a new cataloguing concerns page to the staff client for managing reported catalog concerns.
Created attachment 140774 [details] [review] Bug 31028: Add 'special:undefined' to handle passing 'null' We can't pass 'null' to the column.search as it gets stringified. This patch adds a special string 'special:undefined' to denote that we want to search on undef for the field in question.
Created attachment 140775 [details] [review] Bug 31028: Add filters to concerns management
Created attachment 140776 [details] [review] Bug 31028: Add resolution endpoint This patch adds a /resolve endpoint to the catalog concerns endpoints.
Created attachment 140777 [details] [review] Bug 31028: Add resolve action This patch adds a resolution workflow to the catalog concerns management page.
Created attachment 140778 [details] [review] Bug 31028: Add 'Add catalog concern' to cataloguing toolbar This patch moves the add concern modal js and template markup into their own files and then references them to add the 'Add concern' option to the cataloguing toolbar.
Created attachment 140779 [details] [review] Bug 31028: Add notice trigger for catalog concerns This patch adds a new system prefernce, `CatalogerEmails`. If set with a valid email address adding a new catalog concern should produce a notification email sent to that address.
Created attachment 140780 [details] [review] Bug 31028: Add trigger and notice to resolve This patch adds a sample notice and sets up the trigger to notify the concern reporter when a concern is marked as resolved. The notification itself is optional at resolve time.
Created attachment 140781 [details] [review] Bug 31028: (QA follow-up) This is a 'tool' At the moment, this feature is accessible under tools only rather than cataloging. Whilst we await the new cataloging homepage and sidebar this path replaces the breadcrumb with 'Tools' and removes the 'cat-menu' include.
Created attachment 140782 [details] [review] Bug 31028: (QA follow-up) Table configuration This patch properly adds the table configuration options to the catalog concerns table.
Created attachment 140783 [details] [review] Bug 31028: Use additional_contents for help block This patch updates the modal to use the additional_contents system for the modals help block
Rebased.. again
Created attachment 140793 [details] [review] Bug 31028: Add concerns tab to biblio details display This patch adds a 'Concerns' tab to the catalogue/detail display
This seems to be working well but I've found one bug: The "Hide resolved" control doesn't work -- I get a JavaScript error in the console. Some cosmetic issues that I'd like to see resolved: - The page title updated to match the breadcrumbs - The tools sidebar should be included on the page - The tools sidebar should be updated to include the link to Concerns
Also, this file is updated: koha-tmpl/intranet-tmpl/prog/en/includes/cat-menu.inc Is it used anywhere?
One more: The new system preferences should link to each other instead of showing the preference in plain text, e.g. `OpacCatalogConcerns`. It should be a link. See UsageStatsLibraryName for example.
Created attachment 140929 [details] [review] Bug 31028: Add catalog_concerns table
Created attachment 140930 [details] [review] Bug 31028: DBIC Schema
Created attachment 140931 [details] [review] Bug 31028: Add `CatalogConcerns` and `OpacCatalogConcerns` preferences This patch adds the `CatalogConcerns` and `OpacCatalogeConcerns` system preferences to enable/disable the catalog concerns feature on the OPAC and Staff client interfaces.
Created attachment 140932 [details] [review] Bug 31028: Add catalog concerns endpoints This patch adds the staff accessible REST API endpoints for catalog concerns. New endpoints available: * POST /catalog/concerns * GET /catalog/concerns * GET /catalog/concerns/{concern_id} * PUT /catalog/concerns/{concern_id} * DELETE /catalog/concenrs/{concern_id}
Created attachment 140933 [details] [review] Bug 31028: Add relations to Catalog::Concern This patch adds the reporter, resolver and biblio relations to the Catalog::Concern class and exposes them to the API as appropriate.
Created attachment 140934 [details] [review] Bug 31028: Add Public API endpoint
Created attachment 140935 [details] [review] Bug 31028: Add 'Report a concern' to OPAC details This patch adds a new 'Report a concern' option to the right sidebar on the opac detail page. On clicking the link, a modal will display allowing the user to enter a short message regarding their concerns and then submission will record said message.
Created attachment 140936 [details] [review] Bug 31028: Trigger login modal when not logged in This isn't perfect, we detect if there is a logged in user on the OPAC and replace the concern report modal with the login modal if we don't find a valid session. Unfortunelty, we can't then trigger a redirect back to the record details as that's not how our get_template_and_user authentication system works.. instead we end up back at opac-user.pl.
Created attachment 140937 [details] [review] Bug 31028: Tie OPAC display to logged in state This is an alternative to th previous patch.. we can't easily redirect back to the right location after login from our modal. It would be preferable to display the button and prompt a login if we don't have a valid session.. but that's not trivial using the API's and our login flows at the moment.
Created attachment 140938 [details] [review] Bug 31028: Add a catalog concerns management page This patch adds a new cataloguing concerns page to the staff client for managing reported catalog concerns.
Created attachment 140939 [details] [review] Bug 31028: Add 'special:undefined' to handle passing 'null' We can't pass 'null' to the column.search as it gets stringified. This patch adds a special string 'special:undefined' to denote that we want to search on undef for the field in question.
Created attachment 140940 [details] [review] Bug 31028: Add filters to concerns management
Created attachment 140941 [details] [review] Bug 31028: Add resolution endpoint This patch adds a /resolve endpoint to the catalog concerns endpoints.
Created attachment 140942 [details] [review] Bug 31028: Add resolve action This patch adds a resolution workflow to the catalog concerns management page.
Created attachment 140943 [details] [review] Bug 31028: Add 'Add catalog concern' to cataloguing toolbar This patch moves the add concern modal js and template markup into their own files and then references them to add the 'Add concern' option to the cataloguing toolbar.
Created attachment 140944 [details] [review] Bug 31028: Add notice trigger for catalog concerns This patch adds a new system prefernce, `CatalogerEmails`. If set with a valid email address adding a new catalog concern should produce a notification email sent to that address.
Created attachment 140945 [details] [review] Bug 31028: Add trigger and notice to resolve This patch adds a sample notice and sets up the trigger to notify the concern reporter when a concern is marked as resolved. The notification itself is optional at resolve time.
Created attachment 140946 [details] [review] Bug 31028: (QA follow-up) This is a 'tool' At the moment, this feature is accessible under tools rather than cataloging. Whilst we await the new cataloging homepage and sidebar this patch replaces the breadcrumb and title with 'Tools', replaces the 'cat-menu' include with 'tools-menu' and adds the 'Catalog concerns' tool to the tools-menu.
Created attachment 140947 [details] [review] Bug 31028: (QA follow-up) Table configuration This patch properly adds the table configuration options to the catalog concerns table.
Created attachment 140948 [details] [review] Bug 31028: Use additional_contents for help block This patch updates the modal to use the additional_contents system for the modals help block
Created attachment 140949 [details] [review] Bug 31028: Add concerns tab to biblio details display This patch adds a 'Concerns' tab to the catalogue/detail display
Created attachment 140950 [details] [review] Bug 31028: Crosslink preferences This patch adds crosslinks to the CatalogConcerns and OpacCatalogConcerns system preferences. We also slightly update the wording of OpacCatalogConcerns to clarify intent.
(In reply to Owen Leonard from comment #106) > This seems to be working well but I've found one bug: > > The "Hide resolved" control doesn't work -- I get a JavaScript error in the > console. This was a rebase issue.. now fixed inline in the refreshed patches > Some cosmetic issues that I'd like to see resolved: > > - The page title updated to match the breadcrumbs > - The tools sidebar should be included on the page > - The tools sidebar should be updated to include the link to Concerns Fixed in line in `(QA follow-up) This is a 'tool'` >Also, this file is updated: > >koha-tmpl/intranet-tmpl/prog/en/includes/cat-menu.inc > >Is it used anywhere? It was, but got removed again in the above mentioned patch.. I've reset it in the original patch again now.. it will be done in the cataloging home page stuff instead. > One more: The new system preferences should link to each other instead of showing the preference in plain text, e.g. `OpacCatalogConcerns`. It should be a link. See UsageStatsLibraryName for example. Done, see final patch.
Created attachment 141133 [details] [review] Bug 31028: Add catalog_concerns table
Created attachment 141134 [details] [review] Bug 31028: DBIC Schema
Created attachment 141135 [details] [review] Bug 31028: Add `CatalogConcerns` and `OpacCatalogConcerns` preferences This patch adds the `CatalogConcerns` and `OpacCatalogeConcerns` system preferences to enable/disable the catalog concerns feature on the OPAC and Staff client interfaces.
Created attachment 141136 [details] [review] Bug 31028: Add catalog concerns endpoints This patch adds the staff accessible REST API endpoints for catalog concerns. New endpoints available: * POST /catalog/concerns * GET /catalog/concerns * GET /catalog/concerns/{concern_id} * PUT /catalog/concerns/{concern_id} * DELETE /catalog/concenrs/{concern_id}
Created attachment 141137 [details] [review] Bug 31028: Add relations to Catalog::Concern This patch adds the reporter, resolver and biblio relations to the Catalog::Concern class and exposes them to the API as appropriate.
Created attachment 141138 [details] [review] Bug 31028: Add Public API endpoint
Created attachment 141139 [details] [review] Bug 31028: Add 'Report a concern' to OPAC details This patch adds a new 'Report a concern' option to the right sidebar on the opac detail page. On clicking the link, a modal will display allowing the user to enter a short message regarding their concerns and then submission will record said message.
Created attachment 141140 [details] [review] Bug 31028: Trigger login modal when not logged in This isn't perfect, we detect if there is a logged in user on the OPAC and replace the concern report modal with the login modal if we don't find a valid session. Unfortunelty, we can't then trigger a redirect back to the record details as that's not how our get_template_and_user authentication system works.. instead we end up back at opac-user.pl.
Created attachment 141141 [details] [review] Bug 31028: Tie OPAC display to logged in state This is an alternative to th previous patch.. we can't easily redirect back to the right location after login from our modal. It would be preferable to display the button and prompt a login if we don't have a valid session.. but that's not trivial using the API's and our login flows at the moment.
Created attachment 141142 [details] [review] Bug 31028: Add a catalog concerns management page This patch adds a new cataloguing concerns page to the staff client for managing reported catalog concerns.
Created attachment 141143 [details] [review] Bug 31028: Add 'special:undefined' to handle passing 'null' We can't pass 'null' to the column.search as it gets stringified. This patch adds a special string 'special:undefined' to denote that we want to search on undef for the field in question.
Created attachment 141144 [details] [review] Bug 31028: Add filters to concerns management
Created attachment 141145 [details] [review] Bug 31028: Add resolution endpoint This patch adds a /resolve endpoint to the catalog concerns endpoints.
Created attachment 141146 [details] [review] Bug 31028: Add resolve action This patch adds a resolution workflow to the catalog concerns management page.
Created attachment 141147 [details] [review] Bug 31028: Add 'Add catalog concern' to cataloguing toolbar This patch moves the add concern modal js and template markup into their own files and then references them to add the 'Add concern' option to the cataloguing toolbar.
Created attachment 141148 [details] [review] Bug 31028: Add notice trigger for catalog concerns This patch adds a new system prefernce, `CatalogerEmails`. If set with a valid email address adding a new catalog concern should produce a notification email sent to that address.
Created attachment 141149 [details] [review] Bug 31028: Add trigger and notice to resolve This patch adds a sample notice and sets up the trigger to notify the concern reporter when a concern is marked as resolved. The notification itself is optional at resolve time.
Created attachment 141150 [details] [review] Bug 31028: (QA follow-up) This is a 'tool' At the moment, this feature is accessible under tools rather than cataloging. Whilst we await the new cataloging homepage and sidebar this patch replaces the breadcrumb and title with 'Tools', replaces the 'cat-menu' include with 'tools-menu' and adds the 'Catalog concerns' tool to the tools-menu.
Created attachment 141151 [details] [review] Bug 31028: (QA follow-up) Table configuration This patch properly adds the table configuration options to the catalog concerns table.
Created attachment 141152 [details] [review] Bug 31028: Use additional_contents for help block This patch updates the modal to use the additional_contents system for the modals help block
Created attachment 141153 [details] [review] Bug 31028: Add concerns tab to biblio details display This patch adds a 'Concerns' tab to the catalogue/detail display
Created attachment 141154 [details] [review] Bug 31028: Crosslink preferences This patch adds crosslinks to the CatalogConcerns and OpacCatalogConcerns system preferences. We also slightly update the wording of OpacCatalogConcerns to clarify intent.
Created attachment 141440 [details] [review] Bug 31028: Add catalog_concerns table
Created attachment 141441 [details] [review] Bug 31028: DBIC Schema
Created attachment 141442 [details] [review] Bug 31028: Add `CatalogConcerns` and `OpacCatalogConcerns` preferences This patch adds the `CatalogConcerns` and `OpacCatalogeConcerns` system preferences to enable/disable the catalog concerns feature on the OPAC and Staff client interfaces.
Created attachment 141443 [details] [review] Bug 31028: Add catalog concerns endpoints This patch adds the staff accessible REST API endpoints for catalog concerns. New endpoints available: * POST /catalog/concerns * GET /catalog/concerns * GET /catalog/concerns/{concern_id} * PUT /catalog/concerns/{concern_id} * DELETE /catalog/concenrs/{concern_id}
Created attachment 141444 [details] [review] Bug 31028: Add relations to Catalog::Concern This patch adds the reporter, resolver and biblio relations to the Catalog::Concern class and exposes them to the API as appropriate.
Created attachment 141445 [details] [review] Bug 31028: Add Public API endpoint
Created attachment 141446 [details] [review] Bug 31028: Add 'Report a concern' to OPAC details This patch adds a new 'Report a concern' option to the right sidebar on the opac detail page. On clicking the link, a modal will display allowing the user to enter a short message regarding their concerns and then submission will record said message.
Created attachment 141447 [details] [review] Bug 31028: Trigger login modal when not logged in If the user is not logged in we should trigger the login modal in place of the report a concern modal and then use the code added in bug 31699 to redirect the user back to the current content and open the report a concern modal upon successful login.
Created attachment 141448 [details] [review] Bug 31028: Add a catalog concerns management page This patch adds a new cataloguing concerns page to the staff client for managing reported catalog concerns.
Created attachment 141449 [details] [review] Bug 31028: Add 'special:undefined' to handle passing 'null' We can't pass 'null' to the column.search as it gets stringified. This patch adds a special string 'special:undefined' to denote that we want to search on undef for the field in question.
Created attachment 141450 [details] [review] Bug 31028: Add filters to concerns management
Created attachment 141451 [details] [review] Bug 31028: Add resolution endpoint This patch adds a /resolve endpoint to the catalog concerns endpoints.
Created attachment 141452 [details] [review] Bug 31028: Add resolve action This patch adds a resolution workflow to the catalog concerns management page.
Created attachment 141453 [details] [review] Bug 31028: Add 'Add catalog concern' to cataloguing toolbar This patch moves the add concern modal js and template markup into their own files and then references them to add the 'Add concern' option to the cataloguing toolbar.
Created attachment 141454 [details] [review] Bug 31028: Add notice trigger for catalog concerns This patch adds a new system prefernce, `CatalogerEmails`. If set with a valid email address adding a new catalog concern should produce a notification email sent to that address.
Created attachment 141455 [details] [review] Bug 31028: Add trigger and notice to resolve This patch adds a sample notice and sets up the trigger to notify the concern reporter when a concern is marked as resolved. The notification itself is optional at resolve time.
Created attachment 141456 [details] [review] Bug 31028: (QA follow-up) This is a 'tool' At the moment, this feature is accessible under tools rather than cataloging. Whilst we await the new cataloging homepage and sidebar this patch replaces the breadcrumb and title with 'Tools', replaces the 'cat-menu' include with 'tools-menu' and adds the 'Catalog concerns' tool to the tools-menu.
Created attachment 141457 [details] [review] Bug 31028: (QA follow-up) Table configuration This patch properly adds the table configuration options to the catalog concerns table.
Created attachment 141458 [details] [review] Bug 31028: Use additional_contents for help block This patch updates the modal to use the additional_contents system for the modals help block
Created attachment 141459 [details] [review] Bug 31028: Add concerns tab to biblio details display This patch adds a 'Concerns' tab to the catalogue/detail display
Created attachment 141460 [details] [review] Bug 31028: Crosslink preferences This patch adds crosslinks to the CatalogConcerns and OpacCatalogConcerns system preferences. We also slightly update the wording of OpacCatalogConcerns to clarify intent.
Created attachment 142164 [details] [review] Bug 31028: Add catalog_concerns table
Created attachment 142165 [details] [review] Bug 31028: DBIC Schema
Created attachment 142166 [details] [review] Bug 31028: Add `CatalogConcerns` and `OpacCatalogConcerns` preferences This patch adds the `CatalogConcerns` and `OpacCatalogeConcerns` system preferences to enable/disable the catalog concerns feature on the OPAC and Staff client interfaces.
Created attachment 142167 [details] [review] Bug 31028: Add catalog concerns endpoints This patch adds the staff accessible REST API endpoints for catalog concerns. New endpoints available: * POST /catalog/concerns * GET /catalog/concerns * GET /catalog/concerns/{concern_id} * PUT /catalog/concerns/{concern_id} * DELETE /catalog/concenrs/{concern_id}
Created attachment 142168 [details] [review] Bug 31028: Add relations to Catalog::Concern This patch adds the reporter, resolver and biblio relations to the Catalog::Concern class and exposes them to the API as appropriate.
Created attachment 142169 [details] [review] Bug 31028: Add Public API endpoint
Created attachment 142170 [details] [review] Bug 31028: Add 'Report a concern' to OPAC details This patch adds a new 'Report a concern' option to the right sidebar on the opac detail page. On clicking the link, a modal will display allowing the user to enter a short message regarding their concerns and then submission will record said message.
Created attachment 142171 [details] [review] Bug 31028: Trigger login modal when not logged in If the user is not logged in we should trigger the login modal in place of the report a concern modal and then use the code added in bug 31699 to redirect the user back to the current content and open the report a concern modal upon successful login.
Created attachment 142172 [details] [review] Bug 31028: Add a catalog concerns management page This patch adds a new cataloguing concerns page to the staff client for managing reported catalog concerns.
Created attachment 142173 [details] [review] Bug 31028: Add 'special:undefined' to handle passing 'null' We can't pass 'null' to the column.search as it gets stringified. This patch adds a special string 'special:undefined' to denote that we want to search on undef for the field in question.
Created attachment 142174 [details] [review] Bug 31028: Add filters to concerns management
Created attachment 142175 [details] [review] Bug 31028: Add resolution endpoint This patch adds a /resolve endpoint to the catalog concerns endpoints.
Created attachment 142177 [details] [review] Bug 31028: Add resolve action This patch adds a resolution workflow to the catalog concerns management page.
Created attachment 142179 [details] [review] Bug 31028: Add 'Add catalog concern' to cataloguing toolbar This patch moves the add concern modal js and template markup into their own files and then references them to add the 'Add concern' option to the cataloguing toolbar.
Created attachment 142180 [details] [review] Bug 31028: Add notice trigger for catalog concerns This patch adds a new system prefernce, `CatalogerEmails`. If set with a valid email address adding a new catalog concern should produce a notification email sent to that address.
Created attachment 142181 [details] [review] Bug 31028: Add trigger and notice to resolve This patch adds a sample notice and sets up the trigger to notify the concern reporter when a concern is marked as resolved. The notification itself is optional at resolve time.
Created attachment 142182 [details] [review] Bug 31028: (QA follow-up) This is a 'tool' At the moment, this feature is accessible under tools rather than cataloging. Whilst we await the new cataloging homepage and sidebar this patch replaces the breadcrumb and title with 'Tools', replaces the 'cat-menu' include with 'tools-menu' and adds the 'Catalog concerns' tool to the tools-menu.
Created attachment 142183 [details] [review] Bug 31028: (QA follow-up) Table configuration This patch properly adds the table configuration options to the catalog concerns table.
Created attachment 142184 [details] [review] Bug 31028: Use additional_contents for help block This patch updates the modal to use the additional_contents system for the modals help block
Created attachment 142185 [details] [review] Bug 31028: Add concerns tab to biblio details display This patch adds a 'Concerns' tab to the catalogue/detail display
Created attachment 142186 [details] [review] Bug 31028: Crosslink preferences This patch adds crosslinks to the CatalogConcerns and OpacCatalogConcerns system preferences. We also slightly update the wording of OpacCatalogConcerns to clarify intent.
Created attachment 142187 [details] [review] Bug 31028: Add input template This patch adds an example 'CatalogConcernTemplate' to allow pre-population of the catalog concern report text area modal.
Created attachment 142188 [details] [review] Bug 31028: Add acknowledgement notification This patch adds an acknowledgement notification to acknowledge to the patron via email that we have received their catalog concern report.
Created attachment 142189 [details] [review] Bug 31028: Add page-section to concerns management page
Created attachment 142190 [details] [review] Bug 31028: Move back to cataloging from tools
Created attachment 142191 [details] [review] Bug 31028: Add `wrapfix` class rule to set pre-wrap on content This patch adds a `wrapfix` css class that sets the 'white-space: pre-wrap' rule and applies it to the message content of our catalog concerns allowing multi-line reports to display properly in the table.
Created attachment 142616 [details] [review] Bug 31028: Add `tickets` and `ticket_updates` tables This patch adds the new `tickets` and `ticket_updates` tables for tracking catalog concern tickets.
Created attachment 142617 [details] [review] Bug 31028: DBIC Schema update
Created attachment 142618 [details] [review] Bug 31028: Add new Koha::Object(s) classes This patch adds new Koha::Object(s) for the newly introduced tables, including updateing existing Koha::Objects adding new relations as required.
Created attachment 142619 [details] [review] Bug 31028: Add API's for tickets This patch adds basic CRUD API's for the ticket endpoints.
Created attachment 142620 [details] [review] Bug 31028: Add `OpacCatalogConcerns` preference
Created attachment 142621 [details] [review] Bug 31028: Add ability to report catalog concerns from the OPAC This patch adds the ability for patrons to report catalog concerns via the opac.
Created attachment 142622 [details] [review] Bug 31028: Add configurable help text and templates This patch adds configurable help text and a template option to the catalog concern report modal in the OPAC.
Created attachment 142623 [details] [review] Bug 31028: Add acknowledgement notice
Created attachment 142624 [details] [review] Bug 31028: Add catalog concern management page to staff This patch adds a catalog concern management page to the staff client accessible via the cataloging home page and a new 'Pending catalog concerns' link on the front page. This includes added the requisit ticket_updates api endpoints and notice triggers and templates for notifying patrons of changes to their reported concerns.
Created attachment 142625 [details] [review] Bug 31028: Add email notification of cataloguers on submissions This patch adds an optional catalogeur notification to email the cataloging team whenever a new catalog concern is reported.
Created attachment 142626 [details] [review] Bug 31028: Add ability to report concerns from the staff interface
Created attachment 142627 [details] [review] Bug 31028: Add display to details page
A big rebase and squash of patches.. lots of little improvements to the feature as a whole..
Here are the things I noted from testing. See the draft test plan posted as a separate comment - I have referred to these notes where appropriate. [1] Wording for system preferences: - for OpacCatalogConcerns "..staff client." should be "..staff interface.". - most notes are formatted as NOTES: in bold [2] If the CatalogConcerns system preference is not enabled (with all of these also disabled: suggestions, OPACReportProblem, and AllowCheckoutNotes), then on the staff interface home page pending concerns are not shown. However, if any of suggestions, OPACReportProblem, or AllowCheckoutNotes are enabled and they have an active item(s), then it is displayed. Note: I had mixed results with this - sometime it worked, other times it didn't, so it was a bit confusing! [3] Viewing the details for a concern in the staff interface (Details action) - on the "Ticket details" for a concern: - there is a line after the text inside the border for the ticket details info - there are no line breaks, so whatever is entered appears as a continuous line [4] Clicking on resolve or comment does nothing: there is an error in the web developer tools console: Uncaught ReferenceError: logged_in_user_borrowernumber is not defined <anonymous> http://127.0.0.1:8081/intranet-tmpl/prog/js/modals/display_ticket_22.0600075.js:75 jQuery 2 dispatch handle [5] Things I noted about the staff report a concern modal: - The width is very narrow (maybe more related to the new staff interface design) - If the CatalogConcernHelp has some HTML, such as a bulleted list after the existing paragraph, then this doesn't display correctly - displays to the right of the paragraph without any bullets (bold seem to display OK) - There is no title field, as there is on the OPAC (not sure whether this is an issue, or what will be displayed in the list of concerns - The buttons are Confirm and Cancel (in the OPAC they are Submit and Cancel) - Nothing happens when clicking Confirm - the web developer tools console shows an error: XHR POST http://127.0.0.1:8081/api/v1/tickets 400 Bad Request [6] On Tools > Patrons and circulation > Notices and slips for the new notices: . the new notices are listed under module "catalog" (with a small "c" - all the other notice modules are shown in sentence case, so this should perhaps be "Catalog". . For TICKET_ACKNOWLEDGEME, maybe the code could be just TICKET_ACKNOWLEDGE in the yaml file as the 'NT' is cut off and not displayed . Note that for the sample notices, TICKET_ACKNOWLEDGEMENT is used, but this is shortened when added to the database to TICKET_ACKNOWLEDGEME [7] I'm not sure what permissions are required for non-super librarian staff to see and manage catalog concerns. Initially I thought it was manage_problem_reports permission - but then I started getting mixed results. On some occasions on the Cataloguing home page, the option Reports > Catalog concerns was still displayed. Clicking on this sends you to a login box that says "Error: You don't have permission to access this page". See also step 8.4. [8] Editing the catalog concern help text and concern templates: - If you use the WYSIWYG editor to edit the concern template: the mark up (such as <br/>s, <li>s, etc) is displayed in the form input area when reporting a concern from the OPAC and staff interface - Does this mean we can only edit the concern template using the text editor? - If you use the WYSIWYG editor to edit the help text: some mark up is not displayed correctly in the staff interface, for example: after adding a bulleted list after the first paragraph, on the modal the list is displayed to the right of the paragraph without the bullets. (Initially it didn't display correctly in the OPAC, but this was probably a browser caching issue.) [9] Display of concerns on a record page in the staff interface - no details listed: I created some concerns for a record - the tab shows the number, but the list only shows the table header row and no concern details. [10] CatalogerEmails: it appears you can add multiple email addresses - is a comma used to separate these? [11] Sidebar menu when in the Catalog concerns area: currently displays the Tools sidebar, now needs to be the Cataloguing sidebar menu, along with the page title.
Here is the draft test plan I used. See also the Specification attached to the bug. The notes referenced are included in comment #214. 1. Apply patches 2. Update database: updatedatabase 3. Run DBIC: dbic (not sure if this is required) 4. Enable the new system preference: OpacCatalogConcerns [see note 1] 5. Report a catalog concern from the OPAC: 5.1 Search for a record and view the details page 5.2 There is now a "Report a concern" link in the actions box on the right-hand sidebar (under "Suggest a purchase") 5.3 Click on "Report a concern" 5.4 Add some information to the form (Title, information for each of the headings) and click Submit 5.5 Log out from the OPAC and click on the "Report a concern" link for a record - you should be prompted to log in. After logging in, you are then redirected back to the record page and the form is displayed to report a concern. 6. Manage catalog concerns from the staff interface: 6.1 Disable these system preferences: suggestions, OPACReportProblem, and AllowCheckoutNotes 6.2 From the staff interface, select the link in the block after the module options (the "Call to action" area): where there are concerns, "Catalog concerns pending: X" is displayed [see note 2] OR 6.3 Go to Cataloging > Reports > Catalog concerns 6.4 The concern(s) you entered in the OPAC should be listed 6.5 Click on "Details" in the actions column ==> Ticket details displayed in a modal window [see note 3] 6.6 Add some text in the update field for the concern, select the Notify checkbox, and click on either the Resolve or Comment buttons [see note 4] 6.7 If Resolve clicked, then this will no longer be displayed in the list of concerns (make sure the 'Hide resolve' or 'Show all' toggles work and display concerns raised correctly based on status) 6.8 If Comment clicked, this will continue to be displayed in the list of concerns 6.9 Check that the filters for each column work as expected 6.10 [Not sure how comments are displayed, assume when viewing the details for a concern that any previous comments are displayed in the modal window with the date] 6.11 Testing notifications - see step 8.2 7. Report a catalog concern from the staff interface [see note 5]: 7.1 Enable the CatalogConcerns system preference 7.1 Search for a record and view the details page 7.2 Select New > New catalog concern 7.4 Add some information to the form (information for each of the headings) and click Confirm 8. Other things to test: 8.1 API: not sure what to test here (if needed) . Enable the RESTPublicAPI system preference . Go to http://127.0.0.1:8080/api/v1/.html . Not that there are APIs for addTicket, addTicketPublic, addTicketUpdate, deleteTicket, getTicket, listTicketUpdates, listTickets, and updateTicket 8.2 Notifications [see note 6] [need to expand and actually test this]: . There are four new notice templates: TICKET_NOTIFY, TICKET_ACKNOWLEDGEME, TICKET_RESOLVE, TICKET_UPDATE . Set up KTD so that email can be sent (using a Gmail address and an app password) . Set up a patron with your Gmail email address . Setup system preference CatalogerEmails with your Gmail email address . Trigger the various notices and make sure they work as expected: . TICKET_ACKNOWLEDGEME: email to patron when they raise a concern . TICKET_NOTIFY: email to library staff when a concern is raised . TICKET_UPDATE: add an update to a concern . TICKET_RESOLVE: when concern marked as resolved 8.3 Test with OPACReportProblem enabled: . Enable the system preference . Submit a "Report a problem" report from the OPAC . Check that this works as expected in the staff interface, and that both pending problem reports and catalog concerns are displayed . BONUS tests: test various combinations of enabling and disabling suggestions, OPACReportProblem, AllowCheckoutNotes, and CatalogConcerns system preferences [not sure whether this is really required] 8.4 Test a non-super librarian and set them up so that they can manage catalog concerns. What permissions are required? I initially thought you needed the manage_problem_reports permission, then I couldn't figure out the correct permissions to give [see also note 7]. These steps need updating once figured out: . Log in as a non-super librarian (needs manage_problem_reports permission, for example Henry Acevedo with a basic set of persmissions including: catalogue, circulate, borrowers, reserveforothers, editcatalogue, updatecharges, reports, lists, clubs, manage_problem_reports) . Check that they can view and manage catalog concerns 8.4 Table configuration: have some active catalog concerns, click configure, hide status column by default, check that you can toggle the status column on and off. 8.5 Customise the catalog concern help text and template [see note 8]: . Go to Tools > HTML customizations . Note that there are two entries available for editing: CatalogConcernHelp and CatalogConcernTemplate . Make some edits to these entries . From the OPAC, report a concern for a record . The changes you made should be reflected in the report a concern form
Created attachment 142932 [details] [review] Bug 31028: Add `tickets` and `ticket_updates` tables This patch adds the new `tickets` and `ticket_updates` tables for tracking catalog concern tickets.
Created attachment 142933 [details] [review] Bug 31028: DBIC Schema update
Created attachment 142934 [details] [review] Bug 31028: Add new Koha::Object(s) classes This patch adds new Koha::Object(s) for the newly introduced tables, including updateing existing Koha::Objects adding new relations as required.
Created attachment 142935 [details] [review] Bug 31028: Add API's for tickets This patch adds basic CRUD API's for the ticket endpoints.
Created attachment 142936 [details] [review] Bug 31028: Add `OpacCatalogConcerns` preference Enabling this preference should allow catalog concerns to be added by logged in patrons on the opac.
Created attachment 142937 [details] [review] Bug 31028: Add ability to report catalog concerns from the OPAC This patch adds the ability for patrons to report catalog concerns via the opac. Test plan 1) Enable the new `OpacCatalogConcerns` system preference 2) Navigate to the record details page of a biblio record on the OPAC 3) You should see a new 'Report a concern' option in the right side actions box 4) If not logged in you should have the login modal displayed and upon a successful login you should be redirected back to the details page with a new model displayed for entering concern details 5) Submit your concern with a title and details.
Created attachment 142938 [details] [review] Bug 31028: Add configurable help text and templates This patch adds configurable help text and a template option to the catalog concern report modal in the OPAC. Test plan 1) Enable `OpacCatalogConcerns` preference 2) Build the CSS for the OPAC 3) Check that there is a 'CatalogConcernHelp' block listed in the HTML Customisations page. 4) On the OPAC navigate to a record and click the 'Report a concern' button. 5) Confirm that the content of 'CatalogConcernHelp' displays beneath the detail entry box and that it displays as expected. 6) Check that there is a 'CatalogConcernTemplate' block listed in the HTML customisations page. 7) On the OPAC 'Report a concern' modal, you should see the content of the 'CatalogConcernTemplate' block pre-filled in the details textarea. Note: There is a caveat to the template.. as textarea can only be used to submit plaintext with this patch and as such the template needs to not utilise the WYSIWYG editor else you will be faced with raw HTML inside your textarea.
Created attachment 142939 [details] [review] Bug 31028: Add acknowledgement notice This patch adds an acknowledgement notice that will be sent to the opac user upon submission of a catalog concern report. Test plan 1) Confirm that a new notice template is added to the notices management page. 2) If using a sandbox, check the 'email log' from the management UI to see the resultant notice has been 'sent'
Created attachment 142940 [details] [review] Bug 31028: Add catalog concern management page to staff This patch adds a catalog concern management page to the staff client accessible via the cataloging home page and a new 'Pending catalog concerns' link on the front page. This includes added the requisit ticket_updates api endpoints and notice triggers and templates for notifying patrons of changes to their reported concerns. Test plan 1) Enable the `OpacCatalogConcerns` system preference 2) Catalog concern management is tied to your users ability to edit the catalog, `editcatalogue`. 3) Confirm that you can see 'Catalog concerns' listed on the cataloging home page if you have the `editcatalogue` permission and not if you do not. 4) Add a new concern as an opac user. 5) Confirm that once a concern is present in the system you see a count of 'catalog concerns pending' on the intranet main page if you have the `editcatalogue` permission. 6) Click through either the cataloging home page or pending concerns link on the main page to view the new concerns management page. 7) Confirm the table displays as one would expect. 8) Confirm clicking on details or the concern title exposes a 'details' modal with the option to add an update or resolve the concern. 9) Verify that if selecting 'notify' when updateing or resolving a concern triggers a notice to be sent to the opac user who first reported the issue.
Created attachment 142941 [details] [review] Bug 31028: Add email notification of cataloguers on submissions This patch adds an optional catalogeur notification to email the cataloging team whenever a new catalog concern is reported. Test plan 1) Enable `OpacCatalogConcerns` 2) Add at least one email address to the new `CataloguerEmails` prefernce (a comma delimited list is also allowed). 3) Confirm that a default template has been added to the Notices management, `TICKET_NOTIFY`. 4) Submit a new concern using the OPAC 5) Confirm that an email is sent to those email addresses listed in CataloguerEmails.
Created attachment 142942 [details] [review] Bug 31028: Add ability to report concerns from the staff interface This patch brings the CatalogConcerns feature to the staff client allowing non-cataloguers to report issues with catalog records from the record details page. Test plan 1) Enable the new `CatalogConcerns` system preference 2) Confirm that without the `edit_catalogue` permission your user can submit a catalog concern via `New -> New catalog concern` from the toolbar on a records detail display. 3) Confirm that the right user was recorded as the reporter on the catalog concern management page (You must have logged in again as a user with the `edit_catalogue` permission to see this page.
Created attachment 142943 [details] [review] Bug 31028: Add display to details page This patch adds the display of biblio specific concerns to the biblio detail display page. Test plan 1) Enable the feature as in prior patch test plans 2) Add a concern as per prior patch test plans 3) Confirm that a new tab appears at the bottom of the catalog record details display and all functionality from the concern management page is precent.
Created attachment 142944 [details] [review] Bug 31028: Improve display-ticket modal form display This patch improves the display of the concern details modal
Created attachment 142945 [details] [review] Bug 31028: (follow-up) System preference terminology Capitalise NOTE and swap 'client' for 'interface'.
Created attachment 142946 [details] [review] Bug 31028: Only show pending concerns if there are some This patch adds logic to catch when pending_biblio_tickets equals zero.
Created attachment 142947 [details] [review] Bug 31028: (follow-up) Rename TICKET_ACKNOWLEDGE TICKET_ACKNOWLEDGEMENT was too long for the database field size, drop the 'MENT' to ensure it fits.
Created attachment 142948 [details] [review] Bug 31028: (follow-up) Update notice module codes This patch updates the notice codes from 'catalog' to 'catalogue' to be consistent with the existing codebase.
Created attachment 142949 [details] [review] Bug 31028: (follow-up) Consistently style help-block This patch updates the opac and staff modals to set the help-block inside a div instead of a paragraph element allowing for the wysiwyg edited content to display as prescribed. We move the scss inside the fieldset definition to ensure we are specific enough to catch only the intended elements.
Thankyou so much for your thorough testing and feedback again David.. it's great to see this level of detail. My apologies for some bits that clearly weren't working as expected.. there was a rebase issue that had crept in so some things clearly just weren't working a all :(. I believe I've resolved all those issues now and have taken into account all of your feedback on top. I've also tried to fold some of your excellent test plan into test plans attached to each commit. The permission you were looking for and wasn't at all documented is 'edit_catalogue'.. I took the approach that cataloguers should be dealing with concerns raised so adopted the pre-existing permission.
Thanks Martin for addressing the items I raised! I've retested and here are some more comments. 1. When submitting a concern on the OPAC, there is no acknowledgement message, for example like when you report a problem or make a purchase suggestion (such as, "Your catalog concern report was submitted.") - you are just returned to the record. 2. Last comment/update is prepopulated into the update field without a hard page refresh: 2.1 Click on the Details action for a concern 2.2 Add a comment in the update field and click on comment 2.3 Click on the details action again for the same concern without refreshing the page: note that the update field is populated with the last comment made 2.4 Click on another concern: same results as 2.3 2.5 If you click away to another page (or a hard referesh - Shift + Refresh), and then go back to the catalog concerns page this doesn't happen. 3. Permissions to manage concerns - I still can't get this to work using the editcatalog permission: 3.1 I added the editcatalog permission + all tools to a staff user (Henry). 3.2 When I go to access catalog concerns (either from 'Pending catalog concerns' on the home page or from the cataloging home page), I get "You do not have permission to access this page" and the login form. 3.3 Without the permission, I don't see 'Pending catalog concerns' on the home page or "Catalog concerns" on the Cataloguing home page (as expected). 3.4 I also gave all permissions except "Access to all librarian functions (superlibrarian)" and I still get the same permission error as in 3.2. 4. Details of concerns listed on the record details page are now shown, however: 4.1 If resolved, can still add comments, and can also click on resolve again (using the koha superlibrarian user). 4.2 Whereas, in the Cataloging > Catalog concerns area, once you have resolved the concern the only option you have is the "Comment" button. 4.2 If you don't have permission, can see the details in modal window and the Resolve and Comment buttons are displayed. When attempting to make a comment or resolve, the modal sits there with the "spinner" on the button. 5. Reporting a catalog concern from the staff interface - display of help text: 5.1 If the help text has a bulleted list, the bullets aren't shown (add some lines to the help text, make them into a bulleted list, report a problem in the staff interface for a record). 6. Notices sent using email (see [1] for how I set up to test): 8.1 Acknowledgement, update, and resolved notifications come through (acknowledgement messages cam straight through, but update and resolved came through when I ran misc/cronjobs/process_message_queue.pl). 8.2 The notify message to CatalogersEmail address didn't come through and is not in the message queue. 8.3 Messages come through as a single line without any line breaks. Does the notice need HTML tags for this? See [2] for examples of what was received. 8.4 Only the 'Catalog concern updated' and 'Catalog concern resolved; notices were displayed under the patron's record of notices - the acknowledgement notice wasn't listed. 7. Setting CatalogerEmails - wrong name in test plan for patch 'Add email notification of cataloguers on submissions' (CataloguerEmails should be CatalogerEmails. 8. List of concerns - should it default to only displaying the unresolved concerns? Otherwise, the list could get quite long... Maybe this should be a separate bug if considered an issue, as I noticed that this is the same pattern used for OPAC problem reports and AllowCheckoutNotes. [1] Set up for testing notifications using Gmail when using KTD. Add this to /etc/koha/sites/kohadev/koha-conf.xml, setup an App password for your Gmail account, add the details as indicated, and add your Gmail address as the email for a patron(s) used in testing: <smtp_server> <host>smtp.gmail.com</host> <port>587</port> <timeout>5</timeout> <ssl_mode>STARTTLS</ssl_mode> <user_name>YOURGMAILADDRESS</user_name> <password>YOURAPPPASSWORD/password> <debug>1</debug> </smtp_server> [2] Text of email messages - came through as a single line: Acknowledgement: Dear koha (42), Thankyou for your report concerning Lady Susan ; The Watsons ; Sanditon / . You reported: **Describe the concern** A clear and concise description of what the concern is. **To Reproduce** Steps to reproduce the behavior: 1. Go to '...' 2. Click on '....' 3. Scroll down to '....' 4. See error **Expected behavior** A clear and concise description of what you expected to happen. Thankyou Update: Dear koha (42), The library has added an update to the concern you reported against Lady Susan ; The Watsons ; Sanditon / . The following comment was left: Send an update Thankyou Resolved: Dear koha (42), The library has now marked your concern with Lady Susan ; The Watsons ; Sanditon / as resolved. The following comment was left: This is now fixed! Thankyou
Created attachment 143238 [details] [review] Bug 31028: Add `tickets` and `ticket_updates` tables This patch adds the new `tickets` and `ticket_updates` tables for tracking catalog concern tickets.
Created attachment 143239 [details] [review] Bug 31028: DBIC Schema update
Created attachment 143240 [details] [review] Bug 31028: Add new Koha::Object(s) classes This patch adds new Koha::Object(s) for the newly introduced tables, including updateing existing Koha::Objects adding new relations as required.
Created attachment 143241 [details] [review] Bug 31028: Add API's for tickets This patch adds basic CRUD API's for the ticket endpoints.
Created attachment 143242 [details] [review] Bug 31028: Add `OpacCatalogConcerns` preference Enabling this preference should allow catalog concerns to be added by logged in patrons on the opac.
Created attachment 143243 [details] [review] Bug 31028: Add ability to report catalog concerns from the OPAC This patch adds the ability for patrons to report catalog concerns via the opac. Test plan 1) Enable the new `OpacCatalogConcerns` system preference 2) Navigate to the record details page of a biblio record on the OPAC 3) You should see a new 'Report a concern' option in the right side actions box 4) If not logged in you should have the login modal displayed and upon a successful login you should be redirected back to the details page with a new model displayed for entering concern details 5) Submit your concern with a title and details.
Created attachment 143244 [details] [review] Bug 31028: Add configurable help text and templates This patch adds configurable help text and a template option to the catalog concern report modal in the OPAC. Test plan 1) Enable `OpacCatalogConcerns` preference 2) Build the CSS for the OPAC 3) Check that there is a 'CatalogConcernHelp' block listed in the HTML Customisations page. 4) On the OPAC navigate to a record and click the 'Report a concern' button. 5) Confirm that the content of 'CatalogConcernHelp' displays beneath the detail entry box and that it displays as expected. 6) Check that there is a 'CatalogConcernTemplate' block listed in the HTML customisations page. 7) On the OPAC 'Report a concern' modal, you should see the content of the 'CatalogConcernTemplate' block pre-filled in the details textarea. Note: There is a caveat to the template.. as textarea can only be used to submit plaintext with this patch and as such the template needs to not utilise the WYSIWYG editor else you will be faced with raw HTML inside your textarea.
Created attachment 143245 [details] [review] Bug 31028: Add acknowledgement notice This patch adds an acknowledgement notice that will be sent to the opac user upon submission of a catalog concern report. Test plan 1) Confirm that a new notice template is added to the notices management page. 2) If using a sandbox, check the 'email log' from the management UI to see the resultant notice has been 'sent'
Created attachment 143246 [details] [review] Bug 31028: Add catalog concern management page to staff This patch adds a catalog concern management page to the staff client accessible via the cataloging home page and a new 'Pending catalog concerns' link on the front page. This includes added the requisit ticket_updates api endpoints and notice triggers and templates for notifying patrons of changes to their reported concerns. Test plan 1) Enable the `OpacCatalogConcerns` system preference 2) Catalog concern management is tied to your users ability to edit the catalog, `editcatalogue`. 3) Confirm that you can see 'Catalog concerns' listed on the cataloging home page if you have the `editcatalogue` permission and not if you do not. 4) Add a new concern as an opac user. 5) Confirm that once a concern is present in the system you see a count of 'catalog concerns pending' on the intranet main page if you have the `editcatalogue` permission. 6) Click through either the cataloging home page or pending concerns link on the main page to view the new concerns management page. 7) Confirm the table displays as one would expect. 8) Confirm clicking on details or the concern title exposes a 'details' modal with the option to add an update or resolve the concern. 9) Verify that if selecting 'notify' when updateing or resolving a concern triggers a notice to be sent to the opac user who first reported the issue.
Created attachment 143247 [details] [review] Bug 31028: Add email notification of cataloguers on submissions This patch adds an optional cataloger notification to email the cataloging team whenever a new catalog concern is reported. Test plan 1) Enable `OpacCatalogConcerns` 2) Add at least one email address to the new `CatalogerEmails` prefernce (a comma delimited list is also allowed). 3) Confirm that a default template has been added to the Notices management, `TICKET_NOTIFY`. 4) Submit a new concern using the OPAC 5) Confirm that an email is sent to those email addresses listed in CatalogerEmails.
Created attachment 143248 [details] [review] Bug 31028: Add ability to report concerns from the staff interface This patch brings the CatalogConcerns feature to the staff client allowing non-cataloguers to report issues with catalog records from the record details page. Test plan 1) Enable the new `CatalogConcerns` system preference 2) Confirm that without the `edit_catalogue` permission your user can submit a catalog concern via `New -> New catalog concern` from the toolbar on a records detail display. 3) Confirm that the right user was recorded as the reporter on the catalog concern management page (You must have logged in again as a user with the `edit_catalogue` permission to see this page.
Created attachment 143249 [details] [review] Bug 31028: Add display to details page This patch adds the display of biblio specific concerns to the biblio detail display page. Test plan 1) Enable the feature as in prior patch test plans 2) Add a concern as per prior patch test plans 3) Confirm that a new tab appears at the bottom of the catalog record details display and all functionality from the concern management page is precent.
Created attachment 143250 [details] [review] Bug 31028: (follow-up) System preference terminology Capitalise NOTE and swap 'client' for 'interface'.
Created attachment 143251 [details] [review] Bug 31028: Only show pending concerns if there are some This patch adds logic to catch when pending_biblio_tickets equals zero.
Created attachment 143252 [details] [review] Bug 31028: (follow-up) Rename TICKET_ACKNOWLEDGE TICKET_ACKNOWLEDGEMENT was too long for the database field size, drop the 'MENT' to ensure it fits.
Created attachment 143253 [details] [review] Bug 31028: (follow-up) Update notice module codes This patch updates the notice codes from 'catalog' to 'catalogue' to be consistent with the existing codebase.
Created attachment 143254 [details] [review] Bug 31028: (follow-up) Consistently style help-block This patch updates the opac and staff modals to set the help-block inside a div instead of a paragraph element allowing for the wysiwyg edited content to display as prescribed. We move the scss inside the fieldset definition to ensure we are specific enough to catch only the intended elements.
Created attachment 143255 [details] [review] Bug 31028: Add feedback to the patron on submission This patch adds a success alert box when a patron submits a concern sucessfully.
Created attachment 143256 [details] [review] Bug 31028: (follow-up) Fix permissions names
Created attachment 143257 [details] [review] Bug 31028: (follow-up) Set notice to non-html This should resolve the lack of linebreaks in resulting emails
(In reply to David Nind from comment #235) > I've retested and here are some more comments. Thank you so much for persevering here :) > 1. When submitting a concern on the OPAC, there is no acknowledgement > message, for example like when you report a problem or make a purchase > suggestion (such as, "Your catalog concern report was submitted.") - you are > just returned to the record. Added now to the OPAC.. I didn't add it to the staff client yet, I wasn't sure it was as important here. > 2. Last comment/update is prepopulated into the update field without a hard > page refresh: > 2.1 Click on the Details action for a concern > 2.2 Add a comment in the update field and click on comment > 2.3 Click on the details action again for the same concern without > refreshing the page: note that the update field is populated with the last > comment made > 2.4 Click on another concern: same results as 2.3 > 2.5 If you click away to another page (or a hard referesh - Shift + > Refresh), and then go back to the catalog concerns page this doesn't happen. This should be resolved now. > 3. Permissions to manage concerns - I still can't get this to work using the > editcatalog permission: > 3.1 I added the editcatalog permission + all tools to a staff user > (Henry). > 3.2 When I go to access catalog concerns (either from 'Pending catalog > concerns' on the home page or from the cataloging home page), I get "You do > not have permission to access this page" and the login form. > 3.3 Without the permission, I don't see 'Pending catalog concerns' on the > home page or "Catalog concerns" on the Cataloguing home page (as expected). > 3.4 I also gave all permissions except "Access to all librarian functions > (superlibrarian)" and I still get the same permission error as in 3.2. Great work spotting this one, there was a misnamed permission on my part in the code. Fixed now. > 4. Details of concerns listed on the record details page are now shown, > however: > 4.1 If resolved, can still add comments, and can also click on resolve > again (using the koha superlibrarian user). > 4.2 Whereas, in the Cataloging > Catalog concerns area, once you have > resolved the concern the only option you have is the "Comment" button. > 4.2 If you don't have permission, can see the details in modal window and > the Resolve and Comment buttons are displayed. When attempting to make a > comment or resolve, the modal sits there with the "spinner" on the button. This should now match the main concern management page. > 5. Reporting a catalog concern from the staff interface - display of help > text: > 5.1 If the help text has a bulleted list, the bullets aren't shown (add > some lines to the help text, make them into a bulleted list, report a > problem in the staff interface for a record). Resolved, but required a CSS rebuild to test > 6. Notices sent using email (see [1] for how I set up to test): > 8.1 Acknowledgement, update, and resolved notifications come through > (acknowledgement messages came straight through, but update and resolved came > through when I ran misc/cronjobs/process_message_queue.pl). Timing is as designed, acknowledgement is immediate, other notices are queued. > 8.2 The notify message to CatalogersEmail address didn't come through and > is not in the message queue. I can't seem to replicate this not coming through.. - Perhaps the empty CatalogersEmail preference was cached? > 8.3 Messages come through as a single line without any line breaks. Does > the notice need HTML tags for this? See [2] for examples of what was > received. This should be resolved now by dropping the 'is_html' flag. > 8.4 Only the 'Catalog concern updated' and 'Catalog concern resolved; > notices were displayed under the patron's record of notices - the > acknowledgement notice wasn't listed. Acknowledgement should now also show here. > 7. Setting CatalogerEmails - wrong name in test plan for patch 'Add email > notification of cataloguers on submissions' (CataloguerEmails should be > CatalogerEmails. Corrected, but I also noticed you cannot enter a comma delimited list.. I think it's OK to only allow one email address for now. > 8. List of concerns - should it default to only displaying the unresolved > concerns? Otherwise, the list could get quite long... Maybe this should be a > separate bug if considered an issue, as I noticed that this is the same > pattern used for OPAC problem reports and AllowCheckoutNotes. Good idea, but I agree perhaps it's one for a later bug. > [1] Set up for testing notifications using Gmail when using KTD. Add this to > /etc/koha/sites/kohadev/koha-conf.xml, setup an App password for your Gmail > account, add the details as indicated, and add your Gmail address as the > email for a patron(s) used in testing: > > <smtp_server> > <host>smtp.gmail.com</host> > <port>587</port> > <timeout>5</timeout> > <ssl_mode>STARTTLS</ssl_mode> > <user_name>YOURGMAILADDRESS</user_name> > <password>YOURAPPPASSWORD/password> > <debug>1</debug> > </smtp_server> > > [2] Text of email messages - came through as a single line: > > Acknowledgement: > > Dear koha (42), Thankyou for your report concerning Lady Susan ; The Watsons > ; Sanditon / . You reported: **Describe the concern** A clear and concise > description of what the concern is. **To Reproduce** Steps to reproduce the > behavior: 1. Go to '...' 2. Click on '....' 3. Scroll down to '....' 4. See > error **Expected behavior** A clear and concise description of what you > expected to happen. Thankyou > > Update: > > Dear koha (42), The library has added an update to the concern you reported > against Lady Susan ; The Watsons ; Sanditon / . The following comment was > left: Send an update Thankyou > > Resolved: > > Dear koha (42), The library has now marked your concern with Lady Susan ; > The Watsons ; Sanditon / as resolved. The following comment was left: This > is now fixed! Thankyou
Thanks Martin for fixing all these things! On retesting, some more issues (sorry!). 1. Error on OPAC - there looks to be something wrong with the patch 'Add feedback to the patron on submission': - I get this error in the console when accessing thedetails page for a record: 09:25:59.890 Uncaught SyntaxError: missing } after property list catalog_concern_22.0600077.js:45:12 note: { opened at line 32, column 15 - Clicking on 'Report a concern' in the OPAC doesn't prompt you to login, and doesn't do anything when you submit - I skipped this patch for testing everything else 2. Staff interface home page display - "Catalog concerns pending: X": - If CatalogConcerns is not enabled, then this doesn't display (not expected - would expect it to display if staff user can manage catalog concerns) - If there are active purchase suggestions, problem reports, article requests, and allow checkout notes (with these system preferences enabled), it does display (tested various combinations, and ended up confusing myself!) - If purchase suggestions, problem reports, article requests, and allow checkout notes are not enabled (or there are no active requests), then it doesn't display catalog concerns pending 3. Notices: 3.1 TICKET_ACKNOWLEDGE notice: . there are lots of extra lines in the message, not sure whether that is something to do with using Gmail to test or not [1] . there is a span tag visible around the record name . If I select HTML message for the notice, it comes through as one line . This is similar for the other notices (and non-catalog concern notices as well) - it maybe something more generic with my setup/HTML email message generation 3.2 TICKET_NOTIFY notice - warning in the /var/log/koha/kohadev/plack-api-error.log: [2022/11/04 19:36:16] [WARN] No catalog TICKET_NOTIFY letter transported by email at /kohadevbox/koha/C4/Letters.pm line 584. . This warning may explain why I'm not receiving the TICKET_NOTIFY notices, I'm assuming it is probably a combination of system preferences and the mail setup using Gmail to send notices 3.3 Patron sent notices: I'm now only seeing the catalog concern acknowledgements notice under the patron's notices (previously I was only seeing 'Catalog concern updated' and 'Catalog concern resolved' notices)
Created attachment 143302 [details] [review] Bug 31028: Add `tickets` and `ticket_updates` tables This patch adds the new `tickets` and `ticket_updates` tables for tracking catalog concern tickets.
Created attachment 143303 [details] [review] Bug 31028: DBIC Schema update
Created attachment 143304 [details] [review] Bug 31028: Add new Koha::Object(s) classes This patch adds new Koha::Object(s) for the newly introduced tables, including updateing existing Koha::Objects adding new relations as required.
Created attachment 143305 [details] [review] Bug 31028: Add API's for tickets This patch adds basic CRUD API's for the ticket endpoints.
Created attachment 143306 [details] [review] Bug 31028: Add `OpacCatalogConcerns` preference Enabling this preference should allow catalog concerns to be added by logged in patrons on the opac.
Created attachment 143307 [details] [review] Bug 31028: Add ability to report catalog concerns from the OPAC This patch adds the ability for patrons to report catalog concerns via the opac. Test plan 1) Enable the new `OpacCatalogConcerns` system preference 2) Navigate to the record details page of a biblio record on the OPAC 3) You should see a new 'Report a concern' option in the right side actions box 4) If not logged in you should have the login modal displayed and upon a successful login you should be redirected back to the details page with a new model displayed for entering concern details 5) Submit your concern with a title and details.
Created attachment 143308 [details] [review] Bug 31028: Add configurable help text and templates This patch adds configurable help text and a template option to the catalog concern report modal in the OPAC. Test plan 1) Enable `OpacCatalogConcerns` preference 2) Build the CSS for the OPAC 3) Check that there is a 'CatalogConcernHelp' block listed in the HTML Customisations page. 4) On the OPAC navigate to a record and click the 'Report a concern' button. 5) Confirm that the content of 'CatalogConcernHelp' displays beneath the detail entry box and that it displays as expected. 6) Check that there is a 'CatalogConcernTemplate' block listed in the HTML customisations page. 7) On the OPAC 'Report a concern' modal, you should see the content of the 'CatalogConcernTemplate' block pre-filled in the details textarea. Note: There is a caveat to the template.. as textarea can only be used to submit plaintext with this patch and as such the template needs to not utilise the WYSIWYG editor else you will be faced with raw HTML inside your textarea.
Created attachment 143309 [details] [review] Bug 31028: Add acknowledgement notice This patch adds an acknowledgement notice that will be sent to the opac user upon submission of a catalog concern report. Test plan 1) Confirm that a new notice template is added to the notices management page. 2) If using a sandbox, check the 'email log' from the management UI to see the resultant notice has been 'sent'
Created attachment 143310 [details] [review] Bug 31028: Add catalog concern management page to staff This patch adds a catalog concern management page to the staff client accessible via the cataloging home page and a new 'Pending catalog concerns' link on the front page. This includes added the requisit ticket_updates api endpoints and notice triggers and templates for notifying patrons of changes to their reported concerns. Test plan 1) Enable the `OpacCatalogConcerns` system preference 2) Catalog concern management is tied to your users ability to edit the catalog, `editcatalogue`. 3) Confirm that you can see 'Catalog concerns' listed on the cataloging home page if you have the `editcatalogue` permission and not if you do not. 4) Add a new concern as an opac user. 5) Confirm that once a concern is present in the system you see a count of 'catalog concerns pending' on the intranet main page if you have the `editcatalogue` permission. 6) Click through either the cataloging home page or pending concerns link on the main page to view the new concerns management page. 7) Confirm the table displays as one would expect. 8) Confirm clicking on details or the concern title exposes a 'details' modal with the option to add an update or resolve the concern. 9) Verify that if selecting 'notify' when updateing or resolving a concern triggers a notice to be sent to the opac user who first reported the issue.
Created attachment 143311 [details] [review] Bug 31028: Add email notification of cataloguers on submissions This patch adds an optional cataloger notification to email the cataloging team whenever a new catalog concern is reported. Test plan 1) Enable `OpacCatalogConcerns` 2) Add at least one email address to the new `CatalogerEmails` prefernce (a comma delimited list is also allowed). 3) Confirm that a default template has been added to the Notices management, `TICKET_NOTIFY`. 4) Submit a new concern using the OPAC 5) Confirm that an email is sent to those email addresses listed in CatalogerEmails.
Created attachment 143312 [details] [review] Bug 31028: Add ability to report concerns from the staff interface This patch brings the CatalogConcerns feature to the staff client allowing non-cataloguers to report issues with catalog records from the record details page. Test plan 1) Enable the new `CatalogConcerns` system preference 2) Confirm that without the `edit_catalogue` permission your user can submit a catalog concern via `New -> New catalog concern` from the toolbar on a records detail display. 3) Confirm that the right user was recorded as the reporter on the catalog concern management page (You must have logged in again as a user with the `edit_catalogue` permission to see this page.
Created attachment 143313 [details] [review] Bug 31028: Add display to details page This patch adds the display of biblio specific concerns to the biblio detail display page. Test plan 1) Enable the feature as in prior patch test plans 2) Add a concern as per prior patch test plans 3) Confirm that a new tab appears at the bottom of the catalog record details display and all functionality from the concern management page is precent.
Created attachment 143314 [details] [review] Bug 31028: (follow-up) System preference terminology Capitalise NOTE and swap 'client' for 'interface'.
Created attachment 143315 [details] [review] Bug 31028: Only show pending concerns if there are some This patch adds logic to catch when pending_biblio_tickets equals zero.
Created attachment 143316 [details] [review] Bug 31028: (follow-up) Rename TICKET_ACKNOWLEDGE TICKET_ACKNOWLEDGEMENT was too long for the database field size, drop the 'MENT' to ensure it fits.
Created attachment 143317 [details] [review] Bug 31028: (follow-up) Update notice module codes This patch updates the notice codes from 'catalog' to 'catalogue' to be consistent with the existing codebase.
Created attachment 143318 [details] [review] Bug 31028: (follow-up) Consistently style help-block This patch updates the opac and staff modals to set the help-block inside a div instead of a paragraph element allowing for the wysiwyg edited content to display as prescribed. We move the scss inside the fieldset definition to ensure we are specific enough to catch only the intended elements.
Created attachment 143319 [details] [review] Bug 31028: Add feedback to the patron on submission This patch adds a success alert box when a patron submits a concern sucessfully.
Created attachment 143320 [details] [review] Bug 31028: (follow-up) Fix permissions names
Created attachment 143321 [details] [review] Bug 31028: (follow-up) Add <br> to notices This should resolve the lack of linebreaks in resulting emails
(In reply to David Nind from comment #257) > Thanks Martin for fixing all these things! > > On retesting, some more issues (sorry!). > > 1. Error on OPAC - there looks to be something wrong with the patch 'Add > feedback to the patron on submission': Damn, I missed a comma in the rebuse just prior to uploading that last set of patches.. resolved now. > 2. Staff interface home page display - "Catalog concerns pending: X": > - If CatalogConcerns is not enabled, then this doesn't display (not > expected - would expect it to display if staff user can manage catalog > concerns) > - If there are active purchase suggestions, problem reports, article > requests, and allow checkout notes (with these system preferences enabled), > it does display (tested various combinations, and ended up confusing myself!) > - If purchase suggestions, problem reports, article requests, and allow > checkout notes are not enabled (or there are no active requests), then it > doesn't display catalog concerns pending So the conditions here are 'IF ( CatalogConcerns is enabled OR OpacCatalogConcerns is enabled ) AND there are pending concerns AND the user has the edit_catalog permission DISPLAY the pending concerns count'. I'm wondering if we got a database update mixed in somewhere a long the lines or something here. I just tested this with a fresh k-t-d running just the db update and yarn builds and it appears to work as expected for me. > 3. Notices: > > 3.1 TICKET_ACKNOWLEDGE notice: > . there are lots of extra lines in the message, not sure whether that is > something to do with using Gmail to test or not [1] > . there is a span tag visible around the record name > . If I select HTML message for the notice, it comes through as one line > . This is similar for the other notices (and non-catalog concern notices > as well) - it maybe something more generic with my setup/HTML email message > generation I've updated the final patch to go back to html emails and I've replaced the \r\n with <br>.. hopefully that'll resolve this one. > 3.2 TICKET_NOTIFY notice - warning in the > /var/log/koha/kohadev/plack-api-error.log: > [2022/11/04 19:36:16] [WARN] No catalog TICKET_NOTIFY letter transported > by email at /kohadevbox/koha/C4/Letters.pm line 584. > . This warning may explain why I'm not receiving the TICKET_NOTIFY > notices, I'm assuming it is probably a combination of system preferences and > the mail setup using Gmail to send notices Hmm.. wonder if this was again a mix up in the database updates.. running this in a fresh k-t-d now to try to replicate. > 3.3 Patron sent notices: I'm now only seeing the catalog concern > acknowledgements notice under the patron's notices (previously I was only > seeing 'Catalog concern updated' and 'Catalog concern resolved' notices) These only send when 'Notify' is set.. I'm testing this in k-t-d again now myself.
Created attachment 143322 [details] [review] Bug 31028: Add `tickets` and `ticket_updates` tables This patch adds the new `tickets` and `ticket_updates` tables for tracking catalog concern tickets.
Created attachment 143323 [details] [review] Bug 31028: DBIC Schema update
Created attachment 143324 [details] [review] Bug 31028: Add new Koha::Object(s) classes This patch adds new Koha::Object(s) for the newly introduced tables, including updateing existing Koha::Objects adding new relations as required.
Created attachment 143325 [details] [review] Bug 31028: Add API's for tickets This patch adds basic CRUD API's for the ticket endpoints.
Created attachment 143326 [details] [review] Bug 31028: Add `OpacCatalogConcerns` preference Enabling this preference should allow catalog concerns to be added by logged in patrons on the opac.
Created attachment 143327 [details] [review] Bug 31028: Add ability to report catalog concerns from the OPAC This patch adds the ability for patrons to report catalog concerns via the opac. Test plan 1) Enable the new `OpacCatalogConcerns` system preference 2) Navigate to the record details page of a biblio record on the OPAC 3) You should see a new 'Report a concern' option in the right side actions box 4) If not logged in you should have the login modal displayed and upon a successful login you should be redirected back to the details page with a new model displayed for entering concern details 5) Submit your concern with a title and details.
Created attachment 143328 [details] [review] Bug 31028: Add configurable help text and templates This patch adds configurable help text and a template option to the catalog concern report modal in the OPAC. Test plan 1) Enable `OpacCatalogConcerns` preference 2) Build the CSS for the OPAC 3) Check that there is a 'CatalogConcernHelp' block listed in the HTML Customisations page. 4) On the OPAC navigate to a record and click the 'Report a concern' button. 5) Confirm that the content of 'CatalogConcernHelp' displays beneath the detail entry box and that it displays as expected. 6) Check that there is a 'CatalogConcernTemplate' block listed in the HTML customisations page. 7) On the OPAC 'Report a concern' modal, you should see the content of the 'CatalogConcernTemplate' block pre-filled in the details textarea. Note: There is a caveat to the template.. as textarea can only be used to submit plaintext with this patch and as such the template needs to not utilise the WYSIWYG editor else you will be faced with raw HTML inside your textarea.
Created attachment 143329 [details] [review] Bug 31028: Add acknowledgement notice This patch adds an acknowledgement notice that will be sent to the opac user upon submission of a catalog concern report. Test plan 1) Confirm that a new notice template is added to the notices management page. 2) If using a sandbox, check the 'email log' from the management UI to see the resultant notice has been 'sent'
Created attachment 143330 [details] [review] Bug 31028: Add catalog concern management page to staff This patch adds a catalog concern management page to the staff client accessible via the cataloging home page and a new 'Pending catalog concerns' link on the front page. This includes added the requisit ticket_updates api endpoints and notice triggers and templates for notifying patrons of changes to their reported concerns. Test plan 1) Enable the `OpacCatalogConcerns` system preference 2) Catalog concern management is tied to your users ability to edit the catalog, `editcatalogue`. 3) Confirm that you can see 'Catalog concerns' listed on the cataloging home page if you have the `editcatalogue` permission and not if you do not. 4) Add a new concern as an opac user. 5) Confirm that once a concern is present in the system you see a count of 'catalog concerns pending' on the intranet main page if you have the `editcatalogue` permission. 6) Click through either the cataloging home page or pending concerns link on the main page to view the new concerns management page. 7) Confirm the table displays as one would expect. 8) Confirm clicking on details or the concern title exposes a 'details' modal with the option to add an update or resolve the concern. 9) Verify that if selecting 'notify' when updateing or resolving a concern triggers a notice to be sent to the opac user who first reported the issue.
Created attachment 143331 [details] [review] Bug 31028: Add email notification of cataloguers on submissions This patch adds an optional cataloger notification to email the cataloging team whenever a new catalog concern is reported. Test plan 1) Enable `OpacCatalogConcerns` 2) Add at least one email address to the new `CatalogerEmails` prefernce (a comma delimited list is also allowed). 3) Confirm that a default template has been added to the Notices management, `TICKET_NOTIFY`. 4) Submit a new concern using the OPAC 5) Confirm that an email is sent to those email addresses listed in CatalogerEmails.
Created attachment 143332 [details] [review] Bug 31028: Add ability to report concerns from the staff interface This patch brings the CatalogConcerns feature to the staff client allowing non-cataloguers to report issues with catalog records from the record details page. Test plan 1) Enable the new `CatalogConcerns` system preference 2) Confirm that without the `edit_catalogue` permission your user can submit a catalog concern via `New -> New catalog concern` from the toolbar on a records detail display. 3) Confirm that the right user was recorded as the reporter on the catalog concern management page (You must have logged in again as a user with the `edit_catalogue` permission to see this page.
Created attachment 143333 [details] [review] Bug 31028: Add display to details page This patch adds the display of biblio specific concerns to the biblio detail display page. Test plan 1) Enable the feature as in prior patch test plans 2) Add a concern as per prior patch test plans 3) Confirm that a new tab appears at the bottom of the catalog record details display and all functionality from the concern management page is precent.
Created attachment 143334 [details] [review] Bug 31028: (follow-up) System preference terminology Capitalise NOTE and swap 'client' for 'interface'.
Created attachment 143335 [details] [review] Bug 31028: Only show pending concerns if there are some This patch adds logic to catch when pending_biblio_tickets equals zero.
Created attachment 143336 [details] [review] Bug 31028: (follow-up) Rename TICKET_ACKNOWLEDGE TICKET_ACKNOWLEDGEMENT was too long for the database field size, drop the 'MENT' to ensure it fits.
Created attachment 143337 [details] [review] Bug 31028: (follow-up) Update notice module codes This patch updates the notice codes from 'catalog' to 'catalogue' to be consistent with the existing codebase.
Created attachment 143338 [details] [review] Bug 31028: (follow-up) Consistently style help-block This patch updates the opac and staff modals to set the help-block inside a div instead of a paragraph element allowing for the wysiwyg edited content to display as prescribed. We move the scss inside the fieldset definition to ensure we are specific enough to catch only the intended elements.
Created attachment 143339 [details] [review] Bug 31028: Add feedback to the patron on submission This patch adds a success alert box when a patron submits a concern sucessfully.
Created attachment 143340 [details] [review] Bug 31028: (follow-up) Fix permissions names
Created attachment 143341 [details] [review] Bug 31028: (follow-up) Add <br> to notices This should resolve the lack of linebreaks in resulting emails
Found and resolved the issue with update/resolve emails not sending.
Thanks Martin for looking at things I raised! 1. An update is required to the DBIC Schema Update patch. The DBIC patch failed - I skipped this patch, and then ran dbic. 2. Displaying "Catalog concerns pending: X". I think I found the cause of the problem I was experiencing (using KTD and the koha (superliabrarian user)) - a capital P is required in line 180 for Koha.Preferences in intranet-main.tt (see 2.4). To replicate: 2.1 Enable OpacCatalogConcerns and add a concern using the OPAC. ==> Pending concerns are not displayed on the staff interface home page 2.2 Display logic and expected results when there are pending concerns and correct permissions: 2.2.1 CatalogConcerns and OpacCatalogConcerns: both enabled - displays 2.2.2 CatalogConcerns and OpacCatalogConcerns: both disabled - doesn't display 2.2.3 CatalogConcerns enabled and OpacCatalogConcerns disabled: displays 2.2.4 CatalogConcerns disabled and OpacCatalogConcerns enabled: displays 2.3 Currently with the preferences set as per 2.2.4, pending concerns are not displayed. 2.4 Edit line 180 of koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt - a capital P required for Koha.Preference . change Koha.preference('OpacCatalogConcerns') to Koha.Preference('OpacCatalogConcerns') 2.5 Set preferences as per 2.2.4 - refresh the home page and now pending concerns are now displayed. 3. Notices - now showing acknowledgement, update and resolved notices for a patron. Thanks for fixing! 4. Notices - notification to cataloguers still not coming through for me. I'll put this down to a combination of the email configuration for Gmail that I'm using and system preferences for email addresses.
Created attachment 143470 [details] [review] Bug 31028: Add `tickets` and `ticket_updates` tables This patch adds the new `tickets` and `ticket_updates` tables for tracking catalog concern tickets.
Created attachment 143471 [details] [review] Bug 31028: DBIC Schema update
Created attachment 143472 [details] [review] Bug 31028: Add new Koha::Object(s) classes This patch adds new Koha::Object(s) for the newly introduced tables, including updateing existing Koha::Objects adding new relations as required.
Created attachment 143473 [details] [review] Bug 31028: Add API's for tickets This patch adds basic CRUD API's for the ticket endpoints.
Created attachment 143474 [details] [review] Bug 31028: Add `OpacCatalogConcerns` preference Enabling this preference should allow catalog concerns to be added by logged in patrons on the opac.
Created attachment 143475 [details] [review] Bug 31028: Add ability to report catalog concerns from the OPAC This patch adds the ability for patrons to report catalog concerns via the opac. Test plan 1) Enable the new `OpacCatalogConcerns` system preference 2) Navigate to the record details page of a biblio record on the OPAC 3) You should see a new 'Report a concern' option in the right side actions box 4) If not logged in you should have the login modal displayed and upon a successful login you should be redirected back to the details page with a new model displayed for entering concern details 5) Submit your concern with a title and details.
Created attachment 143476 [details] [review] Bug 31028: Add configurable help text and templates This patch adds configurable help text and a template option to the catalog concern report modal in the OPAC. Test plan 1) Enable `OpacCatalogConcerns` preference 2) Build the CSS for the OPAC 3) Check that there is a 'CatalogConcernHelp' block listed in the HTML Customisations page. 4) On the OPAC navigate to a record and click the 'Report a concern' button. 5) Confirm that the content of 'CatalogConcernHelp' displays beneath the detail entry box and that it displays as expected. 6) Check that there is a 'CatalogConcernTemplate' block listed in the HTML customisations page. 7) On the OPAC 'Report a concern' modal, you should see the content of the 'CatalogConcernTemplate' block pre-filled in the details textarea. Note: There is a caveat to the template.. as textarea can only be used to submit plaintext with this patch and as such the template needs to not utilise the WYSIWYG editor else you will be faced with raw HTML inside your textarea.
Created attachment 143477 [details] [review] Bug 31028: Add acknowledgement notice This patch adds an acknowledgement notice that will be sent to the opac user upon submission of a catalog concern report. Test plan 1) Confirm that a new notice template is added to the notices management page. 2) If using a sandbox, check the 'email log' from the management UI to see the resultant notice has been 'sent'
Created attachment 143478 [details] [review] Bug 31028: Add catalog concern management page to staff This patch adds a catalog concern management page to the staff client accessible via the cataloging home page and a new 'Pending catalog concerns' link on the front page. This includes added the requisit ticket_updates api endpoints and notice triggers and templates for notifying patrons of changes to their reported concerns. Test plan 1) Enable the `OpacCatalogConcerns` system preference 2) Catalog concern management is tied to your users ability to edit the catalog, `editcatalogue`. 3) Confirm that you can see 'Catalog concerns' listed on the cataloging home page if you have the `editcatalogue` permission and not if you do not. 4) Add a new concern as an opac user. 5) Confirm that once a concern is present in the system you see a count of 'catalog concerns pending' on the intranet main page if you have the `editcatalogue` permission. 6) Click through either the cataloging home page or pending concerns link on the main page to view the new concerns management page. 7) Confirm the table displays as one would expect. 8) Confirm clicking on details or the concern title exposes a 'details' modal with the option to add an update or resolve the concern. 9) Verify that if selecting 'notify' when updateing or resolving a concern triggers a notice to be sent to the opac user who first reported the issue.
Created attachment 143479 [details] [review] Bug 31028: Add email notification of cataloguers on submissions This patch adds an optional cataloger notification to email the cataloging team whenever a new catalog concern is reported. Test plan 1) Enable `OpacCatalogConcerns` 2) Add at least one email address to the new `CatalogerEmails` prefernce (a comma delimited list is also allowed). 3) Confirm that a default template has been added to the Notices management, `TICKET_NOTIFY`. 4) Submit a new concern using the OPAC 5) Confirm that an email is sent to those email addresses listed in CatalogerEmails.
Created attachment 143480 [details] [review] Bug 31028: Add ability to report concerns from the staff interface This patch brings the CatalogConcerns feature to the staff client allowing non-cataloguers to report issues with catalog records from the record details page. Test plan 1) Enable the new `CatalogConcerns` system preference 2) Confirm that without the `edit_catalogue` permission your user can submit a catalog concern via `New -> New catalog concern` from the toolbar on a records detail display. 3) Confirm that the right user was recorded as the reporter on the catalog concern management page (You must have logged in again as a user with the `edit_catalogue` permission to see this page.
Created attachment 143481 [details] [review] Bug 31028: Add display to details page This patch adds the display of biblio specific concerns to the biblio detail display page. Test plan 1) Enable the feature as in prior patch test plans 2) Add a concern as per prior patch test plans 3) Confirm that a new tab appears at the bottom of the catalog record details display and all functionality from the concern management page is precent.
Created attachment 143482 [details] [review] Bug 31028: (follow-up) System preference terminology Capitalise NOTE and swap 'client' for 'interface'.
Created attachment 143483 [details] [review] Bug 31028: Only show pending concerns if there are some This patch adds logic to catch when pending_biblio_tickets equals zero.
Created attachment 143484 [details] [review] Bug 31028: (follow-up) Rename TICKET_ACKNOWLEDGE TICKET_ACKNOWLEDGEMENT was too long for the database field size, drop the 'MENT' to ensure it fits.
Created attachment 143485 [details] [review] Bug 31028: (follow-up) Update notice module codes This patch updates the notice codes from 'catalog' to 'catalogue' to be consistent with the existing codebase.
Created attachment 143486 [details] [review] Bug 31028: (follow-up) Consistently style help-block This patch updates the opac and staff modals to set the help-block inside a div instead of a paragraph element allowing for the wysiwyg edited content to display as prescribed. We move the scss inside the fieldset definition to ensure we are specific enough to catch only the intended elements.
Created attachment 143487 [details] [review] Bug 31028: Add feedback to the patron on submission This patch adds a success alert box when a patron submits a concern sucessfully.
Created attachment 143488 [details] [review] Bug 31028: (follow-up) Fix permissions names
Created attachment 143489 [details] [review] Bug 31028: (follow-up) Add <br> to notices This should resolve the lack of linebreaks in resulting emails
Created attachment 143490 [details] [review] Bug 31028: (follow-up) Fix template whitespace
Wow master is moving so fast.. Fixed the DBIC schema issue, thanks. Great spot of `p` vs `P`.. fixed now, thanks. 4. Notices - notification to cataloguers still not coming through for me. I'll put this down to a combination of the email configuration for Gmail that I'm using and system preferences for email addresses. This got me to dig a little further.. I found a regression from one of the rebases.. 'catalog' vs 'catalogue' module name.. sorted now. Whitespace in emails in the database is still an issue, but as they're HTML in the email client they should appear OK I believe. (I'm working on removing the superflous whitespace from the includes in a new bug now) Thanks again for all the testing David, Martin
Thanks Martin! Hopefully this is the last set of issues: 1. OPAC redirect to log in: - I get redirected to the login page - After enter the details, I get this message (in Firefox) (it may be something to do with bug 31699, and I haven't set things up correctly): "Oops. The site at http://127.0.0.1:8080/cgi-bin/koha/opac-user.pl?has-search-query=;return=http://127.0.0.1:8080/cgi-bin/koha/opac-detail.pl?biblionumber=262&query_desc=kw%2Cwrdl%3A%20perl&modal=concern has experienced a network protocol violation that cannot be repaired. The page you are trying to view cannot be shown because an error in the data transmission was detected. Please contact the website owners to inform them of this problem." 2. Catalog concerns landing page: the filter for the Status column doesn't seem to work: - Have two catalog concerns - one open and one closed - For the status column filter, start typing Open - No results shown Otherwise, happy to finally sign off! David
(In reply to David Nind from comment #323) > 1. OPAC redirect to log in: This was because of the work that happened on 21699 between times.. I've got a fix ready here now and will upload shortly. > 2. Catalog concerns landing page: the filter for the Status column doesn't > seem to work: > - Have two catalog concerns - one open and one closed > - For the status column filter, start typing Open > - No results shown This one is much harder.. searches happen serverside and run against the 'resolved_date' right now (i.e A search for the displayed words won't work as it's expecting to search on a date). It highlighted to me that I also display resolver name so we should fire against the firstname and lastname fields for the resolver (So a search for 'David' would filter.. but this doesn't help with a search for 'Open' still and I have no clear way around that.. we do have the filter at the top of the page especially for this reason though..) Should just remove searching for that field do you think?
Created attachment 143647 [details] [review] Bug 31028: Add `tickets` and `ticket_updates` tables This patch adds the new `tickets` and `ticket_updates` tables for tracking catalog concern tickets.
Created attachment 143648 [details] [review] Bug 31028: DBIC Schema update
Created attachment 143649 [details] [review] Bug 31028: Add new Koha::Object(s) classes This patch adds new Koha::Object(s) for the newly introduced tables, including updateing existing Koha::Objects adding new relations as required.
Created attachment 143650 [details] [review] Bug 31028: Add API's for tickets This patch adds basic CRUD API's for the ticket endpoints.
Created attachment 143651 [details] [review] Bug 31028: Add `OpacCatalogConcerns` preference Enabling this preference should allow catalog concerns to be added by logged in patrons on the opac.
Created attachment 143652 [details] [review] Bug 31028: Add ability to report catalog concerns from the OPAC This patch adds the ability for patrons to report catalog concerns via the opac. Test plan 1) Enable the new `OpacCatalogConcerns` system preference 2) Navigate to the record details page of a biblio record on the OPAC 3) You should see a new 'Report a concern' option in the right side actions box 4) If not logged in you should have the login modal displayed and upon a successful login you should be redirected back to the details page with a new model displayed for entering concern details 5) Submit your concern with a title and details.
Created attachment 143653 [details] [review] Bug 31028: Add configurable help text and templates This patch adds configurable help text and a template option to the catalog concern report modal in the OPAC. Test plan 1) Enable `OpacCatalogConcerns` preference 2) Build the CSS for the OPAC 3) Check that there is a 'CatalogConcernHelp' block listed in the HTML Customisations page. 4) On the OPAC navigate to a record and click the 'Report a concern' button. 5) Confirm that the content of 'CatalogConcernHelp' displays beneath the detail entry box and that it displays as expected. 6) Check that there is a 'CatalogConcernTemplate' block listed in the HTML customisations page. 7) On the OPAC 'Report a concern' modal, you should see the content of the 'CatalogConcernTemplate' block pre-filled in the details textarea. Note: There is a caveat to the template.. as textarea can only be used to submit plaintext with this patch and as such the template needs to not utilise the WYSIWYG editor else you will be faced with raw HTML inside your textarea.
Created attachment 143654 [details] [review] Bug 31028: Add acknowledgement notice This patch adds an acknowledgement notice that will be sent to the opac user upon submission of a catalog concern report. Test plan 1) Confirm that a new notice template is added to the notices management page. 2) If using a sandbox, check the 'email log' from the management UI to see the resultant notice has been 'sent'
Created attachment 143655 [details] [review] Bug 31028: Add catalog concern management page to staff This patch adds a catalog concern management page to the staff client accessible via the cataloging home page and a new 'Pending catalog concerns' link on the front page. This includes added the requisit ticket_updates api endpoints and notice triggers and templates for notifying patrons of changes to their reported concerns. Test plan 1) Enable the `OpacCatalogConcerns` system preference 2) Catalog concern management is tied to your users ability to edit the catalog, `editcatalogue`. 3) Confirm that you can see 'Catalog concerns' listed on the cataloging home page if you have the `editcatalogue` permission and not if you do not. 4) Add a new concern as an opac user. 5) Confirm that once a concern is present in the system you see a count of 'catalog concerns pending' on the intranet main page if you have the `editcatalogue` permission. 6) Click through either the cataloging home page or pending concerns link on the main page to view the new concerns management page. 7) Confirm the table displays as one would expect. 8) Confirm clicking on details or the concern title exposes a 'details' modal with the option to add an update or resolve the concern. 9) Verify that if selecting 'notify' when updateing or resolving a concern triggers a notice to be sent to the opac user who first reported the issue.
Created attachment 143656 [details] [review] Bug 31028: Add email notification of cataloguers on submissions This patch adds an optional cataloger notification to email the cataloging team whenever a new catalog concern is reported. Test plan 1) Enable `OpacCatalogConcerns` 2) Add at least one email address to the new `CatalogerEmails` prefernce (a comma delimited list is also allowed). 3) Confirm that a default template has been added to the Notices management, `TICKET_NOTIFY`. 4) Submit a new concern using the OPAC 5) Confirm that an email is sent to those email addresses listed in CatalogerEmails.
Created attachment 143657 [details] [review] Bug 31028: Add ability to report concerns from the staff interface This patch brings the CatalogConcerns feature to the staff client allowing non-cataloguers to report issues with catalog records from the record details page. Test plan 1) Enable the new `CatalogConcerns` system preference 2) Confirm that without the `edit_catalogue` permission your user can submit a catalog concern via `New -> New catalog concern` from the toolbar on a records detail display. 3) Confirm that the right user was recorded as the reporter on the catalog concern management page (You must have logged in again as a user with the `edit_catalogue` permission to see this page.
Created attachment 143658 [details] [review] Bug 31028: Add display to details page This patch adds the display of biblio specific concerns to the biblio detail display page. Test plan 1) Enable the feature as in prior patch test plans 2) Add a concern as per prior patch test plans 3) Confirm that a new tab appears at the bottom of the catalog record details display and all functionality from the concern management page is precent.
Created attachment 143659 [details] [review] Bug 31028: (follow-up) System preference terminology Capitalise NOTE and swap 'client' for 'interface'.
Created attachment 143660 [details] [review] Bug 31028: Only show pending concerns if there are some This patch adds logic to catch when pending_biblio_tickets equals zero.
Created attachment 143661 [details] [review] Bug 31028: (follow-up) Rename TICKET_ACKNOWLEDGE TICKET_ACKNOWLEDGEMENT was too long for the database field size, drop the 'MENT' to ensure it fits.
Created attachment 143662 [details] [review] Bug 31028: (follow-up) Update notice module codes This patch updates the notice codes from 'catalog' to 'catalogue' to be consistent with the existing codebase.
Created attachment 143663 [details] [review] Bug 31028: (follow-up) Consistently style help-block This patch updates the opac and staff modals to set the help-block inside a div instead of a paragraph element allowing for the wysiwyg edited content to display as prescribed. We move the scss inside the fieldset definition to ensure we are specific enough to catch only the intended elements.
Created attachment 143664 [details] [review] Bug 31028: Add feedback to the patron on submission This patch adds a success alert box when a patron submits a concern sucessfully.
Created attachment 143665 [details] [review] Bug 31028: (follow-up) Fix permissions names
Created attachment 143666 [details] [review] Bug 31028: (follow-up) Add <br> to notices This should resolve the lack of linebreaks in resulting emails
Created attachment 143667 [details] [review] Bug 31028: (follow-up) Fix template whitespace
Thanks for all your testing David, Hopefully this last rebase has the redirects working properly again. As for the searching issue on the Status column, I've got it searching on firstname, surname and date but I can't easily add a special case for 'Open' vs 'Resolved'.. but there are the filters at the top of the page for that.. I think this one will have to just come down to training.
Created attachment 143708 [details] [review] Bug 31699: (follow-up) Protect more against open redirects This change checks that the OPACBaseURL exists, and uses its scheme and authority to rewrite the URL passed through the "return" param. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 143709 [details] [review] Bug 31028: Add `tickets` and `ticket_updates` tables This patch adds the new `tickets` and `ticket_updates` tables for tracking catalog concern tickets.
Created attachment 143710 [details] [review] Bug 31028: Add new Koha::Object(s) classes This patch adds new Koha::Object(s) for the newly introduced tables, including updateing existing Koha::Objects adding new relations as required.
Created attachment 143711 [details] [review] Bug 31028: Add API's for tickets This patch adds basic CRUD API's for the ticket endpoints.
Created attachment 143712 [details] [review] Bug 31028: Add `OpacCatalogConcerns` preference Enabling this preference should allow catalog concerns to be added by logged in patrons on the opac.
Created attachment 143713 [details] [review] Bug 31028: Add ability to report catalog concerns from the OPAC This patch adds the ability for patrons to report catalog concerns via the opac. Test plan 1) Enable the new `OpacCatalogConcerns` system preference 2) Navigate to the record details page of a biblio record on the OPAC 3) You should see a new 'Report a concern' option in the right side actions box 4) If not logged in you should have the login modal displayed and upon a successful login you should be redirected back to the details page with a new model displayed for entering concern details 5) Submit your concern with a title and details.
Created attachment 143714 [details] [review] Bug 31028: Add configurable help text and templates This patch adds configurable help text and a template option to the catalog concern report modal in the OPAC. Test plan 1) Enable `OpacCatalogConcerns` preference 2) Build the CSS for the OPAC 3) Check that there is a 'CatalogConcernHelp' block listed in the HTML Customisations page. 4) On the OPAC navigate to a record and click the 'Report a concern' button. 5) Confirm that the content of 'CatalogConcernHelp' displays beneath the detail entry box and that it displays as expected. 6) Check that there is a 'CatalogConcernTemplate' block listed in the HTML customisations page. 7) On the OPAC 'Report a concern' modal, you should see the content of the 'CatalogConcernTemplate' block pre-filled in the details textarea. Note: There is a caveat to the template.. as textarea can only be used to submit plaintext with this patch and as such the template needs to not utilise the WYSIWYG editor else you will be faced with raw HTML inside your textarea.
Created attachment 143715 [details] [review] Bug 31028: Add acknowledgement notice This patch adds an acknowledgement notice that will be sent to the opac user upon submission of a catalog concern report. Test plan 1) Confirm that a new notice template is added to the notices management page. 2) If using a sandbox, check the 'email log' from the management UI to see the resultant notice has been 'sent'
Created attachment 143716 [details] [review] Bug 31028: Add catalog concern management page to staff This patch adds a catalog concern management page to the staff client accessible via the cataloging home page and a new 'Pending catalog concerns' link on the front page. This includes added the requisit ticket_updates api endpoints and notice triggers and templates for notifying patrons of changes to their reported concerns. Test plan 1) Enable the `OpacCatalogConcerns` system preference 2) Catalog concern management is tied to your users ability to edit the catalog, `editcatalogue`. 3) Confirm that you can see 'Catalog concerns' listed on the cataloging home page if you have the `editcatalogue` permission and not if you do not. 4) Add a new concern as an opac user. 5) Confirm that once a concern is present in the system you see a count of 'catalog concerns pending' on the intranet main page if you have the `editcatalogue` permission. 6) Click through either the cataloging home page or pending concerns link on the main page to view the new concerns management page. 7) Confirm the table displays as one would expect. 8) Confirm clicking on details or the concern title exposes a 'details' modal with the option to add an update or resolve the concern. 9) Verify that if selecting 'notify' when updateing or resolving a concern triggers a notice to be sent to the opac user who first reported the issue.
Created attachment 143717 [details] [review] Bug 31028: Add email notification of cataloguers on submissions This patch adds an optional cataloger notification to email the cataloging team whenever a new catalog concern is reported. Test plan 1) Enable `OpacCatalogConcerns` 2) Add at least one email address to the new `CatalogerEmails` prefernce (a comma delimited list is also allowed). 3) Confirm that a default template has been added to the Notices management, `TICKET_NOTIFY`. 4) Submit a new concern using the OPAC 5) Confirm that an email is sent to those email addresses listed in CatalogerEmails.
Created attachment 143718 [details] [review] Bug 31028: Add ability to report concerns from the staff interface This patch brings the CatalogConcerns feature to the staff client allowing non-cataloguers to report issues with catalog records from the record details page. Test plan 1) Enable the new `CatalogConcerns` system preference 2) Confirm that without the `edit_catalogue` permission your user can submit a catalog concern via `New -> New catalog concern` from the toolbar on a records detail display. 3) Confirm that the right user was recorded as the reporter on the catalog concern management page (You must have logged in again as a user with the `edit_catalogue` permission to see this page.
Created attachment 143719 [details] [review] Bug 31028: Add display to details page This patch adds the display of biblio specific concerns to the biblio detail display page. Test plan 1) Enable the feature as in prior patch test plans 2) Add a concern as per prior patch test plans 3) Confirm that a new tab appears at the bottom of the catalog record details display and all functionality from the concern management page is precent.
Created attachment 143720 [details] [review] Bug 31028: (follow-up) System preference terminology Capitalise NOTE and swap 'client' for 'interface'.
Created attachment 143721 [details] [review] Bug 31028: Only show pending concerns if there are some This patch adds logic to catch when pending_biblio_tickets equals zero.
Created attachment 143722 [details] [review] Bug 31028: (follow-up) Rename TICKET_ACKNOWLEDGE TICKET_ACKNOWLEDGEMENT was too long for the database field size, drop the 'MENT' to ensure it fits.
Created attachment 143723 [details] [review] Bug 31028: (follow-up) Update notice module codes This patch updates the notice codes from 'catalog' to 'catalogue' to be consistent with the existing codebase.
Created attachment 143724 [details] [review] Bug 31028: (follow-up) Consistently style help-block This patch updates the opac and staff modals to set the help-block inside a div instead of a paragraph element allowing for the wysiwyg edited content to display as prescribed. We move the scss inside the fieldset definition to ensure we are specific enough to catch only the intended elements.
Created attachment 143725 [details] [review] Bug 31028: Add feedback to the patron on submission This patch adds a success alert box when a patron submits a concern sucessfully.
Created attachment 143726 [details] [review] Bug 31028: (follow-up) Fix permissions names
Created attachment 143727 [details] [review] Bug 31028: (follow-up) Add <br> to notices This should resolve the lack of linebreaks in resulting emails
(In reply to Martin Renvoize from comment #346) > Thanks for all your testing David, > > Hopefully this last rebase has the redirects working properly again. > > As for the searching issue on the Status column, I've got it searching on > firstname, surname and date but I can't easily add a special case for 'Open' > vs 'Resolved'.. but there are the filters at the top of the page for that.. > I think this one will have to just come down to training. Thanks Martin! Good call - I think this is pretty minor in the scheme of things! I've signed off, but the DBIC patch no longer applies - I skipped this and then ran dbic (things are moving so quickly!)... On the OPAC for the report a concern form, the template text is now below the input form and help text - I'm assuming it is to do with the DBIC patch not working. If not, I'll let you add a follow-up patch! I'll also attach an updated consolidated testing plan/notes, if this is any help for the QA Team and documenting.
Updated consolidated test plan/notes - may (or may not) make it easier for testing/QA/documenting as there are so many patches: 1. Apply patches 2. Update database: updatedatabase 3. Build CSS: 3.1 yarn install 3.2 yarn build 3.3 yarn build --opac 4. Setup for testing: 4.1 Configure email for testing the work flow and notices - see [1] for using Gmail and an app password 4.2 Add an email address to the patron account used for testing the OPAC (for example, koha) 4.3 Add an email address to the staff account used for testing the staff interface (for example, koha) 4.4 Add an email address to the new CatalogerEmails system preference 5. Report a catalog concern from the OPAC: 5.1 Enable the new system preference: OpacCatalogConcerns 5.2 Search for a record and view the details page 5.3 There is now a "Report a concern" link in the actions box on the right-hand sidebar (under "Suggest a purchase") 5.4 Click on "Report a concern" 5.5 Add some information to the form (Title, information for each of the headings) and click Submit 5.6 Success message:"Your concern was successfully submitted." 5.7 Repeat steps 5.2-5.6 for another record 5.7 Log out from the OPAC and click on the "Report a concern" link for a record - you should be prompted to log in. After logging in, you are then redirected back to the record page and the form is displayed to report a concern. 5.8 Confirm emails received: . Patron that logged the cataloging concern should have received a "Catalog concern acknowledgement" message . The email address configured for CatalogerEmails system preference should have received a "Catalog concern reported" message 6. Manage catalog concerns from the staff interface: 6.1 From the staff interface home page, select the "Catalog concerns pending: 2" link after the main module links. OR 6.0 Go to Cataloging > Reports > Catalog concerns 6.4 The concern(s) you entered on the OPAC should be listed 6.5 Click on "Details" in the actions column ==> Ticket details displayed in a modal window 6.6 Add some text in the update field for the concern, select the Notify checkbox, and click on the Comment button 6.7 Click the "Details" action again, add an update, select the Notify checkbox, and click on the Resolve button 6.8 Check that the table filters for each column work as expected 6.9 Check that "Hide resolved" and "Show all" filters for the page work as expected 6.10 Check that notifications are sent: . process the mail queue: misc/cronjobs/process_message_queue.pl . the patron should receive a "Catalog concern updated" and "Catalog concern resolved" messages 7. Report a catalog concern from the staff interface: 7.1 Enable the CatalogConcerns system preference 7.1 Search for a record and view the details page 7.2 Select New > New catalog concern 7.4 Enter a title and details, and submit 7.5 Catalog concerns created by staff are managed in the exact same way as those reported from the OPAC - see 6. (includes email notifications) 8. View catalog concerns for a record in the staff interface: 8.1 Go to the record that a concern was logged for in step 5 8.2 Note that there is now a "Concerns" tab for the record 8.3 The "Concerns" tab should list catalog concerns, and you can view the "Details" and manage concern in the same way as step 6 9. Notifications: 9.1 There are four new notice templates in the Catalog category: TICKET_NOTIFY, TICKET_ACKNOWLEDGE, TICKET_RESOLVE, TICKET_UPDATE (see Tools > Patrons and circulation > Notices and slips) 9.2 Prevous steps should have triggered the various notices: . TICKET_ACKNOWLEDGE: email to patron when they raise a concern . TICKET_NOTIFY: email to library staff when a concern is raised . TICKET_UPDATE: add an update to a concern . TICKET_RESOLVE: when concern marked as resolved 9.3 Check that you can see the notices for the patron used in step 5 in their account: Patron details > Notices section 10. Test with OPACReportProblem enabled: 10.1 Enable the system preference 10.2 Submit a "Report a problem" report from the OPAC 10.3 Check that this works as expected in the staff interface, and that both pending problem reports and catalog concerns are displayed 10.4 BONUS tests (optional): test various combinations of enabling and disabling suggestions, OPACReportProblem, AllowCheckoutNotes, OpacCatalogConcerns, and CatalogConcerns system preferences 11. Test a non-super librarian and set them up so that they can manage catalog concerns: 11.1 Add a username and password to a staff user (for example: Henry Acevedo) 11.2 Set the account so that they have some permissions, such as staff access, suggestion management, place and manage holds, but NOT Edit catalog (editcatalogue) 11.3 Log in to the staff interface 11.4 With active concerns, you should not see "Catalog concerns pending: X" on the home page or be able to access Cataloging > Reports > Catalog concerns 11.5 Change their permissions so that they have the Edit catalog (editcatalogue) permission 11.6 You should now see the pending concerns on the home page and be able to view and manage catalog concerns 12. Table configuration: have some active catalog concerns, click configure, hide status column by default, check that you can toggle the status column on and off. 13. Customise the catalog concern help text and template: 13.1 Go to Tools > HTML customizations 13.2 Note that there are two entries available for editing: CatalogConcernHelp and CatalogConcernTemplate 13.3 Make some edits to the CatalogConcernTemplate (note: only use the text editor) 13.4 Make some edits to the CatalogConcernHelp using the WYSIWYG editor - add a bulleted list and some bold text 13.5 Go to report a concern from the OPAC and staff interface 13.6 The changes you made should be reflected in the report a concern forms [1] Set up KTD so that email can be sent (using a Gmail address and an app password): Fromm your Gmail account, set up an App Password. Add these lines (with <user_name> and <password> updated) to /etc/koha/sites/kohadev/koha-conf.xml: <smtp_server> <host>smtp.gmail.com</host> <port>587</port> <timeout>5</timeout> <ssl_mode>STARTTLS</ssl_mode> <user_name>YOURGMAILADDRESS</user_name> <password>GMAILAPPPASSORD</password> <debug>1</debug> </smtp_server> restart_all
Created attachment 144647 [details] [review] Bug 31028: Add `tickets` and `ticket_updates` tables This patch adds the new `tickets` and `ticket_updates` tables for tracking catalog concern tickets. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Helen Oliver <HOliver@tavi-port.ac.uk>
Created attachment 144648 [details] [review] Bug 31028: DBIC Schema update Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Helen Oliver <HOliver@tavi-port.ac.uk>
Created attachment 144649 [details] [review] Bug 31028: Add new Koha::Object(s) classes This patch adds new Koha::Object(s) for the newly introduced tables, including updateing existing Koha::Objects adding new relations as required. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Helen Oliver <HOliver@tavi-port.ac.uk>
Created attachment 144650 [details] [review] Bug 31028: Add API's for tickets This patch adds basic CRUD API's for the ticket endpoints. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Helen Oliver <HOliver@tavi-port.ac.uk>
Created attachment 144651 [details] [review] Bug 31028: Add `OpacCatalogConcerns` preference Enabling this preference should allow catalog concerns to be added by logged in patrons on the opac. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Helen Oliver <HOliver@tavi-port.ac.uk>
Created attachment 144652 [details] [review] Bug 31028: Add ability to report catalog concerns from the OPAC This patch adds the ability for patrons to report catalog concerns via the opac. Test plan 1) Enable the new `OpacCatalogConcerns` system preference 2) Navigate to the record details page of a biblio record on the OPAC 3) You should see a new 'Report a concern' option in the right side actions box 4) If not logged in you should have the login modal displayed and upon a successful login you should be redirected back to the details page with a new model displayed for entering concern details 5) Submit your concern with a title and details. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Helen Oliver <HOliver@tavi-port.ac.uk>
Created attachment 144653 [details] [review] Bug 31028: Add configurable help text and templates This patch adds configurable help text and a template option to the catalog concern report modal in the OPAC. Test plan 1) Enable `OpacCatalogConcerns` preference 2) Build the CSS for the OPAC 3) Check that there is a 'CatalogConcernHelp' block listed in the HTML Customisations page. 4) On the OPAC navigate to a record and click the 'Report a concern' button. 5) Confirm that the content of 'CatalogConcernHelp' displays beneath the detail entry box and that it displays as expected. 6) Check that there is a 'CatalogConcernTemplate' block listed in the HTML customisations page. 7) On the OPAC 'Report a concern' modal, you should see the content of the 'CatalogConcernTemplate' block pre-filled in the details textarea. Note: There is a caveat to the template.. as textarea can only be used to submit plaintext with this patch and as such the template needs to not utilise the WYSIWYG editor else you will be faced with raw HTML inside your textarea. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Helen Oliver <HOliver@tavi-port.ac.uk>
Created attachment 144654 [details] [review] Bug 31028: Add acknowledgement notice This patch adds an acknowledgement notice that will be sent to the opac user upon submission of a catalog concern report. Test plan 1) Confirm that a new notice template is added to the notices management page. 2) If using a sandbox, check the 'email log' from the management UI to see the resultant notice has been 'sent' Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Helen Oliver <HOliver@tavi-port.ac.uk>
Created attachment 144655 [details] [review] Bug 31028: Add catalog concern management page to staff This patch adds a catalog concern management page to the staff client accessible via the cataloging home page and a new 'Pending catalog concerns' link on the front page. This includes added the requisit ticket_updates api endpoints and notice triggers and templates for notifying patrons of changes to their reported concerns. Test plan 1) Enable the `OpacCatalogConcerns` system preference 2) Catalog concern management is tied to your users ability to edit the catalog, `editcatalogue`. 3) Confirm that you can see 'Catalog concerns' listed on the cataloging home page if you have the `editcatalogue` permission and not if you do not. 4) Add a new concern as an opac user. 5) Confirm that once a concern is present in the system you see a count of 'catalog concerns pending' on the intranet main page if you have the `editcatalogue` permission. 6) Click through either the cataloging home page or pending concerns link on the main page to view the new concerns management page. 7) Confirm the table displays as one would expect. 8) Confirm clicking on details or the concern title exposes a 'details' modal with the option to add an update or resolve the concern. 9) Verify that if selecting 'notify' when updateing or resolving a concern triggers a notice to be sent to the opac user who first reported the issue. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Helen Oliver <HOliver@tavi-port.ac.uk>
Created attachment 144656 [details] [review] Bug 31028: Add email notification of cataloguers on submissions This patch adds an optional cataloger notification to email the cataloging team whenever a new catalog concern is reported. Test plan 1) Enable `OpacCatalogConcerns` 2) Add at least one email address to the new `CatalogerEmails` prefernce (a comma delimited list is also allowed). 3) Confirm that a default template has been added to the Notices management, `TICKET_NOTIFY`. 4) Submit a new concern using the OPAC 5) Confirm that an email is sent to those email addresses listed in CatalogerEmails. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Helen Oliver <HOliver@tavi-port.ac.uk>
Created attachment 144657 [details] [review] Bug 31028: Add ability to report concerns from the staff interface This patch brings the CatalogConcerns feature to the staff client allowing non-cataloguers to report issues with catalog records from the record details page. Test plan 1) Enable the new `CatalogConcerns` system preference 2) Confirm that without the `edit_catalogue` permission your user can submit a catalog concern via `New -> New catalog concern` from the toolbar on a records detail display. 3) Confirm that the right user was recorded as the reporter on the catalog concern management page (You must have logged in again as a user with the `edit_catalogue` permission to see this page. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Helen Oliver <HOliver@tavi-port.ac.uk>
Created attachment 144658 [details] [review] Bug 31028: Add display to details page This patch adds the display of biblio specific concerns to the biblio detail display page. Test plan 1) Enable the feature as in prior patch test plans 2) Add a concern as per prior patch test plans 3) Confirm that a new tab appears at the bottom of the catalog record details display and all functionality from the concern management page is precent. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Helen Oliver <HOliver@tavi-port.ac.uk>
Created attachment 144659 [details] [review] Bug 31028: (follow-up) System preference terminology Capitalise NOTE and swap 'client' for 'interface'. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Helen Oliver <HOliver@tavi-port.ac.uk>
Created attachment 144660 [details] [review] Bug 31028: Only show pending concerns if there are some This patch adds logic to catch when pending_biblio_tickets equals zero. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Helen Oliver <HOliver@tavi-port.ac.uk>
Created attachment 144661 [details] [review] Bug 31028: (follow-up) Rename TICKET_ACKNOWLEDGE TICKET_ACKNOWLEDGEMENT was too long for the database field size, drop the 'MENT' to ensure it fits. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Helen Oliver <HOliver@tavi-port.ac.uk>
Created attachment 144662 [details] [review] Bug 31028: (follow-up) Update notice module codes This patch updates the notice codes from 'catalog' to 'catalogue' to be consistent with the existing codebase. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Helen Oliver <HOliver@tavi-port.ac.uk>
Created attachment 144663 [details] [review] Bug 31028: (follow-up) Consistently style help-block This patch updates the opac and staff modals to set the help-block inside a div instead of a paragraph element allowing for the wysiwyg edited content to display as prescribed. We move the scss inside the fieldset definition to ensure we are specific enough to catch only the intended elements. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Helen Oliver <HOliver@tavi-port.ac.uk>
Created attachment 144664 [details] [review] Bug 31028: Add feedback to the patron on submission This patch adds a success alert box when a patron submits a concern sucessfully. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Helen Oliver <HOliver@tavi-port.ac.uk>
Created attachment 144665 [details] [review] Bug 31028: (follow-up) Fix permissions names Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Helen Oliver <HOliver@tavi-port.ac.uk>
Created attachment 144666 [details] [review] Bug 31028: (follow-up) Add <br> to notices This should resolve the lack of linebreaks in resulting emails Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Helen Oliver <HOliver@tavi-port.ac.uk>
Created attachment 144667 [details] [review] Bug 31028: (follow-up) Fix notices whitespace We we're using [% %] rather than [%- -%] in our the notice template introduced with this patchset. This leads to some interesting rendering results in some email clients. Using the proper whitespace ignoring template markup fixes the situation. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Helen Oliver <HOliver@tavi-port.ac.uk>
Created attachment 144668 [details] [review] Bug 31028: Update patron and biblio includes to remove whitespace These includes used lots of [% %] blocks instead of [%- -%] and as such the produced markup contains superflous spacing. This is OK in the browser, but for some reason does affect rendering in HTML email. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Helen Oliver <HOliver@tavi-port.ac.uk>
Rebased
Created attachment 145542 [details] [review] Bug 31028: (QA follow-up) Fix misc QA issues
Please add unit tests for the new modules and REST APIs!
Nearly there here.. I've rolled the QA fixes into the various commits and added tests for all the new object methods and api's introduced. However.. writing those tests has made me want to do a tiny bit of refactoring.. I'm going to move the notice generation that currently happens inside the API controller into the Koha::Ticket::Update object to match what I did for similar message generation in the Koha::Ticket store method. Once I've done that, I'll also want to enhance/add some additional unit tests to cover those notices and ticket triggers. Hopefully I'll get all that done on Monday and have a fresh patchset to upload... thanks for taking a look already Kyle.. I'll poke again once we're ready for a final review.
Created attachment 146214 [details] [review] Bug 31028: Add `tickets` and `ticket_updates` tables This patch adds the new `tickets` and `ticket_updates` tables for tracking catalog concern tickets. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Helen Oliver <HOliver@tavi-port.ac.uk>
Created attachment 146215 [details] [review] Bug 31028: DBIC Schema update Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Helen Oliver <HOliver@tavi-port.ac.uk>
Created attachment 146216 [details] [review] Bug 31028: Add new Koha::Object(s) classes This patch adds new Koha::Object(s) for the newly introduced tables, including updateing existing Koha::Objects adding new relations as required. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Helen Oliver <HOliver@tavi-port.ac.uk>
Created attachment 146217 [details] [review] Bug 31028: Add API's for tickets This patch adds basic CRUD API's for the ticket endpoints. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Helen Oliver <HOliver@tavi-port.ac.uk>
Created attachment 146218 [details] [review] Bug 31028: Add `OpacCatalogConcerns` preference Enabling this preference should allow catalog concerns to be added by logged in patrons on the opac. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Helen Oliver <HOliver@tavi-port.ac.uk>
Created attachment 146219 [details] [review] Bug 31028: Add ability to report catalog concerns from the OPAC This patch adds the ability for patrons to report catalog concerns via the opac. Test plan 1) Enable the new `OpacCatalogConcerns` system preference 2) Navigate to the record details page of a biblio record on the OPAC 3) You should see a new 'Report a concern' option in the right side actions box 4) If not logged in you should have the login modal displayed and upon a successful login you should be redirected back to the details page with a new model displayed for entering concern details 5) Submit your concern with a title and details. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Helen Oliver <HOliver@tavi-port.ac.uk>
Created attachment 146220 [details] [review] Bug 31028: Add configurable help text and templates This patch adds configurable help text and a template option to the catalog concern report modal in the OPAC. Test plan 1) Enable `OpacCatalogConcerns` preference 2) Build the CSS for the OPAC 3) Check that there is a 'CatalogConcernHelp' block listed in the HTML Customisations page. 4) On the OPAC navigate to a record and click the 'Report a concern' button. 5) Confirm that the content of 'CatalogConcernHelp' displays beneath the detail entry box and that it displays as expected. 6) Check that there is a 'CatalogConcernTemplate' block listed in the HTML customisations page. 7) On the OPAC 'Report a concern' modal, you should see the content of the 'CatalogConcernTemplate' block pre-filled in the details textarea. Note: There is a caveat to the template.. as textarea can only be used to submit plaintext with this patch and as such the template needs to not utilise the WYSIWYG editor else you will be faced with raw HTML inside your textarea. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Helen Oliver <HOliver@tavi-port.ac.uk>
Created attachment 146221 [details] [review] Bug 31028: Add acknowledgement notice This patch adds an acknowledgement notice that will be sent to the opac user upon submission of a catalog concern report. Test plan 1) Confirm that a new notice template is added to the notices management page. 2) If using a sandbox, check the 'email log' from the management UI to see the resultant notice has been 'sent' Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Helen Oliver <HOliver@tavi-port.ac.uk>
Created attachment 146222 [details] [review] Bug 31028: Add catalog concern management page to staff This patch adds a catalog concern management page to the staff client accessible via the cataloging home page and a new 'Pending catalog concerns' link on the front page. This includes added the requisit ticket_updates api endpoints and notice triggers and templates for notifying patrons of changes to their reported concerns. Test plan 1) Enable the `OpacCatalogConcerns` system preference 2) Catalog concern management is tied to your users ability to edit the catalog, `editcatalogue`. 3) Confirm that you can see 'Catalog concerns' listed on the cataloging home page if you have the `editcatalogue` permission and not if you do not. 4) Add a new concern as an opac user. 5) Confirm that once a concern is present in the system you see a count of 'catalog concerns pending' on the intranet main page if you have the `editcatalogue` permission. 6) Click through either the cataloging home page or pending concerns link on the main page to view the new concerns management page. 7) Confirm the table displays as one would expect. 8) Confirm clicking on details or the concern title exposes a 'details' modal with the option to add an update or resolve the concern. 9) Verify that if selecting 'notify' when updateing or resolving a concern triggers a notice to be sent to the opac user who first reported the issue. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Helen Oliver <HOliver@tavi-port.ac.uk>
Created attachment 146223 [details] [review] Bug 31028: Add email notification of cataloguers on submissions This patch adds an optional cataloger notification to email the cataloging team whenever a new catalog concern is reported. Test plan 1) Enable `OpacCatalogConcerns` 2) Add at least one email address to the new `CatalogerEmails` prefernce (a comma delimited list is also allowed). 3) Confirm that a default template has been added to the Notices management, `TICKET_NOTIFY`. 4) Submit a new concern using the OPAC 5) Confirm that an email is sent to those email addresses listed in CatalogerEmails. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Helen Oliver <HOliver@tavi-port.ac.uk>
Created attachment 146224 [details] [review] Bug 31028: Add ability to report concerns from the staff interface This patch brings the CatalogConcerns feature to the staff client allowing non-cataloguers to report issues with catalog records from the record details page. Test plan 1) Enable the new `CatalogConcerns` system preference 2) Confirm that without the `edit_catalogue` permission your user can submit a catalog concern via `New -> New catalog concern` from the toolbar on a records detail display. 3) Confirm that the right user was recorded as the reporter on the catalog concern management page (You must have logged in again as a user with the `edit_catalogue` permission to see this page. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Helen Oliver <HOliver@tavi-port.ac.uk>
Created attachment 146225 [details] [review] Bug 31028: Add display to details page This patch adds the display of biblio specific concerns to the biblio detail display page. Test plan 1) Enable the feature as in prior patch test plans 2) Add a concern as per prior patch test plans 3) Confirm that a new tab appears at the bottom of the catalog record details display and all functionality from the concern management page is precent. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Helen Oliver <HOliver@tavi-port.ac.uk>
Created attachment 146226 [details] [review] Bug 31028: (follow-up) System preference terminology Capitalise NOTE and swap 'client' for 'interface'. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Helen Oliver <HOliver@tavi-port.ac.uk>
Created attachment 146227 [details] [review] Bug 31028: Only show pending concerns if there are some This patch adds logic to catch when pending_biblio_tickets equals zero. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Helen Oliver <HOliver@tavi-port.ac.uk>
Created attachment 146228 [details] [review] Bug 31028: (follow-up) Rename TICKET_ACKNOWLEDGE TICKET_ACKNOWLEDGEMENT was too long for the database field size, drop the 'MENT' to ensure it fits. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Helen Oliver <HOliver@tavi-port.ac.uk>
Created attachment 146229 [details] [review] Bug 31028: (follow-up) Update notice module codes This patch updates the notice codes from 'catalog' to 'catalogue' to be consistent with the existing codebase. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Helen Oliver <HOliver@tavi-port.ac.uk>
Created attachment 146230 [details] [review] Bug 31028: (follow-up) Consistently style help-block This patch updates the opac and staff modals to set the help-block inside a div instead of a paragraph element allowing for the wysiwyg edited content to display as prescribed. We move the scss inside the fieldset definition to ensure we are specific enough to catch only the intended elements. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Helen Oliver <HOliver@tavi-port.ac.uk>
Created attachment 146231 [details] [review] Bug 31028: Add feedback to the patron on submission This patch adds a success alert box when a patron submits a concern sucessfully. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Helen Oliver <HOliver@tavi-port.ac.uk>
Created attachment 146232 [details] [review] Bug 31028: (follow-up) Fix permissions names Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Helen Oliver <HOliver@tavi-port.ac.uk>
Created attachment 146233 [details] [review] Bug 31028: (follow-up) Add <br> to notices This should resolve the lack of linebreaks in resulting emails Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Helen Oliver <HOliver@tavi-port.ac.uk>
Created attachment 146234 [details] [review] Bug 31028: (follow-up) Fix notices whitespace We we're using [% %] rather than [%- -%] in our the notice template introduced with this patchset. This leads to some interesting rendering results in some email clients. Using the proper whitespace ignoring template markup fixes the situation. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Helen Oliver <HOliver@tavi-port.ac.uk>
Created attachment 146235 [details] [review] Bug 31028: Update patron and biblio includes to remove whitespace These includes used lots of [% %] blocks instead of [%- -%] and as such the produced markup contains superflous spacing. This is OK in the browser, but for some reason does affect rendering in HTML email. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Helen Oliver <HOliver@tavi-port.ac.uk>
Created attachment 146236 [details] [review] Bug 31028: Unit tests for ticket create notice triggers This patch adds unit tests for the two notices that can be triggered upon ticket creation.
Created attachment 146237 [details] [review] Bug 31028: Unit tests for ticket update api's This patch adds the missing unit tests for the ticket updates api endpoints.
Back to you Kyle.. I metric tonne of unit tests added.
Created attachment 146238 [details] [review] Bug 31028: Add `tickets` and `ticket_updates` tables This patch adds the new `tickets` and `ticket_updates` tables for tracking catalog concern tickets. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Helen Oliver <HOliver@tavi-port.ac.uk>
Created attachment 146239 [details] [review] Bug 31028: DBIC Schema update Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Helen Oliver <HOliver@tavi-port.ac.uk>
Created attachment 146240 [details] [review] Bug 31028: Add new Koha::Object(s) classes This patch adds new Koha::Object(s) for the newly introduced tables, including updateing existing Koha::Objects adding new relations as required. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Helen Oliver <HOliver@tavi-port.ac.uk>
Created attachment 146241 [details] [review] Bug 31028: Add API's for tickets This patch adds basic CRUD API's for the ticket endpoints. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Helen Oliver <HOliver@tavi-port.ac.uk>
Created attachment 146242 [details] [review] Bug 31028: Add `OpacCatalogConcerns` preference Enabling this preference should allow catalog concerns to be added by logged in patrons on the opac. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Helen Oliver <HOliver@tavi-port.ac.uk>
Created attachment 146243 [details] [review] Bug 31028: Add ability to report catalog concerns from the OPAC This patch adds the ability for patrons to report catalog concerns via the opac. Test plan 1) Enable the new `OpacCatalogConcerns` system preference 2) Navigate to the record details page of a biblio record on the OPAC 3) You should see a new 'Report a concern' option in the right side actions box 4) If not logged in you should have the login modal displayed and upon a successful login you should be redirected back to the details page with a new model displayed for entering concern details 5) Submit your concern with a title and details. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Helen Oliver <HOliver@tavi-port.ac.uk>
Created attachment 146244 [details] [review] Bug 31028: Add configurable help text and templates This patch adds configurable help text and a template option to the catalog concern report modal in the OPAC. Test plan 1) Enable `OpacCatalogConcerns` preference 2) Build the CSS for the OPAC 3) Check that there is a 'CatalogConcernHelp' block listed in the HTML Customisations page. 4) On the OPAC navigate to a record and click the 'Report a concern' button. 5) Confirm that the content of 'CatalogConcernHelp' displays beneath the detail entry box and that it displays as expected. 6) Check that there is a 'CatalogConcernTemplate' block listed in the HTML customisations page. 7) On the OPAC 'Report a concern' modal, you should see the content of the 'CatalogConcernTemplate' block pre-filled in the details textarea. Note: There is a caveat to the template.. as textarea can only be used to submit plaintext with this patch and as such the template needs to not utilise the WYSIWYG editor else you will be faced with raw HTML inside your textarea. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Helen Oliver <HOliver@tavi-port.ac.uk>
Created attachment 146245 [details] [review] Bug 31028: Add acknowledgement notice This patch adds an acknowledgement notice that will be sent to the opac user upon submission of a catalog concern report. Test plan 1) Confirm that a new notice template is added to the notices management page. 2) If using a sandbox, check the 'email log' from the management UI to see the resultant notice has been 'sent' Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Helen Oliver <HOliver@tavi-port.ac.uk>
Created attachment 146246 [details] [review] Bug 31028: Add catalog concern management page to staff This patch adds a catalog concern management page to the staff client accessible via the cataloging home page and a new 'Pending catalog concerns' link on the front page. This includes added the requisit ticket_updates api endpoints and notice triggers and templates for notifying patrons of changes to their reported concerns. Test plan 1) Enable the `OpacCatalogConcerns` system preference 2) Catalog concern management is tied to your users ability to edit the catalog, `editcatalogue`. 3) Confirm that you can see 'Catalog concerns' listed on the cataloging home page if you have the `editcatalogue` permission and not if you do not. 4) Add a new concern as an opac user. 5) Confirm that once a concern is present in the system you see a count of 'catalog concerns pending' on the intranet main page if you have the `editcatalogue` permission. 6) Click through either the cataloging home page or pending concerns link on the main page to view the new concerns management page. 7) Confirm the table displays as one would expect. 8) Confirm clicking on details or the concern title exposes a 'details' modal with the option to add an update or resolve the concern. 9) Verify that if selecting 'notify' when updateing or resolving a concern triggers a notice to be sent to the opac user who first reported the issue. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Helen Oliver <HOliver@tavi-port.ac.uk>
Created attachment 146247 [details] [review] Bug 31028: Add email notification of cataloguers on submissions This patch adds an optional cataloger notification to email the cataloging team whenever a new catalog concern is reported. Test plan 1) Enable `OpacCatalogConcerns` 2) Add at least one email address to the new `CatalogerEmails` prefernce (a comma delimited list is also allowed). 3) Confirm that a default template has been added to the Notices management, `TICKET_NOTIFY`. 4) Submit a new concern using the OPAC 5) Confirm that an email is sent to those email addresses listed in CatalogerEmails. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Helen Oliver <HOliver@tavi-port.ac.uk>
Created attachment 146248 [details] [review] Bug 31028: Add ability to report concerns from the staff interface This patch brings the CatalogConcerns feature to the staff client allowing non-cataloguers to report issues with catalog records from the record details page. Test plan 1) Enable the new `CatalogConcerns` system preference 2) Confirm that without the `edit_catalogue` permission your user can submit a catalog concern via `New -> New catalog concern` from the toolbar on a records detail display. 3) Confirm that the right user was recorded as the reporter on the catalog concern management page (You must have logged in again as a user with the `edit_catalogue` permission to see this page. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Helen Oliver <HOliver@tavi-port.ac.uk>
Created attachment 146249 [details] [review] Bug 31028: Add display to details page This patch adds the display of biblio specific concerns to the biblio detail display page. Test plan 1) Enable the feature as in prior patch test plans 2) Add a concern as per prior patch test plans 3) Confirm that a new tab appears at the bottom of the catalog record details display and all functionality from the concern management page is precent. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Helen Oliver <HOliver@tavi-port.ac.uk>
Created attachment 146250 [details] [review] Bug 31028: (follow-up) System preference terminology Capitalise NOTE and swap 'client' for 'interface'. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Helen Oliver <HOliver@tavi-port.ac.uk>
Created attachment 146251 [details] [review] Bug 31028: Only show pending concerns if there are some This patch adds logic to catch when pending_biblio_tickets equals zero. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Helen Oliver <HOliver@tavi-port.ac.uk>
Created attachment 146252 [details] [review] Bug 31028: (follow-up) Rename TICKET_ACKNOWLEDGE TICKET_ACKNOWLEDGEMENT was too long for the database field size, drop the 'MENT' to ensure it fits. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Helen Oliver <HOliver@tavi-port.ac.uk>
Created attachment 146253 [details] [review] Bug 31028: (follow-up) Update notice module codes This patch updates the notice codes from 'catalog' to 'catalogue' to be consistent with the existing codebase. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Helen Oliver <HOliver@tavi-port.ac.uk>
Created attachment 146254 [details] [review] Bug 31028: (follow-up) Consistently style help-block This patch updates the opac and staff modals to set the help-block inside a div instead of a paragraph element allowing for the wysiwyg edited content to display as prescribed. We move the scss inside the fieldset definition to ensure we are specific enough to catch only the intended elements. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Helen Oliver <HOliver@tavi-port.ac.uk>
Created attachment 146255 [details] [review] Bug 31028: Add feedback to the patron on submission This patch adds a success alert box when a patron submits a concern sucessfully. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Helen Oliver <HOliver@tavi-port.ac.uk>
Created attachment 146256 [details] [review] Bug 31028: (follow-up) Fix permissions names Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Helen Oliver <HOliver@tavi-port.ac.uk>
Created attachment 146257 [details] [review] Bug 31028: (follow-up) Add <br> to notices This should resolve the lack of linebreaks in resulting emails Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Helen Oliver <HOliver@tavi-port.ac.uk>
Created attachment 146258 [details] [review] Bug 31028: (follow-up) Fix notices whitespace We we're using [% %] rather than [%- -%] in our the notice template introduced with this patchset. This leads to some interesting rendering results in some email clients. Using the proper whitespace ignoring template markup fixes the situation. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Helen Oliver <HOliver@tavi-port.ac.uk>
Created attachment 146259 [details] [review] Bug 31028: Update patron and biblio includes to remove whitespace These includes used lots of [% %] blocks instead of [%- -%] and as such the produced markup contains superflous spacing. This is OK in the browser, but for some reason does affect rendering in HTML email. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Helen Oliver <HOliver@tavi-port.ac.uk>
Created attachment 146260 [details] [review] Bug 31028: Unit tests for ticket create notice triggers This patch adds unit tests for the two notices that can be triggered upon ticket creation.
Created attachment 146261 [details] [review] Bug 31028: Unit tests for ticket update api's This patch adds the missing unit tests for the ticket updates api endpoints.
Created attachment 146262 [details] [review] Bug 31028: (follow-up) Mark public as boolean
I'm getting unit test failures for: t/db_dependent/Circulation.t t/db_dependent/Accounts.t t/db_dependent/Auth_with_ldap.t t/db_dependent/Illrequests.t among others. It seems like a good number of the failures are related to notices, and centered around the inclusion of html_helpers.inc in Letters.pm I'm not sure how to remedy these failures, I tried using newline eaters in html_helpers.inc but it proved insufficient.
Created attachment 146697 [details] [review] Bug 31028: (follow-up) Move html_helpers into notices This patch removes the addition of html_helpers out of C4::Letters and into the relevant notice templates where it belongs. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Good catch Kyle.. that's my mistake, I thought I'd already moved that into the notice templates themselves. Back into the queue.
Created attachment 146870 [details] [review] Bug 31028: Add `tickets` and `ticket_updates` tables This patch adds the new `tickets` and `ticket_updates` tables for tracking catalog concern tickets. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Helen Oliver <HOliver@tavi-port.ac.uk> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 146871 [details] [review] Bug 31028: DBIC Schema update Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Helen Oliver <HOliver@tavi-port.ac.uk> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 146872 [details] [review] Bug 31028: Add new Koha::Object(s) classes This patch adds new Koha::Object(s) for the newly introduced tables, including updateing existing Koha::Objects adding new relations as required. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Helen Oliver <HOliver@tavi-port.ac.uk> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 146873 [details] [review] Bug 31028: Add API's for tickets This patch adds basic CRUD API's for the ticket endpoints. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Helen Oliver <HOliver@tavi-port.ac.uk> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 146874 [details] [review] Bug 31028: Add `OpacCatalogConcerns` preference Enabling this preference should allow catalog concerns to be added by logged in patrons on the opac. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Helen Oliver <HOliver@tavi-port.ac.uk> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 146875 [details] [review] Bug 31028: Add ability to report catalog concerns from the OPAC This patch adds the ability for patrons to report catalog concerns via the opac. Test plan 1) Enable the new `OpacCatalogConcerns` system preference 2) Navigate to the record details page of a biblio record on the OPAC 3) You should see a new 'Report a concern' option in the right side actions box 4) If not logged in you should have the login modal displayed and upon a successful login you should be redirected back to the details page with a new model displayed for entering concern details 5) Submit your concern with a title and details. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Helen Oliver <HOliver@tavi-port.ac.uk> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 146876 [details] [review] Bug 31028: Add configurable help text and templates This patch adds configurable help text and a template option to the catalog concern report modal in the OPAC. Test plan 1) Enable `OpacCatalogConcerns` preference 2) Build the CSS for the OPAC 3) Check that there is a 'CatalogConcernHelp' block listed in the HTML Customisations page. 4) On the OPAC navigate to a record and click the 'Report a concern' button. 5) Confirm that the content of 'CatalogConcernHelp' displays beneath the detail entry box and that it displays as expected. 6) Check that there is a 'CatalogConcernTemplate' block listed in the HTML customisations page. 7) On the OPAC 'Report a concern' modal, you should see the content of the 'CatalogConcernTemplate' block pre-filled in the details textarea. Note: There is a caveat to the template.. as textarea can only be used to submit plaintext with this patch and as such the template needs to not utilise the WYSIWYG editor else you will be faced with raw HTML inside your textarea. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Helen Oliver <HOliver@tavi-port.ac.uk> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 146877 [details] [review] Bug 31028: Add acknowledgement notice This patch adds an acknowledgement notice that will be sent to the opac user upon submission of a catalog concern report. Test plan 1) Confirm that a new notice template is added to the notices management page. 2) If using a sandbox, check the 'email log' from the management UI to see the resultant notice has been 'sent' Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Helen Oliver <HOliver@tavi-port.ac.uk> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 146878 [details] [review] Bug 31028: Add catalog concern management page to staff This patch adds a catalog concern management page to the staff client accessible via the cataloging home page and a new 'Pending catalog concerns' link on the front page. This includes added the requisit ticket_updates api endpoints and notice triggers and templates for notifying patrons of changes to their reported concerns. Test plan 1) Enable the `OpacCatalogConcerns` system preference 2) Catalog concern management is tied to your users ability to edit the catalog, `editcatalogue`. 3) Confirm that you can see 'Catalog concerns' listed on the cataloging home page if you have the `editcatalogue` permission and not if you do not. 4) Add a new concern as an opac user. 5) Confirm that once a concern is present in the system you see a count of 'catalog concerns pending' on the intranet main page if you have the `editcatalogue` permission. 6) Click through either the cataloging home page or pending concerns link on the main page to view the new concerns management page. 7) Confirm the table displays as one would expect. 8) Confirm clicking on details or the concern title exposes a 'details' modal with the option to add an update or resolve the concern. 9) Verify that if selecting 'notify' when updateing or resolving a concern triggers a notice to be sent to the opac user who first reported the issue. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Helen Oliver <HOliver@tavi-port.ac.uk> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 146879 [details] [review] Bug 31028: Add email notification of cataloguers on submissions This patch adds an optional cataloger notification to email the cataloging team whenever a new catalog concern is reported. Test plan 1) Enable `OpacCatalogConcerns` 2) Add at least one email address to the new `CatalogerEmails` prefernce (a comma delimited list is also allowed). 3) Confirm that a default template has been added to the Notices management, `TICKET_NOTIFY`. 4) Submit a new concern using the OPAC 5) Confirm that an email is sent to those email addresses listed in CatalogerEmails. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Helen Oliver <HOliver@tavi-port.ac.uk> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 146880 [details] [review] Bug 31028: Add ability to report concerns from the staff interface This patch brings the CatalogConcerns feature to the staff client allowing non-cataloguers to report issues with catalog records from the record details page. Test plan 1) Enable the new `CatalogConcerns` system preference 2) Confirm that without the `edit_catalogue` permission your user can submit a catalog concern via `New -> New catalog concern` from the toolbar on a records detail display. 3) Confirm that the right user was recorded as the reporter on the catalog concern management page (You must have logged in again as a user with the `edit_catalogue` permission to see this page. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Helen Oliver <HOliver@tavi-port.ac.uk> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 146881 [details] [review] Bug 31028: Add display to details page This patch adds the display of biblio specific concerns to the biblio detail display page. Test plan 1) Enable the feature as in prior patch test plans 2) Add a concern as per prior patch test plans 3) Confirm that a new tab appears at the bottom of the catalog record details display and all functionality from the concern management page is precent. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Helen Oliver <HOliver@tavi-port.ac.uk> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 146882 [details] [review] Bug 31028: (follow-up) System preference terminology Capitalise NOTE and swap 'client' for 'interface'. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Helen Oliver <HOliver@tavi-port.ac.uk> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 146883 [details] [review] Bug 31028: Only show pending concerns if there are some This patch adds logic to catch when pending_biblio_tickets equals zero. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Helen Oliver <HOliver@tavi-port.ac.uk> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 146884 [details] [review] Bug 31028: (follow-up) Rename TICKET_ACKNOWLEDGE TICKET_ACKNOWLEDGEMENT was too long for the database field size, drop the 'MENT' to ensure it fits. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Helen Oliver <HOliver@tavi-port.ac.uk> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 146885 [details] [review] Bug 31028: (follow-up) Update notice module codes This patch updates the notice codes from 'catalog' to 'catalogue' to be consistent with the existing codebase. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Helen Oliver <HOliver@tavi-port.ac.uk> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 146886 [details] [review] Bug 31028: (follow-up) Consistently style help-block This patch updates the opac and staff modals to set the help-block inside a div instead of a paragraph element allowing for the wysiwyg edited content to display as prescribed. We move the scss inside the fieldset definition to ensure we are specific enough to catch only the intended elements. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Helen Oliver <HOliver@tavi-port.ac.uk> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 146887 [details] [review] Bug 31028: Add feedback to the patron on submission This patch adds a success alert box when a patron submits a concern sucessfully. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Helen Oliver <HOliver@tavi-port.ac.uk> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 146888 [details] [review] Bug 31028: (follow-up) Fix permissions names Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Helen Oliver <HOliver@tavi-port.ac.uk> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 146889 [details] [review] Bug 31028: (follow-up) Add <br> to notices This should resolve the lack of linebreaks in resulting emails Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Helen Oliver <HOliver@tavi-port.ac.uk> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 146890 [details] [review] Bug 31028: (follow-up) Fix notices whitespace We we're using [% %] rather than [%- -%] in our the notice template introduced with this patchset. This leads to some interesting rendering results in some email clients. Using the proper whitespace ignoring template markup fixes the situation. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Helen Oliver <HOliver@tavi-port.ac.uk> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 146891 [details] [review] Bug 31028: Update patron and biblio includes to remove whitespace These includes used lots of [% %] blocks instead of [%- -%] and as such the produced markup contains superflous spacing. This is OK in the browser, but for some reason does affect rendering in HTML email. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Helen Oliver <HOliver@tavi-port.ac.uk> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 146892 [details] [review] Bug 31028: Unit tests for ticket create notice triggers This patch adds unit tests for the two notices that can be triggered upon ticket creation. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 146893 [details] [review] Bug 31028: Unit tests for ticket update api's This patch adds the missing unit tests for the ticket updates api endpoints. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 146894 [details] [review] Bug 31028: (follow-up) Mark public as boolean Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 146895 [details] [review] Bug 31028: (follow-up) Move html_helpers into notices This patch removes the addition of html_helpers out of C4::Letters and into the relevant notice templates where it belongs. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 146896 [details] [review] Bug 31028: (QA follow-up) Add koha_object(s)_class methods to TicketUpdate.pm Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Pushed to master for 23.05. Nice work everyone, thanks!
Awesome to see this in, thanks Tomas! As much as I'd love to backport this personally.. it's clearly a whole new feature so marking as 'Needs documentation' and we won't be backporting to 22.11.x series.
Created attachment 147797 [details] Final specification
The notice is generated with a lot of br tags: https://snipboard.io/ku4cOA.jpg Also note the missing space: Thankyou
> Bug 31028: Update patron and biblio includes to remove whitespace Well, now it's missing a whitespace between the surname and firstname: " Modify patron EdnaAcosta (23529001000463) (Patron)"
Failing tests. koha_1 | # Failed test at xt/find-misplaced-executables.t line 54. koha_1 | # got: '2' koha_1 | # expected: '0' koha_1 | # $VAR1 = './t/db_dependent/api/v1/ticket_updates.t'; koha_1 | # $VAR2 = './t/db_dependent/Koha/Ticket.t';
In datatables.js: if ( value === 'special:undefined' ) { That smells! Why don't you simply filter on an invisible column? I think that's how we do in other places.
(In reply to Jonathan Druart from comment #481) > In datatables.js: > if ( value === 'special:undefined' ) { > > That smells! > Why don't you simply filter on an invisible column? I think that's how we do > in other places. Additionally, that does not work: Uncaught TypeError: concerns.DataTable is not a function After I replace "concerns" with "tickets" (which is the correct var name), it still does not work: the table is not filtered.
Created attachment 147840 [details] [review] Bug 31028: (follow-up) Fix missing whitespace on patron-title This patch restores some missing whitespace in the patron-title include.
Created attachment 147841 [details] [review] Bug 31028: (follow-up) Fix executable bit
Two issue fixed in those follow-ups.. As for the special:undefined.. I tried a number of different ways to achieve this and none were any more elegant.. Please explain what you mean by 'filter on an invisible column'... Clearly this has broken with the many rebases I had to do in this area.. before I attempt to fix it as it was I'd like to hear if you have a better approach.
(In reply to Martin Renvoize from comment #485) > Two issue fixed in those follow-ups.. > > As for the special:undefined.. I tried a number of different ways to achieve > this and none were any more elegant.. Please explain what you mean by > 'filter on an invisible column'... > > Clearly this has broken with the many rebases I had to do in this area.. > before I attempt to fix it as it was I'd like to hear if you have a better > approach. Add the info you want to filter on in a separate column, then hide the column and use it for filtering purpose.
(In reply to Jonathan Druart from comment #486) > (In reply to Martin Renvoize from comment #485) > > Two issue fixed in those follow-ups.. > > > > As for the special:undefined.. I tried a number of different ways to achieve > > this and none were any more elegant.. Please explain what you mean by > > 'filter on an invisible column'... > > > > Clearly this has broken with the many rebases I had to do in this area.. > > before I attempt to fix it as it was I'd like to hear if you have a better > > approach. > > Add the info you want to filter on in a separate column, then hide the > column and use it for filtering purpose. The point was I'm looking for a way to pass 'null' to the API so I can get 'WHERE resolved_date IS NULL' in the query.. I'm not sure how a hidden column will achieve that. Having said that.. the client side of this seems to send exactly the same as where I have this live and working for a customer.. so it would appear it's the API that's changed. I do have a minor improvement to my special:undefined fix (for working with multiple fields in a single column.. I didn't spot that until today).. but that doesn't resolve the underlying functionality issue :(
Created attachment 147844 [details] [review] Bug 31028: (follow-up) Ensure special handling works accross fields This patch updates the `special:undefined` handling to work correctly over a datatable column that's made up of multiple database fields.
Created attachment 147859 [details] [review] Bug 31028: (follow-up) Fix missing whitespace on patron-title This patch restores some missing whitespace in the patron-title include. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 147860 [details] [review] Bug 31028: (follow-up) Fix executable bit Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 147861 [details] [review] Bug 31028: (follow-up) Remove special:undefined There's a cleaner way to achieve this now using `additional_filters` and passing a function. This patch removes the `special:undefined` handling, replacing it with a single field filter passed as a function via additional_filters. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Thanks have to go to Jonathan here for helping me understand the issues here. Follow-ups should resolve the issues he raised and lead to cleaner, more accurate, code too.
Created attachment 147866 [details] [review] Bug 31028: (follow-up) Remove special:undefined There's a cleaner way to achieve this now using `additional_filters` and passing a function. This patch removes the `special:undefined` handling, replacing it with a single field filter passed as a function via additional_filters. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Found something else: * The "Add concern" modal has "Please describe your concern: " in red, which implies it's mandatory. However you can submit even if the textarea is empty * When you submit the concern, the tab is not updated and the number of concerns is still 0 "Concerns (0)"
New construct in kohastructure added here: +DROP TABLE IF EXISTS `tickets`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE IF NOT EXISTS `tickets` ( +DROP TABLE IF EXISTS `ticket_updates`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE IF NOT EXISTS `ticket_updates` ( Drop if exists. Create if not. Second check should not be needed..
Created attachment 148673 [details] [review] Bug 31028: (follow-up) Unify table creation This patch updates kohastructure to use the same syntax we use everywhere else.
I finished documenting this, but I see there are some patches that still need to be pushed. I hesitate to put it to "RESOLVED", but I don't have many choices after "Needs documenting" (RESOLVED or CLOSED). Can someone with more permissions maybe put it back to Passed QA or Signed off?
(In reply to Caroline Cyr La Rose from comment #497) > I finished documenting this, but I see there are some patches that still > need to be pushed. I hesitate to put it to "RESOLVED", but I don't have many > choices after "Needs documenting" (RESOLVED or CLOSED). > > Can someone with more permissions maybe put it back to Passed QA or Signed > off? Hi Caroline, it's a workflow thing, not a permission thing. You can only jump to certain status from one status... so you might have to step through some in order to get to where you want to be. - Maybe we could improve this for Needs documenting.
Created attachment 149931 [details] [review] Bug 31028: (follow-up) Unify table creation This patch updates kohastructure to use the same syntax we use everywhere else.
I think it's just the very last patch thats still outstanding on master.. it's just a tidy up so not 100% required, but a nice to have for consistency in our kohastructure file.
The modal only opens on opac-detail, however "Report a concern" is displayed on other pages (opac-isbd, opac-marc, etc.)