Bug 31610 - When creating a guarantee, patron messaging preferences should be copied to this account from the category
Summary: When creating a guarantee, patron messaging preferences should be copied to t...
Status: Failed QA
Alias: None
Product: Koha
Classification: Unclassified
Component: Patrons (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Julian Maurice
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-09-22 21:53 UTC by Kelly McElligott
Modified: 2024-01-30 15:07 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 31610: Set messaging preferences in the new guarantee form (2.68 KB, patch)
2024-01-29 13:32 UTC, Julian Maurice
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Kelly McElligott 2022-09-22 21:53:20 UTC
When creating a guarantee, patron messaging preferences should be copied to this account from the category.

Steps:
Have a guarantor.
Create a guarantee.
Koha will use the CHILD patron category to assign this guarantee, but will not copy over the message preferences from this CHILD patron category.
Comment 1 Mwoo 2022-09-23 13:57:30 UTC
YES Please!!!!
Comment 2 Julian Maurice 2024-01-29 13:32:59 UTC
Created attachment 161595 [details] [review]
Bug 31610: Set messaging preferences in the new guarantee form

On patron detail page, if the patron is an adult, there is a button "Add
guarantee". It takes you to the patron creation form. In this form one
of the "can be guarantee" category will be automatically selected, but
the messaging preferences will not be automatically set to the default
messaging preferences for this category.
This patch fixes that.

Test plan:
1. Make sure all the "can be guarantee" categories have default
   messaging preferences. The category dropdown list is not sorted so
   it's not always the same category that appear first and is
   automatically selected.
   Also make sure that preference borrowerRelationship is not empty
2. Find a patron whose category's type is Adult and go to its detail
   page
3. Click on "Add guarantee" in the toolbar
4. Verify that the messaging preferences are automatically set and match
   the selected category.
Comment 3 Kelly McElligott 2024-01-30 14:05:23 UTC
I tested this and I am not finding this to work.  I create a patron that has default messaging preferences (Adult), and then I create a guarantee (kid) for this account.  Now in Koha Admin, Patron Categories, the Kid category has specific messaging preferences as does the adult, and these messaging preferences are not the same. 

When I create the guarantee, no messaging preferences copy over.

When I go back and edit the guarantee, after saving it, I do get a popup message asking if I want to copy messaging preferences over, I clicked ok.  Nothing happens. 

Even if I go into an already created Adult patron, I get the same popup to update/copy messaging preferences, nothing updates.
Comment 4 Julian Maurice 2024-01-30 14:33:03 UTC
Did you clean your browser cache before testing ?
As the patch only changes a JS file, it's possible that the browser loaded the old version.
Comment 5 Kelly McElligott 2024-01-30 15:07:03 UTC
I am using the sandbox- refreshed my cache- no luck. I logged out and logged back in, no luck. I also tried another browser, no luck.