Bug 31294 - Article requests: Mandatory subfields in OPAC don't show they are required
Summary: Article requests: Mandatory subfields in OPAC don't show they are required
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: David Cook
QA Contact: Katrin Fischer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-08-05 09:46 UTC by Katrin Fischer
Modified: 2022-10-23 09:55 UTC (History)
3 users (show)

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


Attachments
Bug 31294: Show "Required" label on mandatory fields (5.93 KB, patch)
2022-08-11 05:41 UTC, David Cook
Details | Diff | Splinter Review
Bug 31294: Show "Required" label on mandatory fields (5.99 KB, patch)
2022-08-11 14:35 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 31294: Show "Required" label on mandatory fields (6.05 KB, patch)
2022-08-12 13:51 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 Katrin Fischer 2022-08-05 09:46:45 UTC
There are 3 system preference to mark fields mandatory in the article request form for different use cases: ArticleRequestsMandatory*

If you set fields to mandatory, they will trigger a message on saving, but they are missing the visible markup so you can tell right away that they are mandatory.
Comment 1 David Cook 2022-08-11 05:41:46 UTC
Created attachment 139013 [details] [review]
Bug 31294: Show "Required" label on mandatory fields

This patch adds "Required" label on mandatory fields for Article Requests

0. Apply the patch
1. koha-plack --restart kohadev
2. Change syspref 'ArticleRequests' to 'Enable'
3. Change syspref 'ArticleRequestsMandatoryFields' to '[Select all]'
4. Go to http://localhost:8080/cgi-bin/koha/opac-search.pl?idx=&q=test&weight_search=1
5. Click "Request article" for "Gairm"
6. Note that "Title", "Author", "Volume", "Issue", "Date", "Pages", and "Chapters" all say required
7. Change syspref 'ArticleRequestsMandatoryFields' to 'Title' and 'Author'
8. Go to http://localhost:8080/cgi-bin/koha/opac-request-article.pl?biblionumber=29
9. Note that only "Title" and "Author" say required
Comment 2 Owen Leonard 2022-08-11 14:35:40 UTC
Created attachment 139023 [details] [review]
Bug 31294: Show "Required" label on mandatory fields

This patch adds "Required" label on mandatory fields for Article Requests

0. Apply the patch
1. koha-plack --restart kohadev
2. Change syspref 'ArticleRequests' to 'Enable'
3. Change syspref 'ArticleRequestsMandatoryFields' to '[Select all]'
4. Go to http://localhost:8080/cgi-bin/koha/opac-search.pl?idx=&q=test&weight_search=1
5. Click "Request article" for "Gairm"
6. Note that "Title", "Author", "Volume", "Issue", "Date", "Pages", and
   "Chapters" all say required
7. Change syspref 'ArticleRequestsMandatoryFields' to 'Title' and
   'Author'
8. Go to http://localhost:8080/cgi-bin/koha/opac-request-article.pl?biblionumber=29
9. Note that only "Title" and "Author" say required

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 3 Katrin Fischer 2022-08-12 13:51:36 UTC
Created attachment 139055 [details] [review]
Bug 31294: Show "Required" label on mandatory fields

This patch adds "Required" label on mandatory fields for Article Requests

0. Apply the patch
1. koha-plack --restart kohadev
2. Change syspref 'ArticleRequests' to 'Enable'
3. Change syspref 'ArticleRequestsMandatoryFields' to '[Select all]'
4. Go to http://localhost:8080/cgi-bin/koha/opac-search.pl?idx=&q=test&weight_search=1
5. Click "Request article" for "Gairm"
6. Note that "Title", "Author", "Volume", "Issue", "Date", "Pages", and
   "Chapters" all say required
7. Change syspref 'ArticleRequestsMandatoryFields' to 'Title' and
   'Author'
8. Go to http://localhost:8080/cgi-bin/koha/opac-request-article.pl?biblionumber=29
9. Note that only "Title" and "Author" say required

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

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
Comment 4 Tomás Cohen Arazi 2022-08-16 18:32:28 UTC
Pushed to master for 22.11.

Nice work everyone, thanks!
Comment 5 Lucas Gass 2022-10-03 22:17:52 UTC
Backported to 22.05.x for 22.05.06
Comment 6 Victor Grousset/tuxayo 2022-10-16 21:13:53 UTC
Not backported to oldoldstable (21.05.x). Feel free to ask if it's needed.

Nothing to document it seems, marking resolved.
Comment 7 Arthur Suzuki 2022-10-22 22:09:55 UTC
Thanks!

Pushed to 21.11 for 21.11.12