Bug 7660 - Enhanced messaging preferences are not set when creating a child patron from the adult
Summary: Enhanced messaging preferences are not set when creating a child patron from ...
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Patrons (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Nick Clemens (kidclamp)
QA Contact: Katrin Fischer
URL:
Keywords:
: 4467 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-03-07 11:25 UTC by Gaetan Boisson
Modified: 2023-06-08 22:26 UTC (History)
12 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.05, 21.11.12
Circulation function:


Attachments
Bug 7660: Use first available categorycode when none passed in (2.06 KB, patch)
2022-07-18 11:54 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 7660: Use first available categorycode when none passed in (2.12 KB, patch)
2022-07-18 14:58 UTC, Biblibre Sandboxes
Details | Diff | Splinter Review
Bug 7660: Use first available categorycode when none passed in (2.18 KB, patch)
2022-07-18 19:22 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 Gaetan Boisson 2012-03-07 11:25:30 UTC
When creating a new patron, the enhancedmessagingpreferences table is filled with what has been defined for this patron category.
But when adding a child for a regular patron this table is empty even though a fitting patron category has been preselected.

Ideally, the table should be updated when we choose a new patron category from the list under library management on the memberentry page.
Comment 1 Katrin Fischer 2019-04-28 21:24:10 UTC
This is still an issue. I think we could solve this in different ways:

- Force to select a patron category before showing the form to add the child patron
- Use an Ajax call to reload the messaging preferences when the category is selected. But I have some doubts about this, as we only want to have 'initial' settings and respect if something has been changed manually.
Comment 2 Katrin Fischer 2019-04-28 23:27:37 UTC
*** Bug 4467 has been marked as a duplicate of this bug. ***
Comment 3 Donna 2019-06-10 18:33:58 UTC
Confirming Comment 1 - this is still an issue, and is causing confusion for staff as they have to look up what the defaults should be for the different categories of patrons that are being added to the parent card.
Comment 4 Emily W 2022-07-13 21:05:53 UTC
Recently began having this issue. Digests will be checked when creating the guarantee but will uncheck once saved. Takes up staff time adding an additional step to sign up process.
Comment 5 Katrin Fischer 2022-07-15 09:24:42 UTC
(In reply to Emily W from comment #4)
> Recently began having this issue. Digests will be checked when creating the
> guarantee but will uncheck once saved. Takes up staff time adding an
> additional step to sign up process.

Hi Emily, I think this is a slightly different bug 30175 that was fixed in 22.05. I have also asked the RMaint to check for backporting. Which version did you test with?
Comment 6 Nick Clemens (kidclamp) 2022-07-15 11:06:49 UTC
One thing to note here, if the messaging preferences are left blank, then they are filled from the category on save

To test:
1 - In KTD set 'Juvenile' category to have some messaging preferences
2 - Find a patron, say Edna Acosta, and 'Add guarantee'
3 - In new form preferences are blank - fill out other fields and save
4 - Save patron
5 - Note messaging preferences match category defaults
Comment 7 Emily W 2022-07-17 16:06:19 UTC
(In reply to Katrin Fischer from comment #5)
> (In reply to Emily W from comment #4)
> > Recently began having this issue. Digests will be checked when creating the
> > guarantee but will uncheck once saved. Takes up staff time adding an
> > additional step to sign up process.
> 
> Hi Emily, I think this is a slightly different bug 30175 that was fixed in
> 22.05. I have also asked the RMaint to check for backporting. Which version
> did you test with?

We currently have 21.05 but will be updating to 21.11 on 7/27/22. Do you think the fix will come with that upgrade?
Comment 8 Emily W 2022-07-17 16:07:33 UTC
(In reply to Nick Clemens from comment #6)
> One thing to note here, if the messaging preferences are left blank, then
> they are filled from the category on save
> 
> To test:
> 1 - In KTD set 'Juvenile' category to have some messaging preferences
> 2 - Find a patron, say Edna Acosta, and 'Add guarantee'
> 3 - In new form preferences are blank - fill out other fields and save
> 4 - Save patron
> 5 - Note messaging preferences match category defaults

We've noticed that, but most of the juvenile cards we make we need to change the patron category, which auto fills everything in.
Comment 9 Nick Clemens (kidclamp) 2022-07-18 11:54:13 UTC
Created attachment 137801 [details] [review]
Bug 7660: Use first available categorycode when none passed in

The code that populates the patron messaging preferences on initial form load
expects to have a category selected. Currently we only have one if one was
passed to the form. When creating an account from a parent, we don't have a
category explicitly selected - so we can just select the first of the possible
categories

To test:
 1 - In KTD set 'Juvenile' category to have some messaging preferences
 2 - Find a patron, say Edna Acosta, and 'Add guarantee'
 3 - In new form preferences are blank, cancel
 4 - Apply patch, restart all
 5 - Go to Edna, click 'Add guarantee'
 6 - Preferences are populated!
 7 - Cancel
 8 - Go to 'Patrons' module
 9 - Click "+ New patron"
10 - Confirm messaging preferences load correctly when not adding child
Comment 10 Emily W 2022-07-18 13:21:59 UTC
(In reply to Nick Clemens from comment #9)
> Created attachment 137801 [details] [review] [review]
> Bug 7660: Use first available categorycode when none passed in
> 
> The code that populates the patron messaging preferences on initial form load
> expects to have a category selected. Currently we only have one if one was
> passed to the form. When creating an account from a parent, we don't have a
> category explicitly selected - so we can just select the first of the
> possible
> categories
> 
> To test:
>  1 - In KTD set 'Juvenile' category to have some messaging preferences
>  2 - Find a patron, say Edna Acosta, and 'Add guarantee'
>  3 - In new form preferences are blank, cancel
>  4 - Apply patch, restart all
>  5 - Go to Edna, click 'Add guarantee'
>  6 - Preferences are populated!
>  7 - Cancel
>  8 - Go to 'Patrons' module
>  9 - Click "+ New patron"
> 10 - Confirm messaging preferences load correctly when not adding child

Yes, everything works fine when we aren't creating using "add guarantee." All the categories have their default notification preferences correct in our settings.
Comment 11 Nick Clemens (kidclamp) 2022-07-18 13:36:09 UTC
Hi Emily,

That attachment was a patch to attempt to fix the problem and a supplied test plan. Did you apply the patch, or were just confirming current state of the bug?

-Nick

(In reply to Emily W from comment #10)
> (In reply to Nick Clemens from comment #9)
> > Created attachment 137801 [details] [review] [review] [review]
> > Bug 7660: Use first available categorycode when none passed in
Comment 12 Emily W 2022-07-18 13:38:36 UTC
(In reply to Nick Clemens from comment #11)
> Hi Emily,
> 
> That attachment was a patch to attempt to fix the problem and a supplied
> test plan. Did you apply the patch, or were just confirming current state of
> the bug?
> 
> -Nick
> 
> (In reply to Emily W from comment #10)
> > (In reply to Nick Clemens from comment #9)
> > > Created attachment 137801 [details] [review] [review] [review] [review]
> > > Bug 7660: Use first available categorycode when none passed in

Confirming the state, I will try the patch later today.
Comment 13 Biblibre Sandboxes 2022-07-18 14:58:46 UTC
Created attachment 137821 [details] [review]
Bug 7660: Use first available categorycode when none passed in

The code that populates the patron messaging preferences on initial form load
expects to have a category selected. Currently we only have one if one was
passed to the form. When creating an account from a parent, we don't have a
category explicitly selected - so we can just select the first of the possible
categories

To test:
 1 - In KTD set 'Juvenile' category to have some messaging preferences
 2 - Find a patron, say Edna Acosta, and 'Add guarantee'
 3 - In new form preferences are blank, cancel
 4 - Apply patch, restart all
 5 - Go to Edna, click 'Add guarantee'
 6 - Preferences are populated!
 7 - Cancel
 8 - Go to 'Patrons' module
 9 - Click "+ New patron"
10 - Confirm messaging preferences load correctly when not adding child

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Comment 14 Sally 2022-07-18 14:59:28 UTC
Works as described, signing off.

Thanks, Nick!
Comment 15 Katrin Fischer 2022-07-18 19:22:01 UTC
Created attachment 137841 [details] [review]
Bug 7660: Use first available categorycode when none passed in

The code that populates the patron messaging preferences on initial form load
expects to have a category selected. Currently we only have one if one was
passed to the form. When creating an account from a parent, we don't have a
category explicitly selected - so we can just select the first of the possible
categories

To test:
 1 - In KTD set 'Juvenile' category to have some messaging preferences
 2 - Find a patron, say Edna Acosta, and 'Add guarantee'
 3 - In new form preferences are blank, cancel
 4 - Apply patch, restart all
 5 - Go to Edna, click 'Add guarantee'
 6 - Preferences are populated!
 7 - Cancel
 8 - Go to 'Patrons' module
 9 - Click "+ New patron"
10 - Confirm messaging preferences load correctly when not adding child

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 16 Katrin Fischer 2022-07-18 19:22:28 UTC
Don't get to pass QA on 4 digit bugs often anymore :)
Comment 17 Tomás Cohen Arazi (tcohen) 2022-07-20 13:11:12 UTC
Pushed to master for 22.11.

Nice work everyone, thanks!
Comment 18 Lucas Gass (lukeg) 2022-08-23 20:06:04 UTC
Backported to 22.05.x for 22.05.05
Comment 19 Arthur Suzuki 2022-08-30 09:29:07 UTC
thx pushed to 21.11.x for 21.11.12
Comment 20 Victor Grousset/tuxayo 2022-09-14 19:29:51 UTC
Not backported to oldoldstable (21.05.x). Feel free to ask if it's needed.

Nothing to document, marking resolved.