Bug 27634 - Turn off patron self-registration if no default category is set
Summary: Turn off patron self-registration if no default category is set
Status: Pushed to master
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
: 17987 (view as bug list)
Depends on: 27626 27650
Blocks:
  Show dependency treegraph
 
Reported: 2021-02-05 10:19 UTC by Jonathan Druart
Modified: 2023-10-05 18:19 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Medium patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
When there is no valid patron category defined in system preference PatronSelfRegistrationDefaultCategory the full feature is disabled.
Version(s) released in:
23.11.00


Attachments
Bug 27634: Turn off patron self-registration if no default category is set (3.60 KB, patch)
2021-02-05 10:47 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 27634: Force include categorycode to PatronSelfRegistrationBorrowerUnwantedField (1.26 KB, patch)
2021-02-05 10:47 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 27634: Add the ability to exclude fields from "modal" sysprefs (4.04 KB, patch)
2021-02-05 10:47 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 27634: Force include of dateexpiry (1.22 KB, patch)
2021-02-05 10:47 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 27634: Add a warning to the about page if PatronSelfRegistrationDefaultCategory not set (5.62 KB, patch)
2021-02-05 10:47 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 27634: Update PatronSelfRegistrationBorrowerUnwantedField's value (1.44 KB, patch)
2021-02-05 10:47 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 27634: Fix Link on the OPAC main page (2.40 KB, patch)
2021-02-08 10:32 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 27634: Turn off patron self-registration if no default category is set (3.65 KB, patch)
2023-01-24 10:54 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 27634: Force include categorycode to PatronSelfRegistrationBorrowerUnwantedField (1.29 KB, patch)
2023-01-24 10:54 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 27634: Add the ability to exclude fields from "modal" sysprefs (4.15 KB, patch)
2023-01-24 10:54 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 27634: Force include of dateexpiry (1.25 KB, patch)
2023-01-24 10:54 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 27634: Add a warning to the about page if PatronSelfRegistrationDefaultCategory not set (5.86 KB, patch)
2023-01-24 10:54 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 27634: Update PatronSelfRegistrationBorrowerUnwantedField's value (1.44 KB, patch)
2023-01-24 10:55 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 27634: Fix Link on the OPAC main page (2.44 KB, patch)
2023-01-24 10:55 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 27634: Hide "Register here" links (3.74 KB, patch)
2023-02-01 09:25 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 27634: Turn off patron self-registration if no default category is set (3.65 KB, patch)
2023-03-01 07:15 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 27634: Force include categorycode to PatronSelfRegistrationBorrowerUnwantedField (1.30 KB, patch)
2023-03-01 07:15 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 27634: Add the ability to exclude fields from "modal" sysprefs (4.15 KB, patch)
2023-03-01 07:15 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 27634: Force include of dateexpiry (1.26 KB, patch)
2023-03-01 07:15 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 27634: Add a warning to the about page if PatronSelfRegistrationDefaultCategory not set (6.23 KB, patch)
2023-03-01 07:15 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 27634: Update PatronSelfRegistrationBorrowerUnwantedField's value (1.44 KB, patch)
2023-03-01 07:15 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 27634: Hide "Register here" links (3.74 KB, patch)
2023-03-01 07:15 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 27634: Add a warning to the about page if PatronSelfRegistrationDefaultCategory not set (6.36 KB, patch)
2023-04-17 12:21 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 27634: Update PatronSelfRegistrationBorrowerUnwantedField's value (1.44 KB, patch)
2023-04-17 12:21 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 27634: Hide "Register here" links (3.74 KB, patch)
2023-04-17 12:21 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 27634: Turn off patron self-registration if no default category is set (3.70 KB, patch)
2023-04-19 16:40 UTC, David Nind
Details | Diff | Splinter Review
Bug 27634: Force include categorycode to PatronSelfRegistrationBorrowerUnwantedField (1.35 KB, patch)
2023-04-19 16:40 UTC, David Nind
Details | Diff | Splinter Review
Bug 27634: Add the ability to exclude fields from "modal" sysprefs (4.20 KB, patch)
2023-04-19 16:40 UTC, David Nind
Details | Diff | Splinter Review
Bug 27634: Force include of dateexpiry (1.30 KB, patch)
2023-04-19 16:40 UTC, David Nind
Details | Diff | Splinter Review
Bug 27634: Add a warning to the about page if PatronSelfRegistrationDefaultCategory not set (6.40 KB, patch)
2023-04-19 16:40 UTC, David Nind
Details | Diff | Splinter Review
Bug 27634: Update PatronSelfRegistrationBorrowerUnwantedField's value (1.49 KB, patch)
2023-04-19 16:40 UTC, David Nind
Details | Diff | Splinter Review
Bug 27634: Hide "Register here" links (3.78 KB, patch)
2023-04-19 16:40 UTC, David Nind
Details | Diff | Splinter Review
Bug 27634: Turn off patron self-registration if no default category is set (3.75 KB, patch)
2023-04-22 20:12 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 27634: Force include categorycode to PatronSelfRegistrationBorrowerUnwantedField (1.40 KB, patch)
2023-04-22 20:12 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 27634: Add the ability to exclude fields from "modal" sysprefs (4.25 KB, patch)
2023-04-22 20:12 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 27634: Force include of dateexpiry (1.36 KB, patch)
2023-04-22 20:13 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 27634: Add a warning to the about page if PatronSelfRegistrationDefaultCategory not set (6.46 KB, patch)
2023-04-22 20:13 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 27634: Update PatronSelfRegistrationBorrowerUnwantedField's value (1.54 KB, patch)
2023-04-22 20:13 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 27634: Hide "Register here" links (3.83 KB, patch)
2023-04-22 20:13 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 27634: (QA follow-up) Add punctuation to message on About page (2.77 KB, patch)
2023-04-22 20:13 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 27634: Add a warning to the about page if PatronSelfRegistrationDefaultCategory not set (6.43 KB, patch)
2023-05-11 07:34 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 27634: Update PatronSelfRegistrationBorrowerUnwantedField's value (1.54 KB, patch)
2023-05-11 07:34 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 27634: Hide "Register here" links (3.84 KB, patch)
2023-05-11 07:34 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 27634: (QA follow-up) Add punctuation to message on About page (2.78 KB, patch)
2023-05-11 07:34 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 27634: Turn off patron self-registration if no default category is set (3.76 KB, patch)
2023-09-18 21:07 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 27634: Force include categorycode to PatronSelfRegistrationBorrowerUnwantedField (1.40 KB, patch)
2023-09-18 21:07 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 27634: Add the ability to exclude fields from "modal" sysprefs (4.26 KB, patch)
2023-09-18 21:07 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 27634: Force include of dateexpiry (1.36 KB, patch)
2023-09-18 21:08 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 27634: Add a warning to the about page if PatronSelfRegistrationDefaultCategory not set (6.43 KB, patch)
2023-09-18 21:08 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 27634: Update PatronSelfRegistrationBorrowerUnwantedField's value (1.54 KB, patch)
2023-09-18 21:08 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 27634: Hide "Register here" links (3.84 KB, patch)
2023-09-18 21:08 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 27634: (QA follow-up) Add punctuation to message on About page (2.78 KB, patch)
2023-09-18 21:08 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 27634: Fix self_registration.t (2.28 KB, patch)
2023-09-26 09:36 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Druart 2021-02-05 10:19:31 UTC
If there is no default category defined in PatronSelfRegistrationDefaultCategory the full feature must be displayed.

We already hide the link from the OPAC main page, but the form is still accessible.
Comment 1 Jonathan Druart 2021-02-05 10:47:27 UTC
Created attachment 116378 [details] [review]
Bug 27634: Turn off patron self-registration if no default category is set

If there is no default category defined in PatronSelfRegistrationDefaultCategory the full feature must be displayed.

We already hide the link from the OPAC main page, but the form is still accessible.

Test plan (for the whole patch set):
1. Turn on PatronSelfRegistration
2. Don't set PatronSelfRegistrationDefaultCategory
3. Go to the OPAC main page and confirm that the "Register here" link is
not displayed
4. Hit opac-memberentry.pl and confirm that you are redirected to the
OPAC main page
5. Go to the about page and confirm that you see a warning in the
"System information" tab
6. Set PatronSelfRegistrationDefaultCategory to an invalid patron's
category
7. Repeat 3, 4, 5
8. Set PatronSelfRegistrationDefaultCategory to a valid patron's
category
9. Self-register a patron and confirm it works as expected
10. Edit PatronSelfRegistrationBorrowerUnwantedField and confirm that
you cannot remove dateexpiry and categorycode
Comment 2 Jonathan Druart 2021-02-05 10:47:30 UTC
Created attachment 116379 [details] [review]
Bug 27634: Force include categorycode to PatronSelfRegistrationBorrowerUnwantedField

We should always use the category defined in
PatronSelfRegistrationDefaultCategory.
This could be discussed however.
Comment 3 Jonathan Druart 2021-02-05 10:47:33 UTC
Created attachment 116380 [details] [review]
Bug 27634: Add the ability to exclude fields from "modal" sysprefs
Comment 4 Jonathan Druart 2021-02-05 10:47:36 UTC
Created attachment 116381 [details] [review]
Bug 27634: Force include of dateexpiry

Otherwise we see a "Date expiry" entry in the form.
Comment 5 Jonathan Druart 2021-02-05 10:47:39 UTC
Created attachment 116382 [details] [review]
Bug 27634: Add a warning to the about page if PatronSelfRegistrationDefaultCategory not set
Comment 6 Jonathan Druart 2021-02-05 10:47:42 UTC
Created attachment 116383 [details] [review]
Bug 27634: Update PatronSelfRegistrationBorrowerUnwantedField's value
Comment 7 David Nind 2021-02-06 04:05:03 UTC
Sorry Jonathan!

For step 7-3, if I set an invalid patron category the registration link is displayed "Don't have an account? Register here.".

Everything else works as per the test plan.

I don't know hard it is to do, but could making a  PatronSelfRegistrationDefaultCategory a drop down list of existing patron category codes remove the problem of invalid patron codes? It may be out of scope for this bug though.

David
Comment 8 Jonathan Druart 2021-02-08 10:32:49 UTC
Created attachment 116491 [details] [review]
Bug 27634: Fix Link on the OPAC main page

Make sure the pref is filled with a valid patron's category to display
the "register" link
Comment 9 Jonathan Druart 2021-02-08 10:33:42 UTC
(In reply to David Nind from comment #7)
> Sorry Jonathan!

No worries, thanks for testing, David!

> For step 7-3, if I set an invalid patron category the registration link is
> displayed "Don't have an account? Register here.".

Fixed!

> I don't know hard it is to do, but could making a 
> PatronSelfRegistrationDefaultCategory a drop down list of existing patron
> category codes remove the problem of invalid patron codes? It may be out of
> scope for this bug though.

That can be done quite easily I think. You should open a new bug report :)
Comment 10 Owen Leonard 2021-02-08 12:37:12 UTC
> > I don't know hard it is to do, but could making a 
> > PatronSelfRegistrationDefaultCategory a drop down list of existing patron
> > category codes remove the problem of invalid patron codes? It may be out of
> > scope for this bug though.
> 
> That can be done quite easily I think. You should open a new bug report :)

Bug 27652
Comment 11 David Nind 2021-02-23 20:03:45 UTC
I was too slow retesting, the patch no longer applies 8-(

...
Applying: Bug 27634: Turn off patron self-registration if no default category is set
error: sha1 information is lacking or useless (opac/opac-memberentry.pl).
error: could not build fake ancestor
Patch failed at 0001 Bug 27634: Turn off patron self-registration if no default category is set
...
Comment 12 Katrin Fischer 2023-01-23 22:57:21 UTC
I have the same issue: 

Apply? [(y)es, (n)o, (i)nteractive] y
Applying: Bug 27634: Turn off patron self-registration if no default category is set
error: sha1 information is lacking or useless (opac/opac-memberentry.pl).
error: could not build fake ancestor
Patch failed at 0001 Bug 27634: Turn off patron self-registration if no default category is set
hint: Use 'git am --show-current-patch=diff' to see the failed patch
When you have resolved this problem run "git bz apply --continue".
If you would prefer to skip this patch, instead run "git bz apply --skip".
To restore the original branch and stop patching run "git bz apply --abort".
Patch left in /tmp/Bug-27634-Turn-off-patron-self-registration-if-no--ILoEWc.patch
Comment 13 Jonathan Druart 2023-01-24 10:54:37 UTC
Created attachment 145599 [details] [review]
Bug 27634: Turn off patron self-registration if no default category is set

If there is no default category defined in PatronSelfRegistrationDefaultCategory the full feature must be displayed.

We already hide the link from the OPAC main page, but the form is still accessible.

Test plan (for the whole patch set):
1. Turn on PatronSelfRegistration
2. Don't set PatronSelfRegistrationDefaultCategory
3. Go to the OPAC main page and confirm that the "Register here" link is
not displayed
4. Hit opac-memberentry.pl and confirm that you are redirected to the
OPAC main page
5. Go to the about page and confirm that you see a warning in the
"System information" tab
6. Set PatronSelfRegistrationDefaultCategory to an invalid patron's
category
7. Repeat 3, 4, 5
8. Set PatronSelfRegistrationDefaultCategory to a valid patron's
category
9. Self-register a patron and confirm it works as expected
10. Edit PatronSelfRegistrationBorrowerUnwantedField and confirm that
you cannot remove dateexpiry and categorycode
Comment 14 Jonathan Druart 2023-01-24 10:54:42 UTC
Created attachment 145600 [details] [review]
Bug 27634: Force include categorycode to PatronSelfRegistrationBorrowerUnwantedField

We should always use the category defined in
PatronSelfRegistrationDefaultCategory.
This could be discussed however.
Comment 15 Jonathan Druart 2023-01-24 10:54:46 UTC
Created attachment 145601 [details] [review]
Bug 27634: Add the ability to exclude fields from "modal" sysprefs
Comment 16 Jonathan Druart 2023-01-24 10:54:52 UTC
Created attachment 145602 [details] [review]
Bug 27634: Force include of dateexpiry

Otherwise we see a "Date expiry" entry in the form.
Comment 17 Jonathan Druart 2023-01-24 10:54:56 UTC
Created attachment 145603 [details] [review]
Bug 27634: Add a warning to the about page if PatronSelfRegistrationDefaultCategory not set
Comment 18 Jonathan Druart 2023-01-24 10:55:02 UTC
Created attachment 145604 [details] [review]
Bug 27634: Update PatronSelfRegistrationBorrowerUnwantedField's value
Comment 19 Jonathan Druart 2023-01-24 10:55:08 UTC
Created attachment 145605 [details] [review]
Bug 27634: Fix Link on the OPAC main page

Make sure the pref is filled with a valid patron's category to display
the "register" link
Comment 20 David Nind 2023-01-24 21:15:58 UTC
I had an issue with:
- Steps 6 and 7: if there is an invalid patron category, there should be no "Register here" link
- Step 10: dateexpiry and categorycode fields

Steps 6 and 7 - if there is an invalid patron category, there should be no "Register here" link
==============

1. PatronSelfRegistrationDefaultCategory is now a dropdown list, so I couldn't set an invalid patron category that way.

2. Instead, I updated in the database: update systempreferences set value="InvalidValue" where variable="PatronSelfRegistrationDefaultCategory";

3. With an invalid patron category, the "Don't have an account? Register here." text still shows when you click on "Log in to your account", although it redirects you to the home page if you click on it.

4. There is a system warning: "System preference 'PatronSelfRegistration' is set but 'PatronSelfRegistrationDefaultCategory' does not contain a valid patron category code. Patron self-registration is disabled."


Step 10 - dateexpiry and categorycode fields
==============

When I first go into PatronSelfRegistrationBorrowerUnwantedField, the dateexpiry and categorycode fields are selectable.

If I select them and save, and then go in again, they are greyed out with a tick and can't be toggled off or on again.


Other testing notes (using KTD)
===============================

1. After applying the patch, run updatedatabase.
Comment 21 Jonathan Druart 2023-02-01 09:25:29 UTC
Created attachment 145922 [details] [review]
Bug 27634: Hide "Register here" links

Make sure the pref is filled with a valid patron's category to display
the "register" link
Comment 22 Jonathan Druart 2023-02-01 09:26:23 UTC
(In reply to David Nind from comment #20)
> I had an issue with:
> - Steps 6 and 7: if there is an invalid patron category, there should be no
> "Register here" link

I dealt with the main page only. The new page is hiding all "register here" links.

> - Step 10: dateexpiry and categorycode fields

I am not sure I understand, what you are describing is the expected behaviour: we want to force categorycode and dateexpiry in PatronSelfRegistrationBorrowerUnwantedField (and so prevent their removal).
Comment 23 Jonathan Druart 2023-02-23 10:20:31 UTC
*** Bug 17987 has been marked as a duplicate of this bug. ***
Comment 24 Jonathan Druart 2023-02-23 10:22:16 UTC
We can get this one moving again please? :)
Comment 25 Jonathan Druart 2023-03-01 07:15:23 UTC
Created attachment 147531 [details] [review]
Bug 27634: Turn off patron self-registration if no default category is set

If there is no default category defined in PatronSelfRegistrationDefaultCategory the full feature must be displayed.

We already hide the link from the OPAC main page, but the form is still accessible.

Test plan (for the whole patch set):
1. Turn on PatronSelfRegistration
2. Don't set PatronSelfRegistrationDefaultCategory
3. Go to the OPAC main page and confirm that the "Register here" link is
not displayed
4. Hit opac-memberentry.pl and confirm that you are redirected to the
OPAC main page
5. Go to the about page and confirm that you see a warning in the
"System information" tab
6. Set PatronSelfRegistrationDefaultCategory to an invalid patron's
category
7. Repeat 3, 4, 5
8. Set PatronSelfRegistrationDefaultCategory to a valid patron's
category
9. Self-register a patron and confirm it works as expected
10. Edit PatronSelfRegistrationBorrowerUnwantedField and confirm that
you cannot remove dateexpiry and categorycode
Comment 26 Jonathan Druart 2023-03-01 07:15:26 UTC
Created attachment 147532 [details] [review]
Bug 27634: Force include categorycode to PatronSelfRegistrationBorrowerUnwantedField

We should always use the category defined in
PatronSelfRegistrationDefaultCategory.
This could be discussed however.
Comment 27 Jonathan Druart 2023-03-01 07:15:29 UTC
Created attachment 147533 [details] [review]
Bug 27634: Add the ability to exclude fields from "modal" sysprefs
Comment 28 Jonathan Druart 2023-03-01 07:15:32 UTC
Created attachment 147534 [details] [review]
Bug 27634: Force include of dateexpiry

Otherwise we see a "Date expiry" entry in the form.
Comment 29 Jonathan Druart 2023-03-01 07:15:36 UTC
Created attachment 147535 [details] [review]
Bug 27634: Add a warning to the about page if PatronSelfRegistrationDefaultCategory not set
Comment 30 Jonathan Druart 2023-03-01 07:15:38 UTC
Created attachment 147536 [details] [review]
Bug 27634: Update PatronSelfRegistrationBorrowerUnwantedField's value
Comment 31 Jonathan Druart 2023-03-01 07:15:41 UTC
Created attachment 147537 [details] [review]
Bug 27634: Hide "Register here" links

Make sure the pref is filled with a valid patron's category to display
the "register" link
Comment 32 David Nind 2023-04-17 00:25:21 UTC
The patches no longer apply 8-(..

git bz apply 27634

Bug 27634 - Turn off patron self-registration if no default category is set

147531 - Bug 27634: Turn off patron self-registration if no default category is set
147532 - Bug 27634: Force include categorycode to PatronSelfRegistrationBorrowerUnwantedField
147533 - Bug 27634: Add the ability to exclude fields from "modal" sysprefs
147534 - Bug 27634: Force include of dateexpiry
147535 - Bug 27634: Add a warning to the about page if PatronSelfRegistrationDefaultCategory not set
147536 - Bug 27634: Update PatronSelfRegistrationBorrowerUnwantedField's value
147537 - Bug 27634: Hide "Register here" links

Apply? [(y)es, (n)o, (i)nteractive] y
Applying: Bug 27634: Turn off patron self-registration if no default category is set
Applying: Bug 27634: Force include categorycode to PatronSelfRegistrationBorrowerUnwantedField
Applying: Bug 27634: Add the ability to exclude fields from "modal" sysprefs
Applying: Bug 27634: Force include of dateexpiry
Applying: Bug 27634: Add a warning to the about page if PatronSelfRegistrationDefaultCategory not set
Using index info to reconstruct a base tree...
M       about.pl
M       koha-tmpl/intranet-tmpl/prog/en/modules/about.tt
Falling back to patching base and 3-way merge...
Auto-merging koha-tmpl/intranet-tmpl/prog/en/modules/about.tt
CONFLICT (content): Merge conflict in koha-tmpl/intranet-tmpl/prog/en/modules/about.tt
Auto-merging about.pl
error: Failed to merge in the changes.
Patch failed at 0001 Bug 27634: Add a warning to the about page if PatronSelfRegistrationDefaultCategory not set
Comment 33 Jonathan Druart 2023-04-17 12:21:51 UTC
Created attachment 149746 [details] [review]
Bug 27634: Add a warning to the about page if PatronSelfRegistrationDefaultCategory not set
Comment 34 Jonathan Druart 2023-04-17 12:21:54 UTC
Created attachment 149747 [details] [review]
Bug 27634: Update PatronSelfRegistrationBorrowerUnwantedField's value
Comment 35 Jonathan Druart 2023-04-17 12:21:57 UTC
Created attachment 149748 [details] [review]
Bug 27634: Hide "Register here" links

Make sure the pref is filled with a valid patron's category to display
the "register" link
Comment 36 David Nind 2023-04-19 16:40:02 UTC
Created attachment 149896 [details] [review]
Bug 27634: Turn off patron self-registration if no default category is set

If there is no default category defined in PatronSelfRegistrationDefaultCategory the full feature must be displayed.

We already hide the link from the OPAC main page, but the form is still accessible.

Test plan (for the whole patch set):
1. Turn on PatronSelfRegistration
2. Don't set PatronSelfRegistrationDefaultCategory
3. Go to the OPAC main page and confirm that the "Register here" link is
not displayed
4. Hit opac-memberentry.pl and confirm that you are redirected to the
OPAC main page
5. Go to the about page and confirm that you see a warning in the
"System information" tab
6. Set PatronSelfRegistrationDefaultCategory to an invalid patron's
category
7. Repeat 3, 4, 5
8. Set PatronSelfRegistrationDefaultCategory to a valid patron's
category
9. Self-register a patron and confirm it works as expected
10. Edit PatronSelfRegistrationBorrowerUnwantedField and confirm that
you cannot remove dateexpiry and categorycode

Signed-off-by: David Nind <david@davidnind.com>
Comment 37 David Nind 2023-04-19 16:40:05 UTC
Created attachment 149897 [details] [review]
Bug 27634: Force include categorycode to PatronSelfRegistrationBorrowerUnwantedField

We should always use the category defined in
PatronSelfRegistrationDefaultCategory.
This could be discussed however.

Signed-off-by: David Nind <david@davidnind.com>
Comment 38 David Nind 2023-04-19 16:40:08 UTC
Created attachment 149898 [details] [review]
Bug 27634: Add the ability to exclude fields from "modal" sysprefs

Signed-off-by: David Nind <david@davidnind.com>
Comment 39 David Nind 2023-04-19 16:40:10 UTC
Created attachment 149899 [details] [review]
Bug 27634: Force include of dateexpiry

Otherwise we see a "Date expiry" entry in the form.

Signed-off-by: David Nind <david@davidnind.com>
Comment 40 David Nind 2023-04-19 16:40:13 UTC
Created attachment 149900 [details] [review]
Bug 27634: Add a warning to the about page if PatronSelfRegistrationDefaultCategory not set

Signed-off-by: David Nind <david@davidnind.com>
Comment 41 David Nind 2023-04-19 16:40:16 UTC
Created attachment 149901 [details] [review]
Bug 27634: Update PatronSelfRegistrationBorrowerUnwantedField's value

Signed-off-by: David Nind <david@davidnind.com>
Comment 42 David Nind 2023-04-19 16:40:19 UTC
Created attachment 149902 [details] [review]
Bug 27634: Hide "Register here" links

Make sure the pref is filled with a valid patron's category to display
the "register" link

Signed-off-by: David Nind <david@davidnind.com>
Comment 43 David Nind 2023-04-19 16:42:23 UTC
Testing notes (using KTD):

1. For step 7, to set an invalid patron category:
   1.1 koha-mysql kohadev
   1.2 SQL query: update systempreferences set value = "INVALID" where variable = "PatronSelfRegistrationDefaultCategory";
Comment 44 Katrin Fischer 2023-04-22 20:12:49 UTC
Created attachment 150083 [details] [review]
Bug 27634: Turn off patron self-registration if no default category is set

If there is no default category defined in PatronSelfRegistrationDefaultCategory the full feature must be displayed.

We already hide the link from the OPAC main page, but the form is still accessible.

Test plan (for the whole patch set):
1. Turn on PatronSelfRegistration
2. Don't set PatronSelfRegistrationDefaultCategory
3. Go to the OPAC main page and confirm that the "Register here" link is
not displayed
4. Hit opac-memberentry.pl and confirm that you are redirected to the
OPAC main page
5. Go to the about page and confirm that you see a warning in the
"System information" tab
6. Set PatronSelfRegistrationDefaultCategory to an invalid patron's
category
7. Repeat 3, 4, 5
8. Set PatronSelfRegistrationDefaultCategory to a valid patron's
category
9. Self-register a patron and confirm it works as expected
10. Edit PatronSelfRegistrationBorrowerUnwantedField and confirm that
you cannot remove dateexpiry and categorycode

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 45 Katrin Fischer 2023-04-22 20:12:53 UTC
Created attachment 150084 [details] [review]
Bug 27634: Force include categorycode to PatronSelfRegistrationBorrowerUnwantedField

We should always use the category defined in
PatronSelfRegistrationDefaultCategory.
This could be discussed however.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 46 Katrin Fischer 2023-04-22 20:12:57 UTC
Created attachment 150085 [details] [review]
Bug 27634: Add the ability to exclude fields from "modal" sysprefs

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 47 Katrin Fischer 2023-04-22 20:13:01 UTC
Created attachment 150086 [details] [review]
Bug 27634: Force include of dateexpiry

Otherwise we see a "Date expiry" entry in the form.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 48 Katrin Fischer 2023-04-22 20:13:04 UTC
Created attachment 150087 [details] [review]
Bug 27634: Add a warning to the about page if PatronSelfRegistrationDefaultCategory not set

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 49 Katrin Fischer 2023-04-22 20:13:08 UTC
Created attachment 150088 [details] [review]
Bug 27634: Update PatronSelfRegistrationBorrowerUnwantedField's value

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 50 Katrin Fischer 2023-04-22 20:13:11 UTC
Created attachment 150089 [details] [review]
Bug 27634: Hide "Register here" links

Make sure the pref is filled with a valid patron's category to display
the "register" link

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 51 Katrin Fischer 2023-04-22 20:13:14 UTC
Created attachment 150090 [details] [review]
Bug 27634: (QA follow-up) Add punctuation to message on About page

This just adds some missing commas and turns a pref into preference
in the messages displayed on the system information tab.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 52 Jonathan Druart 2023-05-11 07:34:43 UTC
Created attachment 151046 [details] [review]
Bug 27634: Add a warning to the about page if PatronSelfRegistrationDefaultCategory not set

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 53 Jonathan Druart 2023-05-11 07:34:46 UTC
Created attachment 151047 [details] [review]
Bug 27634: Update PatronSelfRegistrationBorrowerUnwantedField's value

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 54 Jonathan Druart 2023-05-11 07:34:49 UTC
Created attachment 151048 [details] [review]
Bug 27634: Hide "Register here" links

Make sure the pref is filled with a valid patron's category to display
the "register" link

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 55 Jonathan Druart 2023-05-11 07:34:52 UTC
Created attachment 151049 [details] [review]
Bug 27634: (QA follow-up) Add punctuation to message on About page

This just adds some missing commas and turns a pref into preference
in the messages displayed on the system information tab.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 56 Jonathan Druart 2023-05-11 07:35:03 UTC
Trivial rebase (about.tt)
Comment 57 Tomás Cohen Arazi 2023-09-12 12:56:17 UTC
Can you please rebase ASAP?
Comment 58 Jonathan Druart 2023-09-18 21:07:53 UTC
Created attachment 155863 [details] [review]
Bug 27634: Turn off patron self-registration if no default category is set

If there is no default category defined in PatronSelfRegistrationDefaultCategory the full feature must be displayed.

We already hide the link from the OPAC main page, but the form is still accessible.

Test plan (for the whole patch set):
1. Turn on PatronSelfRegistration
2. Don't set PatronSelfRegistrationDefaultCategory
3. Go to the OPAC main page and confirm that the "Register here" link is
not displayed
4. Hit opac-memberentry.pl and confirm that you are redirected to the
OPAC main page
5. Go to the about page and confirm that you see a warning in the
"System information" tab
6. Set PatronSelfRegistrationDefaultCategory to an invalid patron's
category
7. Repeat 3, 4, 5
8. Set PatronSelfRegistrationDefaultCategory to a valid patron's
category
9. Self-register a patron and confirm it works as expected
10. Edit PatronSelfRegistrationBorrowerUnwantedField and confirm that
you cannot remove dateexpiry and categorycode

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 59 Jonathan Druart 2023-09-18 21:07:56 UTC
Created attachment 155864 [details] [review]
Bug 27634: Force include categorycode to PatronSelfRegistrationBorrowerUnwantedField

We should always use the category defined in
PatronSelfRegistrationDefaultCategory.
This could be discussed however.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 60 Jonathan Druart 2023-09-18 21:07:59 UTC
Created attachment 155865 [details] [review]
Bug 27634: Add the ability to exclude fields from "modal" sysprefs

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 61 Jonathan Druart 2023-09-18 21:08:02 UTC
Created attachment 155866 [details] [review]
Bug 27634: Force include of dateexpiry

Otherwise we see a "Date expiry" entry in the form.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 62 Jonathan Druart 2023-09-18 21:08:05 UTC
Created attachment 155867 [details] [review]
Bug 27634: Add a warning to the about page if PatronSelfRegistrationDefaultCategory not set

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 63 Jonathan Druart 2023-09-18 21:08:08 UTC
Created attachment 155868 [details] [review]
Bug 27634: Update PatronSelfRegistrationBorrowerUnwantedField's value

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 64 Jonathan Druart 2023-09-18 21:08:11 UTC
Created attachment 155869 [details] [review]
Bug 27634: Hide "Register here" links

Make sure the pref is filled with a valid patron's category to display
the "register" link

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 65 Jonathan Druart 2023-09-18 21:08:14 UTC
Created attachment 155870 [details] [review]
Bug 27634: (QA follow-up) Add punctuation to message on About page

This just adds some missing commas and turns a pref into preference
in the messages displayed on the system information tab.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 66 Tomás Cohen Arazi 2023-09-19 19:35:16 UTC
Pushed to master for 23.11.

Nice work everyone, thanks!
Comment 67 Jonathan Druart 2023-09-26 09:36:16 UTC
Created attachment 156203 [details] [review]
Bug 27634: Fix self_registration.t
Comment 68 Tomás Cohen Arazi 2023-10-03 13:24:25 UTC
Follow-up pushed to master, thanks Jonathan!
Comment 69 Fridolin Somers 2023-10-05 18:16:44 UTC
Does not apply easy on 23.05.x
Looks like some changes come from Bug 27378
Since it impacts preferences it may be risky for stable branch