Bug 31289 - Hide Article requests column in circulation rules when ArticleRequests syspref is disabled
Summary: Hide Article requests column in circulation rules when ArticleRequests syspre...
Status: Pushed to master
Alias: None
Product: Koha
Classification: Unclassified
Component: System Administration (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Caroline Cyr La Rose
QA Contact: Katrin Fischer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-08-03 13:42 UTC by Caroline Cyr La Rose
Modified: 2022-08-05 17:55 UTC (History)
2 users (show)

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


Attachments
Bug 31289: Hide Article requests column in circulation rules when ArticleRequests syspref is disabled (4.15 KB, patch)
2022-08-03 13:59 UTC, Caroline Cyr La Rose
Details | Diff | Splinter Review
Bug 31289: Hide Article requests column in circulation rules when ArticleRequests syspref is disabled (4.20 KB, patch)
2022-08-03 15:29 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 31289: Hide Article requests column in circulation rules when ArticleRequests syspref is disabled (4.25 KB, patch)
2022-08-05 12:35 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 Caroline Cyr La Rose 2022-08-03 13:42:50 UTC
Hi!

Some rules are hidden when a syspref is disabled (like the rules for recalls, and the article request fee and limit of open article requests), but even if the ArticleRequests system preference is disabled, there is still an "Article requests" column in the big circulation rules matrix.
Like the recalls rules and the other article requests rules, this column should be hidden if the system preference is disabled.

To reproduce:
1) With ArticleRequests disabled, go to Administration > Circulation and fines rules
2) Scroll right in the first table
--> There should be an article requests yes/no column (this should be hidden)
3) Scroll down to see the other tables in the page
--> There are no other article requests tables (this is ok)
4) Enable ArticleRequests in Administration > System preferences
5) Go back to the Circulation and fines rules and refresh the page
6) 2) Scroll right in the first table
--> There should be an article requests yes/no column (this is ok)
7) Scroll down to see the other tables in the page
--> There are other article requests tables, Default open article requests limit and Default article request fees (this is ok)

At step 2, users don't need to see the Article request column since the system preference is disabled.
Comment 1 Caroline Cyr La Rose 2022-08-03 13:59:00 UTC
Created attachment 138541 [details] [review]
Bug 31289: Hide Article requests column in circulation rules when ArticleRequests syspref is disabled

This patch hides the Article requests column in the large circulation
rules table when the ArticleRequests system preference is disabled.

To test:
0) Apply patch
1) With ArticleRequests disabled, go to Administration > Circulation and fines
   rules
2) Scroll right in the first table
--> There isn't any mention of article requests in the table
3) Scroll down to see the other tables in the page
--> There are no other article requests tables
4) Enable ArticleRequests in Administration > System preferences
5) Go back to the Circulation and fines rules and refresh the page
6) Scroll right in the first table
--> There should be an article requests yes/no column
7) Scroll down to see the other tables in the page
--> There are other article requests tables, Default open article requests
    limit and Default article request fees
Comment 2 Caroline Cyr La Rose 2022-08-03 14:00:28 UTC
I did some copy-pasting from the UseRecalls mentions in smart-rules.tt... I hope it's ok
Comment 3 Owen Leonard 2022-08-03 15:29:15 UTC
Created attachment 138544 [details] [review]
Bug 31289: Hide Article requests column in circulation rules when ArticleRequests syspref is disabled

This patch hides the Article requests column in the large circulation
rules table when the ArticleRequests system preference is disabled.

To test:
0) Apply patch
1) With ArticleRequests disabled, go to Administration > Circulation and fines
   rules
2) Scroll right in the first table
--> There isn't any mention of article requests in the table
3) Scroll down to see the other tables in the page
--> There are no other article requests tables
4) Enable ArticleRequests in Administration > System preferences
5) Go back to the Circulation and fines rules and refresh the page
6) Scroll right in the first table
--> There should be an article requests yes/no column
7) Scroll down to see the other tables in the page
--> There are other article requests tables, Default open article requests
    limit and Default article request fees

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 4 Katrin Fischer 2022-08-05 11:03:46 UTC
Please don't forget to set Assignee! :)
Comment 5 Katrin Fischer 2022-08-05 12:35:44 UTC
Created attachment 138688 [details] [review]
Bug 31289: Hide Article requests column in circulation rules when ArticleRequests syspref is disabled

This patch hides the Article requests column in the large circulation
rules table when the ArticleRequests system preference is disabled.

To test:
0) Apply patch
1) With ArticleRequests disabled, go to Administration > Circulation and fines
   rules
2) Scroll right in the first table
--> There isn't any mention of article requests in the table
3) Scroll down to see the other tables in the page
--> There are no other article requests tables
4) Enable ArticleRequests in Administration > System preferences
5) Go back to the Circulation and fines rules and refresh the page
6) Scroll right in the first table
--> There should be an article requests yes/no column
7) Scroll down to see the other tables in the page
--> There are other article requests tables, Default open article requests
    limit and Default article request fees

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Comment 6 Katrin Fischer 2022-08-05 12:37:44 UTC
This makes things more consistent and simplifies for those not using Article requests, so I am going to pass it.

There might be some discussion to be had if it makes sense to be able to configure a feature without having it exposed to users immediately. But that's complicated and should probably be a general decision (maybe something like having 3 options for the prefs? (Enable config|Enable feature|Disable)
Comment 7 Tomás Cohen Arazi 2022-08-05 14:58:37 UTC
(In reply to Katrin Fischer from comment #6)
> This makes things more consistent and simplifies for those not using Article
> requests, so I am going to pass it.
> 
> There might be some discussion to be had if it makes sense to be able to
> configure a feature without having it exposed to users immediately. But
> that's complicated and should probably be a general decision (maybe
> something like having 3 options for the prefs? (Enable config|Enable
> feature|Disable)

With the new table (circulation_rules) and the granularity it provides, I think we should move article requests-specific rules to their own section, and probably collapse them by default if the feature is disabled, but editable. For the same reasons you mentioned.
Comment 8 Katrin Fischer 2022-08-05 15:14:55 UTC
Article request is only one column - so I think we should not start the discussion here. Having separate for all suspension/fine, holds, recalls etc. would certainly make sense, but this is a small enhancement that fits the current pattern well.

The other is reopening the discussion on a new editor for circulation rules, which is needed, but out of scope.
Comment 9 Tomás Cohen Arazi 2022-08-05 17:55:16 UTC
Pushed to master for 22.11.

Nice work everyone, thanks!