Bug 31374 - Add a non-public note column to the suggestions table
Summary: Add a non-public note column to the suggestions table
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Acquisitions (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Lucas Gass
QA Contact: Katrin Fischer
URL:
Keywords:
: 23134 (view as bug list)
Depends on:
Blocks:
 
Reported: 2022-08-16 20:16 UTC by Lucas Gass
Modified: 2023-10-05 16:11 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Medium patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
This enhancement adds a non-public notes field to the suggestions tables in the staff interface. It is displayed by default in the suggestion management tables, and is configurable using the table settings.
Version(s) released in:
22.11.00


Attachments
Bug 31374: Database/Schema update (3.20 KB, patch)
2022-08-16 20:41 UTC, Lucas Gass
Details | Diff | Splinter Review
Bug 31374: Add non-public note to template (3.06 KB, patch)
2022-08-16 20:47 UTC, Lucas Gass
Details | Diff | Splinter Review
Bug 31374: Add privatenote column to table settings (748 bytes, patch)
2022-08-16 20:51 UTC, Lucas Gass
Details | Diff | Splinter Review
Bug 31374: Update API spec (806 bytes, patch)
2022-08-16 20:56 UTC, Lucas Gass
Details | Diff | Splinter Review
Bug 31374: Update Suggestion.pm (1.63 KB, patch)
2022-08-19 16:22 UTC, Lucas Gass
Details | Diff | Splinter Review
Bug 31374: Database/Schema update (3.25 KB, patch)
2022-08-20 00:00 UTC, David Nind
Details | Diff | Splinter Review
Bug 31374: Add non-public note to template (3.10 KB, patch)
2022-08-20 00:00 UTC, David Nind
Details | Diff | Splinter Review
Bug 31374: Add privatenote column to table settings (796 bytes, patch)
2022-08-20 00:00 UTC, David Nind
Details | Diff | Splinter Review
Bug 31374: Update API spec (854 bytes, patch)
2022-08-20 00:00 UTC, David Nind
Details | Diff | Splinter Review
Bug 31374: Update Suggestion.pm (1.67 KB, patch)
2022-08-20 00:00 UTC, David Nind
Details | Diff | Splinter Review
Bug 31374: (follow-up) change private note to staff_note and reorder columns (8.75 KB, patch)
2022-08-22 22:22 UTC, Lucas Gass
Details | Diff | Splinter Review
Bug 31374: Database/Schema update (3.31 KB, patch)
2022-08-27 14:51 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 31374: Add non-public note to template (3.16 KB, patch)
2022-08-27 14:51 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 31374: Add privatenote column to table settings (854 bytes, patch)
2022-08-27 14:51 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 31374: Update API spec (912 bytes, patch)
2022-08-27 14:51 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 31374: Update Suggestion.pm (1.73 KB, patch)
2022-08-27 14:51 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 31374: (follow-up) change private note to staff_note and reorder columns (8.81 KB, patch)
2022-08-27 14:52 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 31374: (QA follow-up) Fix typo collumn in database update (982 bytes, patch)
2022-08-27 14:52 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Lucas Gass 2022-08-16 20:16:25 UTC
Some libraries would like to have a non-public note field when entering suggestions so they can add suggestion notes that would not be visible to the public.
Comment 1 Lucas Gass 2022-08-16 20:41:47 UTC
Created attachment 139212 [details] [review]
Bug 31374: Database/Schema update
Comment 2 Lucas Gass 2022-08-16 20:47:47 UTC
Created attachment 139213 [details] [review]
Bug 31374: Add non-public note to template
Comment 3 Lucas Gass 2022-08-16 20:51:46 UTC
Created attachment 139214 [details] [review]
Bug 31374: Add privatenote column to table settings
Comment 4 Lucas Gass 2022-08-16 20:56:47 UTC
Created attachment 139216 [details] [review]
Bug 31374: Update API spec
Comment 5 Lucas Gass 2022-08-19 16:22:20 UTC
Created attachment 139508 [details] [review]
Bug 31374: Update Suggestion.pm

To test:
1. Apply patch and restart services
2. Go to Acquistions -> Suggestions -> New Purchase suggestion
3. Notice the new 'Non-public notes:' textarea
4. Make sure you 'Set a patron' so we can later look at the suggestion from the OPAC
5. Make a new suggestion and make sure you add some Non-public notes
6. Back on the 'Suggestions management' page you should see a new column for 'Non-public note'
7. Go to table settings and make sure you can properly hide the column
8. Change the status and make sure it shows up on the table with all statuses (pending, accepted, rejected, etc )
9. Check the API by going to (/api/v1/suggestions). Your suggestion should show up and 'privatenote' should include your non-public note.
10. Log in to the OPAC as the patron we set the suggestion to earlier. You should not see anything related to the non-public note displaying from the OPAC
Comment 6 David Nind 2022-08-20 00:00:13 UTC
Created attachment 139526 [details] [review]
Bug 31374: Database/Schema update

Signed-off-by: David Nind <david@davidnind.com>
Comment 7 David Nind 2022-08-20 00:00:18 UTC
Created attachment 139527 [details] [review]
Bug 31374: Add non-public note to template

Signed-off-by: David Nind <david@davidnind.com>
Comment 8 David Nind 2022-08-20 00:00:23 UTC
Created attachment 139528 [details] [review]
Bug 31374: Add privatenote column to table settings

Signed-off-by: David Nind <david@davidnind.com>
Comment 9 David Nind 2022-08-20 00:00:28 UTC
Created attachment 139529 [details] [review]
Bug 31374: Update API spec

Signed-off-by: David Nind <david@davidnind.com>
Comment 10 David Nind 2022-08-20 00:00:33 UTC
Created attachment 139530 [details] [review]
Bug 31374: Update Suggestion.pm

To test:
1. Apply patch and restart services
2. Go to Acquistions -> Suggestions -> New Purchase suggestion
3. Notice the new 'Non-public notes:' textarea
4. Make sure you 'Set a patron' so we can later look at the suggestion from the OPAC
5. Make a new suggestion and make sure you add some Non-public notes
6. Back on the 'Suggestions management' page you should see a new column for 'Non-public note'
7. Go to table settings and make sure you can properly hide the column
8. Change the status and make sure it shows up on the table with all statuses (pending, accepted, rejected, etc )
9. Check the API by going to (/api/v1/suggestions). Your suggestion should show up and 'privatenote' should include your non-public note.
10. Log in to the OPAC as the patron we set the suggestion to earlier. You should not see anything related to the non-public note displaying from the OPAC

Signed-off-by: David Nind <david@davidnind.com>
Comment 11 David Nind 2022-08-20 00:08:19 UTC
Testing notes (using koha-testing-docker):

- For step 1 in the test plan, run the updatedatabase command as well.
Comment 12 Katrin Fischer 2022-08-20 09:41:10 UTC
Hi Lucas,

could we discuss renaming the database column? It's now: privatenote

We don't use private as a term in any of the other tables or the GUI so I am hesitating to use completely new terminology here.

What about: staff_note? If I see correctly we already have some of those in kohastructure.sql 

git grep note *.sql


The second thing is me wondering if we should keep the status as the last column of the table, moving the new column forward by one. ... happy to hear your thoughts about that one!

Otherwise this works really well!
Comment 13 Lucas Gass 2022-08-22 14:53:28 UTC
Cait,

Thanks for looking at this one. I was unsure when I named the DB column privatenote, I am happy to change it to 'staff_note'.

As for the order of where the column lives, I sort of arbitrarily put it where I put it. I will move it to be right before 'Status'?
Comment 14 Lucas Gass 2022-08-22 22:22:19 UTC
Created attachment 139627 [details] [review]
Bug 31374: (follow-up) change private note to staff_note and reorder columns
Comment 15 Lucas Gass 2022-08-26 13:57:59 UTC
Since I only changed the column names I am keeping David's sign-off and setting this one to 'Signed-off'.
Comment 16 Katrin Fischer 2022-08-27 14:51:38 UTC
Created attachment 139858 [details] [review]
Bug 31374: Database/Schema update

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 17 Katrin Fischer 2022-08-27 14:51:42 UTC
Created attachment 139859 [details] [review]
Bug 31374: Add non-public note to template

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 18 Katrin Fischer 2022-08-27 14:51:47 UTC
Created attachment 139860 [details] [review]
Bug 31374: Add privatenote column to table settings

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 19 Katrin Fischer 2022-08-27 14:51:52 UTC
Created attachment 139861 [details] [review]
Bug 31374: Update API spec

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 20 Katrin Fischer 2022-08-27 14:51:56 UTC
Created attachment 139862 [details] [review]
Bug 31374: Update Suggestion.pm

To test:
1. Apply patch and restart services
2. Go to Acquistions -> Suggestions -> New Purchase suggestion
3. Notice the new 'Non-public notes:' textarea
4. Make sure you 'Set a patron' so we can later look at the suggestion from the OPAC
5. Make a new suggestion and make sure you add some Non-public notes
6. Back on the 'Suggestions management' page you should see a new column for 'Non-public note'
7. Go to table settings and make sure you can properly hide the column
8. Change the status and make sure it shows up on the table with all statuses (pending, accepted, rejected, etc )
9. Check the API by going to (/api/v1/suggestions). Your suggestion should show up and 'privatenote' should include your non-public note.
10. Log in to the OPAC as the patron we set the suggestion to earlier. You should not see anything related to the non-public note displaying from the OPAC

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 21 Katrin Fischer 2022-08-27 14:52:00 UTC
Created attachment 139863 [details] [review]
Bug 31374: (follow-up) change private note to staff_note and reorder columns

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 22 Katrin Fischer 2022-08-27 14:52:06 UTC
Created attachment 139864 [details] [review]
Bug 31374: (QA follow-up) Fix typo collumn in database update

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 23 Tomás Cohen Arazi 2022-09-07 20:46:18 UTC
Pushed to master for 22.11.

Nice work everyone, thanks!
Comment 24 Lucas Gass 2022-10-31 19:44:57 UTC
Enhancement will not be backported to the 22.05.x series
Comment 25 Katrin Fischer 2023-10-05 16:11:38 UTC
*** Bug 23134 has been marked as a duplicate of this bug. ***