Bug 35616 - Add a 'source' field to Koha::Tickets to denote the path taken to report the ticket
Summary: Add a 'source' field to Koha::Tickets to denote the path taken to report the ...
Status: Pushed to main
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Martin Renvoize
QA Contact: Victor Grousset/tuxayo
URL:
Keywords:
Depends on: 31028
Blocks: 27105 34324 35615
  Show dependency treegraph
 
Reported: 2023-12-20 14:20 UTC by Martin Renvoize
Modified: 2024-05-07 12:02 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
24.05.00


Attachments
Bug 35616: Add source field to tickets table (1.97 KB, patch)
2023-12-20 14:48 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 35616: DBIC Schema (1.52 KB, patch)
2023-12-20 14:48 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 35616: API specification update (752 bytes, patch)
2023-12-20 14:48 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 35616: Update catalog concerns to set/filter on source (3.11 KB, patch)
2023-12-20 14:57 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 35616: Add source field to tickets table (1.96 KB, patch)
2023-12-20 16:24 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 35616: DBIC Schema (1.52 KB, patch)
2023-12-20 16:24 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 35616: API specification update (752 bytes, patch)
2023-12-20 16:24 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 35616: Update catalog concerns to set/filter on source (3.11 KB, patch)
2023-12-20 16:24 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 35616: Add source field to tickets table (1.96 KB, patch)
2023-12-20 17:23 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 35616: DBIC Schema (1.52 KB, patch)
2023-12-20 17:23 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 35616: API specification update (2.74 KB, patch)
2023-12-20 17:23 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 35616: Update catalog concerns to set/filter on source (3.11 KB, patch)
2023-12-20 17:24 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 35616: Add source field to tickets table (2.01 KB, patch)
2023-12-20 21:07 UTC, David Nind
Details | Diff | Splinter Review
Bug 35616: DBIC Schema (1.56 KB, patch)
2023-12-20 21:07 UTC, David Nind
Details | Diff | Splinter Review
Bug 35616: API specification update (2.78 KB, patch)
2023-12-20 21:07 UTC, David Nind
Details | Diff | Splinter Review
Bug 35616: Update catalog concerns to set/filter on source (3.15 KB, patch)
2023-12-20 21:07 UTC, David Nind
Details | Diff | Splinter Review
Bug 35616: Add source field to tickets table (2.06 KB, patch)
2024-03-20 01:53 UTC, Victor Grousset/tuxayo
Details | Diff | Splinter Review
Bug 35616: DBIC Schema (1.62 KB, patch)
2024-03-20 01:53 UTC, Victor Grousset/tuxayo
Details | Diff | Splinter Review
Bug 35616: API specification update (2.84 KB, patch)
2024-03-20 01:53 UTC, Victor Grousset/tuxayo
Details | Diff | Splinter Review
Bug 35616: Update catalog concerns to set/filter on source (3.21 KB, patch)
2024-03-20 01:53 UTC, Victor Grousset/tuxayo
Details | Diff | Splinter Review
Bug 35616: (QA follow-up): tidy up code and fix exec permission (2.18 KB, patch)
2024-03-20 01:53 UTC, Victor Grousset/tuxayo
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Renvoize 2023-12-20 14:20:02 UTC
This is the foundation for building a more generalised enquiry management option into Koha without losing the existing enquiry starting points.
Comment 1 Martin Renvoize 2023-12-20 14:48:38 UTC
Created attachment 160118 [details] [review]
Bug 35616: Add source field to tickets table
Comment 2 Martin Renvoize 2023-12-20 14:48:40 UTC
Created attachment 160119 [details] [review]
Bug 35616: DBIC Schema
Comment 3 Martin Renvoize 2023-12-20 14:48:43 UTC
Created attachment 160120 [details] [review]
Bug 35616: API specification update
Comment 4 Martin Renvoize 2023-12-20 14:57:19 UTC
Created attachment 160121 [details] [review]
Bug 35616: Update catalog concerns to set/filter on source

This patch updates the catalog concerns feature to respect the new
'source' field in the API.  We both set the source for new ticket
submissions and use it for filtering in the corresponding display
tables.

To test:
1) Nothing should noticably change here.. follow the test plan for bug
   31028 and confirm all continues to work as described there.
Comment 5 Martin Renvoize 2023-12-20 16:24:23 UTC
Created attachment 160127 [details] [review]
Bug 35616: Add source field to tickets table
Comment 6 Martin Renvoize 2023-12-20 16:24:26 UTC
Created attachment 160128 [details] [review]
Bug 35616: DBIC Schema
Comment 7 Martin Renvoize 2023-12-20 16:24:28 UTC
Created attachment 160129 [details] [review]
Bug 35616: API specification update
Comment 8 Martin Renvoize 2023-12-20 16:24:31 UTC
Created attachment 160130 [details] [review]
Bug 35616: Update catalog concerns to set/filter on source

This patch updates the catalog concerns feature to respect the new
'source' field in the API.  We both set the source for new ticket
submissions and use it for filtering in the corresponding display
tables.

To test:
1) Nothing should noticably change here.. follow the test plan for bug
   31028 and confirm all continues to work as described there.
Comment 9 Martin Renvoize 2023-12-20 17:23:53 UTC
Created attachment 160143 [details] [review]
Bug 35616: Add source field to tickets table
Comment 10 Martin Renvoize 2023-12-20 17:23:55 UTC
Created attachment 160144 [details] [review]
Bug 35616: DBIC Schema
Comment 11 Martin Renvoize 2023-12-20 17:23:58 UTC
Created attachment 160145 [details] [review]
Bug 35616: API specification update
Comment 12 Martin Renvoize 2023-12-20 17:24:00 UTC
Created attachment 160146 [details] [review]
Bug 35616: Update catalog concerns to set/filter on source

This patch updates the catalog concerns feature to respect the new
'source' field in the API.  We both set the source for new ticket
submissions and use it for filtering in the corresponding display
tables.

To test:
1) Nothing should noticably change here.. follow the test plan for bug
   31028 and confirm all continues to work as described there.
Comment 13 David Nind 2023-12-20 21:07:28 UTC
Created attachment 160164 [details] [review]
Bug 35616: Add source field to tickets table

Signed-off-by: David Nind <david@davidnind.com>
Comment 14 David Nind 2023-12-20 21:07:31 UTC
Created attachment 160165 [details] [review]
Bug 35616: DBIC Schema

Signed-off-by: David Nind <david@davidnind.com>
Comment 15 David Nind 2023-12-20 21:07:33 UTC
Created attachment 160166 [details] [review]
Bug 35616: API specification update

Signed-off-by: David Nind <david@davidnind.com>
Comment 16 David Nind 2023-12-20 21:07:36 UTC
Created attachment 160167 [details] [review]
Bug 35616: Update catalog concerns to set/filter on source

This patch updates the catalog concerns feature to respect the new
'source' field in the API.  We both set the source for new ticket
submissions and use it for filtering in the corresponding display
tables.

To test:
1) Nothing should noticably change here.. follow the test plan for bug
   31028 and confirm all continues to work as described there.

Signed-off-by: David Nind <david@davidnind.com>
Comment 17 David Nind 2023-12-20 21:11:39 UTC
Everything seems to work as expected - no changes noted.

One thing I noted (not related to this bug) in the OPAC: if you are not logged, once you log in the report a concern the form doesn't include CatalogConcernTemplate text. If you are already logged in, it has the text from the CatalogConcernTemplate.

The test plan I used:

1. Apply patches

2. Update database: updatedatabase

3. Run DBIC: dbic

4. Enable system preferences: OpacCatalogConcerns and CatalogConcerns

5. Report a catalog concern from the OPAC:
   5.1 Search for a record and view the details page
   5.2 Click on the "Report a concern" link in the actions box on the right-hand sidebar (under "Suggest for purchase")
   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 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
   OR
   6.2 Go to Cataloging > Reports > Catalog concerns
   6.3 The concern(s) you entered in the OPAC should be listed
   6.4 Click on "Details" in the actions column
       ==> Ticket details displayed in a modal window
   6.5 Add some text in the update field for the concern, select the Notify checkbox, and click on either the Resolve or Comment buttons.
   6.6 Check that the 'Hide resolve' or 'Show all' toggles work and display concerns raised correctly based on status
   6.7 If Comment clicked, this will continue to be displayed in the list of concerns
   6.8 Check that the filters for each column work as expected
   6.9 Testing notifications - see step 8.2

7. Report a catalog concern from the staff interface:
   7.1 Search for a record and view the details page
   7.2 Select New > New catalog concern
   7.3 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 (assuming you can add, update and resolve tickets using the API if you know how...)
    . 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: 
    . There are four new notice templates: TICKET_ACKNOWLEDGE, TICKET_NOTIFY, TICKET_RESOLVE, TICKET_UPDATE
    . [OPTIONAL] Set up KTD so that email can be sent (using a Gmail address and an app password)
    . [OPTIONAL] Set up a patron with your Gmail email address
    . [OPTIONAL] Setup system preference CatalogerEmails with your Gmail email address
    . Trigger the various notices and make sure they work as expected (should be triggered if you followed the test plan):
      . 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
    . These notices should be viewable under the patron's Notices tab

8.3 Test a non-super librarian and set them up so that they can manage catalog concerns. The minimum permissions are: catalogue (Staff access) and editcatalogue (Edit catalog)
    . Log in as a non-super librarian with the minimum permissions
    . 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:
   . 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
   . [OPTIONAL] Test translation of HTML custizations
Comment 18 Victor Grousset/tuxayo 2024-03-20 01:53:46 UTC
Created attachment 163482 [details] [review]
Bug 35616: Add source field to tickets table

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Comment 19 Victor Grousset/tuxayo 2024-03-20 01:53:48 UTC
Created attachment 163483 [details] [review]
Bug 35616: DBIC Schema

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Comment 20 Victor Grousset/tuxayo 2024-03-20 01:53:51 UTC
Created attachment 163484 [details] [review]
Bug 35616: API specification update

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Comment 21 Victor Grousset/tuxayo 2024-03-20 01:53:54 UTC
Created attachment 163485 [details] [review]
Bug 35616: Update catalog concerns to set/filter on source

This patch updates the catalog concerns feature to respect the new
'source' field in the API.  We both set the source for new ticket
submissions and use it for filtering in the corresponding display
tables.

To test:
1) Nothing should noticably change here.. follow the test plan for bug
   31028 and confirm all continues to work as described there.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Comment 22 Victor Grousset/tuxayo 2024-03-20 01:53:56 UTC
Created attachment 163486 [details] [review]
Bug 35616: (QA follow-up): tidy up code and fix exec permission
Comment 23 Victor Grousset/tuxayo 2024-03-20 01:55:43 UTC
Thanks David for the consolidated test plan in comment 17 / bug 31028 comment 368

Works, makes sense, QA script happy, code looks good, passing QA :)
Comment 24 Katrin Fischer 2024-04-22 07:06:00 UTC
Pushed for 24.05!

Well done everyone, thank you!