Bug 27598 - Add UPLOAD as a built-in system authorized value category
Summary: Add UPLOAD as a built-in system authorized value category
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: System Administration (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-02-02 16:13 UTC by Owen Leonard
Modified: 2021-06-14 21:34 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Text to go in the release notes:
The file upload feature requires that users create an UPLOAD category for authorized values before adding values to that category. This patch adds the UPLOAD category by default so that users don't have to create it.
Version(s) released in:
21.05.00


Attachments
Bug 27598: Add UPLOAD as a built-in system authorized value category (4.05 KB, patch)
2021-02-02 16:58 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 27598: Add UPLOAD as a built-in system authorized value category (4.12 KB, patch)
2021-02-05 18:08 UTC, PTFS Europe Sandboxes
Details | Diff | Splinter Review
Bug 27598: Add UPLOAD as a built-in system authorized value category (4.17 KB, patch)
2021-02-06 22:23 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 27598: (QA follow-up) Add category description and installer data (2.22 KB, patch)
2021-02-08 14:16 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 27598: Add UPLOAD as a built-in system authorized value category (4.23 KB, patch)
2021-02-14 14:46 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 27598: (QA follow-up) Add category description and installer data (2.28 KB, patch)
2021-02-14 14:46 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 Owen Leonard 2021-02-02 16:13:23 UTC
The upload tool directs users to create authorized values with the "UPLOAD" category. It would be helpful to add this as a default category with the "is_system" flag set to 1.

My hope is that this is a first step towards adding some built-in authorized values which have the UPLOAD category such as one for Audio Alerts.
Comment 1 Owen Leonard 2021-02-02 16:58:57 UTC Comment hidden (obsolete)
Comment 2 PTFS Europe Sandboxes 2021-02-05 18:08:28 UTC Comment hidden (obsolete)
Comment 3 Katrin Fischer 2021-02-06 22:23:03 UTC
Created attachment 116447 [details] [review]
Bug 27598: Add UPLOAD as a built-in system authorized value category

This patch updates the database so that it includes an "UPLOAD"
authorized value category with the "is_system" flag set to 1.

The upload tool template is updated to add a link to the authorized
value category from the hint which appears if no authorized values exist
in the UPLOAD category.

To test, apply the patch and run the database update.

- If you have manually added an UPLOAD category it should now be
  classified as a system category.
- If you did not have an UPLOAD category it should have been created for
  you.
- With no authorized values in the UPLOAD category, go to Tools ->
  Upload.
  - Logged in as a user with permission to manage authorized values you
    should see a note, "No upload categories are defined..." It should
    contain a link directly to the UPLOAD category of authorized values.
  - Logged in as a user without authorized value permission you should
    see a similar note without the link.
- Add an authorized value in the UPLOAD category and confirm that the
  note disappears.

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 4 Katrin Fischer 2021-02-06 22:28:31 UTC
This works well for the existing installations, but won't add the value to new installations. 

Can you please also add it to:

https://git.koha-community.org/Koha-community/Koha/src/branch/master/installer/data/mysql/mandatory/auth_val_cat.sql

And write up a short description for the authorised value categories table?
Comment 5 Owen Leonard 2021-02-08 14:16:15 UTC
Created attachment 116502 [details] [review]
Bug 27598: (QA follow-up) Add category description and installer data

This follow-up makes two additions:

- The UPLOAD category is added to auth_val_cat.sql for new
  installations.
- A description of the category is added to the authorized values
  template.
Comment 6 Katrin Fischer 2021-02-14 14:46:38 UTC
Created attachment 116860 [details] [review]
Bug 27598: Add UPLOAD as a built-in system authorized value category

This patch updates the database so that it includes an "UPLOAD"
authorized value category with the "is_system" flag set to 1.

The upload tool template is updated to add a link to the authorized
value category from the hint which appears if no authorized values exist
in the UPLOAD category.

To test, apply the patch and run the database update.

- If you have manually added an UPLOAD category it should now be
  classified as a system category.
- If you did not have an UPLOAD category it should have been created for
  you.
- With no authorized values in the UPLOAD category, go to Tools ->
  Upload.
  - Logged in as a user with permission to manage authorized values you
    should see a note, "No upload categories are defined..." It should
    contain a link directly to the UPLOAD category of authorized values.
  - Logged in as a user without authorized value permission you should
    see a similar note without the link.
- Add an authorized value in the UPLOAD category and confirm that the
  note disappears.

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 7 Katrin Fischer 2021-02-14 14:46:42 UTC
Created attachment 116861 [details] [review]
Bug 27598: (QA follow-up) Add category description and installer data

This follow-up makes two additions:

- The UPLOAD category is added to auth_val_cat.sql for new
  installations.
- A description of the category is added to the authorized values
  template.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 8 Katrin Fischer 2021-02-14 14:47:01 UTC
Thx for the follow-up!
Comment 9 Jonathan Druart 2021-02-15 11:08:36 UTC
Pushed to master for 21.05, thanks to everybody involved!