Bug 34438 - OPAC self registration form does not include lang (preferred language for notices) field
Summary: OPAC self registration form does not include lang (preferred language for not...
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Lucas Gass (lukeg)
QA Contact: Testopia
URL:
Keywords:
: 28362 (view as bug list)
Depends on:
Blocks:
 
Reported: 2023-07-27 19:12 UTC by Lucas Gass (lukeg)
Modified: 2024-02-19 20:50 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact: Caroline Cyr La Rose
Documentation submission: https://gitlab.com/koha-community/koha-manual/-/merge_requests/836
Text to go in the release notes:
This adds the 'preferred language' to the patron self registration form when `TranslateNotices` is activated. The field can be hidden using the `PatronSelfRegistrationBorrowerUnwantedField` and `PatronSelfRegistrationBorrowerMandatoryField` system preferences if not needed.
Version(s) released in:
23.11.00
Circulation function:


Attachments
Bug 34438: Add lang field to OPAC patron self registration form (7.96 KB, patch)
2023-07-27 20:48 UTC, Lucas Gass (lukeg)
Details | Diff | Splinter Review
Bug 34438: Add lang to borrower_modification table (2.41 KB, patch)
2023-07-27 20:48 UTC, Lucas Gass (lukeg)
Details | Diff | Splinter Review
Bug 34438: Add lang field to OPAC patron self registration form (8.01 KB, patch)
2023-09-18 00:29 UTC, David Nind
Details | Diff | Splinter Review
Bug 34438: Add lang to borrower_modification table (2.45 KB, patch)
2023-09-18 00:29 UTC, David Nind
Details | Diff | Splinter Review
Bug 34438: Schema changes [DO NOT PUSH] (982 bytes, patch)
2023-10-31 17:56 UTC, Lucas Gass (lukeg)
Details | Diff | Splinter Review
Bug 34438: Database update (1.07 KB, patch)
2023-10-31 17:56 UTC, Lucas Gass (lukeg)
Details | Diff | Splinter Review
Bug 34438: Add lang field to OPAC patron self registration form (8.03 KB, patch)
2023-10-31 17:56 UTC, Lucas Gass (lukeg)
Details | Diff | Splinter Review
Bug 34438: ( follow-up ): Amend kohastructure.sql (1020 bytes, patch)
2023-10-31 18:00 UTC, Lucas Gass (lukeg)
Details | Diff | Splinter Review
Bug 34438: Schema changes [DO NOT PUSH] (1.00 KB, patch)
2023-10-31 20:12 UTC, David Nind
Details | Diff | Splinter Review
Bug 34438: Database update (1.11 KB, patch)
2023-10-31 20:12 UTC, David Nind
Details | Diff | Splinter Review
Bug 34438: Add lang field to OPAC patron self registration form (8.03 KB, patch)
2023-10-31 20:12 UTC, David Nind
Details | Diff | Splinter Review
Bug 34438: ( follow-up ): Amend kohastructure.sql (1.04 KB, patch)
2023-10-31 20:13 UTC, David Nind
Details | Diff | Splinter Review
Bug 34438: Schema changes [DO NOT PUSH] (1.01 KB, patch)
2023-11-01 15:27 UTC, Lucas Gass (lukeg)
Details | Diff | Splinter Review
Bug 34438: Database update (1.13 KB, patch)
2023-11-01 15:27 UTC, Lucas Gass (lukeg)
Details | Diff | Splinter Review
Bug 34438: Add lang field to OPAC patron self registration form (8.03 KB, patch)
2023-11-01 15:27 UTC, Lucas Gass (lukeg)
Details | Diff | Splinter Review
Bug 34438: (follow-up): Amend kohastructure.sql (1.57 KB, patch)
2023-11-01 15:27 UTC, Lucas Gass (lukeg)
Details | Diff | Splinter Review
Bug 34438: Schema changes [DO NOT PUSH] (1.06 KB, patch)
2023-11-01 18:03 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 34438: Database update (1.18 KB, patch)
2023-11-01 18:03 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 34438: Add lang field to OPAC patron self registration form (8.08 KB, patch)
2023-11-01 18:03 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 34438: (follow-up): Amend kohastructure.sql (1.62 KB, patch)
2023-11-01 18:03 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 Lucas Gass (lukeg) 2023-07-27 19:12:59 UTC
To recreate:

1. Install a language pack ( sudo koha-translate -i es-ES )
2. Turn on the system preference TranslateNotices
3. The lang field now appears when registering a patron from the staff interface but not on the OPAC self registration form.
Comment 1 Lucas Gass (lukeg) 2023-07-27 20:48:02 UTC
Created attachment 154001 [details] [review]
Bug 34438: Add lang field to OPAC patron self registration form
Comment 2 Lucas Gass (lukeg) 2023-07-27 20:48:04 UTC
Created attachment 154002 [details] [review]
Bug 34438: Add lang to borrower_modification table

To test:
1. Install a language pack ( sudo koha-translate -i es-ES )
2. Turn on the system preference TranslateNotices
3. The lang field now appears when registering a patron from the staff interface but not on the OPAC self registration form.
4. Apply patch, updatedatabase, restart_all
5. Go to the OPAC self reg form and notice the Preferred language for notices:
6. Use the  PatronSelfRegistrationBorrowerUnwantedField and PatronSelfRegistrationBorrowerMandatoryField to make sure you can make the field requied/hidden.
7. Login to the OPAC and go to patron details, make sure you can modify the Preferred language for notices field successfully.
Comment 3 Katrin Fischer 2023-07-28 08:48:33 UTC
*** Bug 28362 has been marked as a duplicate of this bug. ***
Comment 4 David Nind 2023-09-18 00:29:21 UTC
Created attachment 155775 [details] [review]
Bug 34438: Add lang field to OPAC patron self registration form

Signed-off-by: David Nind <david@davidnind.com>
Comment 5 David Nind 2023-09-18 00:29:23 UTC
Created attachment 155776 [details] [review]
Bug 34438: Add lang to borrower_modification table

To test:
1. Install a language pack ( sudo koha-translate -i es-ES )
2. Turn on the system preference TranslateNotices
3. The lang field now appears when registering a patron from the staff interface but not on the OPAC self registration form.
4. Apply patch, updatedatabase, restart_all
5. Go to the OPAC self reg form and notice the Preferred language for notices:
6. Use the  PatronSelfRegistrationBorrowerUnwantedField and PatronSelfRegistrationBorrowerMandatoryField to make sure you can make the field requied/hidden.
7. Login to the OPAC and go to patron details, make sure you can modify the Preferred language for notices field successfully.

Signed-off-by: David Nind <david@davidnind.com>
Comment 6 David Nind 2023-09-18 00:33:49 UTC
Hi Lucas.

I've signed off, but I did notice this with the OPAC for 7:

- You can easily change the preferred language for notices under OPAC account > Messaging.

- However, if you attempt to change it under OPAC account > Personal details, you get a message "Thank you. Your updates have been submitted. A librarian will review your updates before applying them." and it appears in the staff interface under Patrons requesting modifications.

I'm not sure whether this is expected, or needs updating.

David
Comment 7 Katrin Fischer 2023-09-18 19:57:24 UTC
Maybe it's not good to have it in 2 spots by default. Should we include an update to hide it for existing installations?
Comment 8 Katrin Fischer 2023-10-31 15:10:55 UTC
Hi Lucas,

* Rebase was easy, so I did it myself, but:
* The Schema change should be a separate DO NOT PUSH style patch.
* Change in kohastructure.sql is missing

I like this - please fix!
Comment 9 Katrin Fischer 2023-10-31 15:11:38 UTC
(In reply to Katrin Fischer from comment #8)
> Hi Lucas,
> 
> * Rebase was easy, so I did it myself, but:
> * The Schema change should be a separate DO NOT PUSH style patch.
> * Change in kohastructure.sql is missing
> 
> I like this - please fix!

... and please perltidy!
Comment 10 Lucas Gass (lukeg) 2023-10-31 17:56:18 UTC
Created attachment 158152 [details] [review]
Bug 34438: Schema changes [DO NOT PUSH]
Comment 11 Lucas Gass (lukeg) 2023-10-31 17:56:20 UTC
Created attachment 158153 [details] [review]
Bug 34438: Database update
Comment 12 Lucas Gass (lukeg) 2023-10-31 17:56:23 UTC
Created attachment 158154 [details] [review]
Bug 34438: Add lang field to OPAC patron self registration form

Signed-off-by: David Nind <david@davidnind.com>
Comment 13 Lucas Gass (lukeg) 2023-10-31 18:00:33 UTC
Created attachment 158155 [details] [review]
Bug 34438: ( follow-up ): Amend kohastructure.sql
Comment 14 Lucas Gass (lukeg) 2023-10-31 18:00:59 UTC
Fixed and back to NSO.
Comment 15 David Nind 2023-10-31 20:12:54 UTC
Created attachment 158156 [details] [review]
Bug 34438: Schema changes [DO NOT PUSH]

Signed-off-by: David Nind <david@davidnind.com>
Comment 16 David Nind 2023-10-31 20:12:57 UTC
Created attachment 158157 [details] [review]
Bug 34438: Database update

Signed-off-by: David Nind <david@davidnind.com>
Comment 17 David Nind 2023-10-31 20:12:59 UTC
Created attachment 158158 [details] [review]
Bug 34438: Add lang field to OPAC patron self registration form

Signed-off-by: David Nind <david@davidnind.com>
Comment 18 David Nind 2023-10-31 20:13:02 UTC
Created attachment 158159 [details] [review]
Bug 34438: ( follow-up ): Amend kohastructure.sql

Signed-off-by: David Nind <david@davidnind.com>
Comment 19 Katrin Fischer 2023-11-01 10:55:18 UTC
Please fix:

 WARN	Koha/Schema/Result/BorrowerModification.pm
   WARN	  tidiness
		The file is less tidy than before (bad/messy lines before: 176, now: 178)

 WARN	installer/data/mysql/atomicupdate/bug_34438.pl
   WARN	  tidiness
		The file is less tidy than before (bad/messy lines before: 0, now: 2)

 OK	installer/data/mysql/kohastructure.sql

 OK	koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt

 FAIL	opac/opac-memberentry.pl
   FAIL	  valid
		"my" variable $defaultCategory masks earlier declaration in same scope


Processing additional checks

	* Commit title does not contain 'follow-up' correctly spelt - 61e1edc84b
Comment 20 Katrin Fischer 2023-11-01 10:55:44 UTC
I believe this line should have been deleted in the rebase:
+my $defaultCategory = Koha::Patron::Categories->find(C4::Context->preference('PatronSelfRegistrationDefaultCategory'));
Comment 21 Lucas Gass (lukeg) 2023-11-01 15:27:48 UTC
Created attachment 158181 [details] [review]
Bug 34438: Schema changes [DO NOT PUSH]

Signed-off-by: David Nind <david@davidnind.com>
Comment 22 Lucas Gass (lukeg) 2023-11-01 15:27:50 UTC
Created attachment 158182 [details] [review]
Bug 34438: Database update

Signed-off-by: David Nind <david@davidnind.com>
Comment 23 Lucas Gass (lukeg) 2023-11-01 15:27:52 UTC
Created attachment 158183 [details] [review]
Bug 34438: Add lang field to OPAC patron self registration form

Signed-off-by: David Nind <david@davidnind.com>
Comment 24 Lucas Gass (lukeg) 2023-11-01 15:27:54 UTC
Created attachment 158184 [details] [review]
Bug 34438: (follow-up): Amend kohastructure.sql

Signed-off-by: David Nind <david@davidnind.com>
Comment 25 Katrin Fischer 2023-11-01 18:03:36 UTC
Created attachment 158196 [details] [review]
Bug 34438: Schema changes [DO NOT PUSH]

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 26 Katrin Fischer 2023-11-01 18:03:39 UTC
Created attachment 158197 [details] [review]
Bug 34438: Database update

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 27 Katrin Fischer 2023-11-01 18:03:42 UTC
Created attachment 158198 [details] [review]
Bug 34438: Add lang field to OPAC patron self registration form

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 28 Katrin Fischer 2023-11-01 18:03:45 UTC
Created attachment 158199 [details] [review]
Bug 34438: (follow-up): Amend kohastructure.sql

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 29 Tomás Cohen Arazi (tcohen) 2023-11-08 14:42:39 UTC
Pushed to master for 23.11.

Nice work everyone, thanks!
Comment 30 Fridolin Somers 2023-11-10 21:08:50 UTC
Enhancement not pushed to 23.05.x