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.
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
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.
Created attachment 116380 [details] [review] Bug 27634: Add the ability to exclude fields from "modal" sysprefs
Created attachment 116381 [details] [review] Bug 27634: Force include of dateexpiry Otherwise we see a "Date expiry" entry in the form.
Created attachment 116382 [details] [review] Bug 27634: Add a warning to the about page if PatronSelfRegistrationDefaultCategory not set
Created attachment 116383 [details] [review] Bug 27634: Update PatronSelfRegistrationBorrowerUnwantedField's value
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
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
(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 :)
> > 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
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 ...
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
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
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.
Created attachment 145601 [details] [review] Bug 27634: Add the ability to exclude fields from "modal" sysprefs
Created attachment 145602 [details] [review] Bug 27634: Force include of dateexpiry Otherwise we see a "Date expiry" entry in the form.
Created attachment 145603 [details] [review] Bug 27634: Add a warning to the about page if PatronSelfRegistrationDefaultCategory not set
Created attachment 145604 [details] [review] Bug 27634: Update PatronSelfRegistrationBorrowerUnwantedField's value
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
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.
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
(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).
*** Bug 17987 has been marked as a duplicate of this bug. ***
We can get this one moving again please? :)
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
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.
Created attachment 147533 [details] [review] Bug 27634: Add the ability to exclude fields from "modal" sysprefs
Created attachment 147534 [details] [review] Bug 27634: Force include of dateexpiry Otherwise we see a "Date expiry" entry in the form.
Created attachment 147535 [details] [review] Bug 27634: Add a warning to the about page if PatronSelfRegistrationDefaultCategory not set
Created attachment 147536 [details] [review] Bug 27634: Update PatronSelfRegistrationBorrowerUnwantedField's value
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
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
Created attachment 149746 [details] [review] Bug 27634: Add a warning to the about page if PatronSelfRegistrationDefaultCategory not set
Created attachment 149747 [details] [review] Bug 27634: Update PatronSelfRegistrationBorrowerUnwantedField's value
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
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>
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>
Created attachment 149898 [details] [review] Bug 27634: Add the ability to exclude fields from "modal" sysprefs Signed-off-by: David Nind <david@davidnind.com>
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>
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>
Created attachment 149901 [details] [review] Bug 27634: Update PatronSelfRegistrationBorrowerUnwantedField's value Signed-off-by: David Nind <david@davidnind.com>
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>
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";
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Trivial rebase (about.tt)
Can you please rebase ASAP?
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>
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>
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>
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>
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>
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>
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>
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>
Pushed to master for 23.11. Nice work everyone, thanks!
Created attachment 156203 [details] [review] Bug 27634: Fix self_registration.t
Follow-up pushed to master, thanks Jonathan!
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
Added a note in the manual to say that PatronSelfRegistrationDefaultCategory is required for PatronSelfRegistration.