Bug 32655 - Variables showing in patron messaging preferences
Summary: Variables showing in patron messaging preferences
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Patrons (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Lucas Gass
QA Contact: Martin Renvoize
URL:
Keywords:
Depends on: 31166
Blocks:
  Show dependency treegraph
 
Reported: 2023-01-17 16:49 UTC by Christopher Brannon
Modified: 2023-12-28 20:44 UTC (History)
7 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:
23.05.00,22.11.03,22.05.10,21.11.16


Attachments
Your variables are showing (7.51 KB, image/png)
2023-01-17 16:49 UTC, Christopher Brannon
Details
Bug 32655: Move phone and itiva variables into templates (3.20 KB, patch)
2023-01-17 18:50 UTC, Lucas Gass
Details | Diff | Splinter Review
Bug 32655: Move phone and itiva variables into templates (3.25 KB, patch)
2023-01-17 21:35 UTC, David Nind
Details | Diff | Splinter Review
Bug 32655: Move phone and itiva variables into templates (3.31 KB, patch)
2023-02-01 13:22 UTC, Martin Renvoize
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Christopher Brannon 2023-01-17 16:49:49 UTC
Created attachment 145363 [details]
Your variables are showing

If you collapse the patron messaging preferences when editing the patron, you see two variables listed above the table in the section.  See attachment.
Comment 1 Lucas Gass 2023-01-17 18:39:09 UTC
There is a script that is being toggled to 'display:block':

<script>
    var TalkingTechItivaPhoneNotification = [% Koha.Preference('TalkingTechItivaPhoneNotification') || 0 | html %];
    var PhoneNotification = [% Koha.Preference('PhoneNotification') || 0 | html %];
</script>


We could change the jQuery selector but maybe it is easier to move the script to somewhere more appropriate.
Comment 2 Lucas Gass 2023-01-17 18:40:46 UTC
The script is coming from the messaging-preference-from.inc which is included in these templates:

koha-tmpl/intranet-tmpl/prog/en/modules/admin/categories.tt               
koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt                                       
koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt
Comment 3 Lucas Gass 2023-01-17 18:50:36 UTC
Created attachment 145367 [details] [review]
Bug 32655: Move phone and itiva variables into templates

To test:
1. Go to a patron record or create a new one.
2. Toggle the 'Patron messaging preferences' fieldset so it is hidden.
3. Notice the variables.
4. Apply patch
5. Try steps 1 & 2 again, no varibales.
6. Attempt to toggle on/off options for email/sms. When email/sms are off the digest option next to it should be disabled.
7. Go to  Administration > Patron categories and try step 6 there as well.
Comment 4 David Nind 2023-01-17 21:35:07 UTC
Created attachment 145374 [details] [review]
Bug 32655: Move phone and itiva variables into templates

To test:
1. Go to a patron record or create a new one.
2. Toggle the 'Patron messaging preferences' fieldset so it is hidden.
3. Notice the variables.
4. Apply patch
5. Try steps 1 & 2 again, no varibales.
6. Attempt to toggle on/off options for email/sms. When email/sms are off the digest option next to it should be disabled.
7. Go to  Administration > Patron categories and try step 6 there as well.

Signed-off-by: David Nind <david@davidnind.com>
Comment 5 Martin Renvoize 2023-02-01 13:22:37 UTC
Created attachment 145939 [details] [review]
Bug 32655: Move phone and itiva variables into templates

To test:
1. Go to a patron record or create a new one.
2. Toggle the 'Patron messaging preferences' fieldset so it is hidden.
3. Notice the variables.
4. Apply patch
5. Try steps 1 & 2 again, no varibales.
6. Attempt to toggle on/off options for email/sms. When email/sms are off the digest option next to it should be disabled.
7. Go to  Administration > Patron categories and try step 6 there as well.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 6 Martin Renvoize 2023-02-01 13:23:00 UTC
No regressions, cleanup works.

Passing QA
Comment 7 Tomás Cohen Arazi 2023-02-03 13:17:25 UTC
LOL
Comment 8 Tomás Cohen Arazi 2023-02-03 13:33:05 UTC
Pushed to master for 23.05.

Nice work everyone, thanks!
Comment 9 Jacob O'Mara 2023-02-06 16:28:13 UTC
Nice work, thanks everyone!

Pushed to 22.11.x for the next release.
Comment 10 Lucas Gass 2023-02-14 22:16:27 UTC
Backported to 22.05.x for upcoming 22.05.10
Comment 11 Arthur Suzuki 2023-02-17 10:35:38 UTC
applied to 21.11.x for 21.11.16
Comment 12 wainuiwitikapark 2023-03-15 01:46:10 UTC
Not backported to 21.05.x