[Bug 28556] New: Make guarantor information available in notices
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28556 Bug ID: 28556 Summary: Make guarantor information available in notices Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Notices Assignee: koha-bugs@lists.koha-community.org Reporter: caroline.cyr-la-rose@inlibro.com QA Contact: testopia@bugs.koha-community.org Since the change to accommodate multiple guarantees per borrower, it is impossible to get the garantor's information in notices. It is customary here to send things to the parent as C/O (care of), especially if it's by the mail. I was wondering if it was possible to make the guarantor information available in notices. Thanks! -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28556 --- Comment #1 from The Minh Luong <the-minh.luong@inlibro.com> --- Created attachment 130339 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=130339&action=edit Bug 28556: Guarantor's information is available in notice This patch adds the guarantor's information when sending sending overdue notice. To test: 1. Make sure that there is an overdue letter. a) Go in Tools/Notices & Slips. b) Search for the code "ODUE" and note the "Name" of the letter. c) Click on "Edit". d) Click on "Email" and make sure that there is text inside the box. e) Add the following code in the textbox: C/O <<guarantor.firstname>> <<guarantor.surname>> <br/> f) Click on "Save". 2. Set up the status trigger. a) Go in Tools/Overdue notice/status triggers. b) In "First" tab, put a number of days in the "Delay" column (ex: 1). c) In the column "Letter", put the "Name" of the letter of step 1a) . d) Check "Email". e) Click "Save". 3. Create a patron with a guarantor. a) Go in Administration/Patron categories. b) Create a child category AND a adult category. c) Create an adult patron. d) Create a child patron. e) Go in the child patron's page and click "Edit". f) In the "Patron guarantor" section, click add guarantor. g) Search for your adult patron and click "Select". h) Select a relationship for the guarantor (ex: Mother). i) Click on "Save". 4. Borrow an overdue item. a) Click on the arrow next to "Search button" (Top of the screen). b) Click on "Items search". c) Click on search. d) Copy a barcode in the list. e) Search for your child patron. f) Go in his page and click on "Checkout". g) Paste the barcode copied at step 4d) . h) Click on "Checkout settings". i) Put a date in the past greater than the number of days that you put on step 2b). j) Click on "Check out". k) Click on "Yes" Notice tht there is a message saying that Patron has ITEMS OVERDUE. 5. Test the patch. a) In the terminal, run ./misc/cronjobs/overdue_notices.pl b) Return in your child patron's page. c) Click on "Notice" and you should see a letter. d) Click on the letter to see the content. c) Notice that you can't see the guarantor's informations (Adult patron). d) Apply the patch. e) Notice that you can see the guarantor's informations. NOTE: If you want to delete the letters, do in your terminal: - my - delete from message_queue; -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28556 The Minh Luong <the-minh.luong@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #130339|0 |1 is obsolete| | --- Comment #2 from The Minh Luong <the-minh.luong@inlibro.com> --- Created attachment 130340 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=130340&action=edit Bug 28556: Guarantor's information is available in notice This patch adds the guarantor's information when sending sending overdue notice. To test: 1. Make sure that there is an overdue letter. a) Go in Tools/Notices & Slips. b) Search for the code "ODUE" and note the "Name" of the letter. c) Click on "Edit". d) Click on "Email" and make sure that there is text inside the box. e) Add the following code in the textbox: C/O <<guarantor.firstname>> <<guarantor.surname>> <br/> f) Click on "Save". 2. Set up the status trigger. a) Go in Tools/Overdue notice/status triggers. b) In "First" tab, put a number of days in the "Delay" column (ex: 1). c) In the column "Letter", put the "Name" of the letter of step 1a) . d) Check "Email". e) Click "Save". 3. Create a patron with a guarantor. a) Go in Administration/Patron categories. b) Create a child category AND a adult category. c) Create an adult patron. d) Create a child patron. e) Go in the child patron's page and click "Edit". f) In the "Patron guarantor" section, click add guarantor. g) Search for your adult patron and click "Select". h) Select a relationship for the guarantor (ex: Mother). i) Click on "Save". 4. Borrow an overdue item. a) Click on the arrow next to "Search button" (Top of the screen). b) Click on "Items search". c) Click on search. d) Copy a barcode in the list. e) Search for your child patron. f) Go in his page and click on "Checkout". g) Paste the barcode copied at step 4d) . h) Click on "Checkout settings". i) Put a date in the past greater than the number of days that you put on step 2b). j) Click on "Check out". k) Click on "Yes" Notice tht there is a message saying that Patron has ITEMS OVERDUE. 5. Test the patch. a) In the terminal, run ./misc/cronjobs/overdue_notices.pl b) Return in your child patron's page. c) Click on "Notice" and you should see a letter. d) Click on the letter to see the content. c) Notice that you can't see the guarantor's informations (Adult patron). d) Apply the patch. e) Reapeat steps a) to d) f) Notice that you can see the guarantor's informations. NOTE: If you want to delete the letters, do in your terminal: - my - delete from message_queue; -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28556 The Minh Luong <the-minh.luong@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff CC| |philippe.blouin@inlibro.com | |, | |the-minh.luong@inlibro.com Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28556 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |the-minh.luong@inlibro.com |ity.org | -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28556 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com Status|Needs Signoff |Failed QA --- Comment #3 from Lucas Gass <lucas@bywatersolutions.com> --- When I set my guarantor as a Non-patron guarantor and run the overdue_notices cron the job fails and I get this error: Can't call method "unblessed" on an undefined value at /kohadevbox/koha/C4/Letters.pm line 652 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28556 Shi Yao Wang <shi-yao.wang@inLibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #130340|0 |1 is obsolete| | --- Comment #4 from Shi Yao Wang <shi-yao.wang@inLibro.com> --- Created attachment 135214 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=135214&action=edit Bug 28556: Guarantor's information is available in notice This patch adds the guarantor's information when sending overdue notice. To test: 1. Make sure that there is an overdue letter. a) Go in Tools/Notices & Slips. b) Search for the code "ODUE" and note the "Name" of the letter. c) Click on "Edit". d) Click on "Email" and make sure that there is text inside the box. e) Add the following code in the textbox: C/O <<guarantor.firstname>> <<guarantor.surname>> <br/> f) Click on "Save". 2. Set up the status trigger. a) Go in Tools/Overdue notice/status triggers. b) In "First" tab, put a number of days in the "Delay" column (ex: 1). c) In the column "Letter", put the "Name" of the letter of step 1a) . d) Check "Email". e) Click "Save". 3. Create a patron with a guarantor. a) Go in Administration/Patron categories. b) Create a child category AND a adult category. c) Create an adult patron. d) Create a child patron. e) Go in the child patron's page and click "Edit". f) In the "Patron guarantor" section, click add guarantor. g) Search for your adult patron and click "Select". h) Select a relationship for the guarantor (ex: Mother). i) Click on "Save". 4. Borrow an overdue item. a) Click on the arrow next to "Search button" (Top of the screen). b) Click on "Items search". c) Click on search. d) Copy a barcode in the list. e) Search for your child patron. f) Go in his page and click on "Checkout". g) Paste the barcode copied at step 4d) . h) Click on "Checkout settings". i) Put a date in the past greater than the number of days that you put on step 2b). j) Click on "Check out". k) Click on "Yes" Notice tht there is a message saying that Patron has ITEMS OVERDUE. 5. Test the patch. a) In the terminal, run ./misc/cronjobs/overdue_notices.pl b) Return in your child patron's page. c) Click on "Notice" and you should see a letter. d) Click on the letter to see the content. c) Notice that you can't see the guarantor's informations (Adult patron). d) Apply the patch. e) Repeat steps a) to d) f) Notice that you can see the guarantor's informations. This also works if you decide to add a non-patron guarantor instead of a patron guarantor at step 3. NOTE: If you want to delete the letters, go in your database and run: - delete from message_queue; -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28556 Shi Yao Wang <shi-yao.wang@inLibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff CC| |shi-yao.wang@inLibro.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28556 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA --- Comment #5 from Lucas Gass <lucas@bywatersolutions.com> --- I think there will need to be updated unit tests here. If I apply the patch and run 'prove -v t/db_dependent/Letters.t' the tests fail: Can't call method "guarantor_relationships" on an undefined value at /kohadevbox/koha/C4/Letters.pm line 651. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28556 Marius <marius.mandrescu@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28556 Marius <marius.mandrescu@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #135214|0 |1 is obsolete| | --- Comment #6 from Marius <marius.mandrescu@inlibro.com> --- Created attachment 146397 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=146397&action=edit Bug 28556: Guarantor's information is available in notice This patch adds the guarantor's information when sending overdue notice. To test: 1. Make sure that there is an overdue letter. a) Go in Tools/Notices & Slips. b) Search for the code "ODUE" and note the "Name" of the letter. c) Click on "Edit". d) Click on "Email" and make sure that there is text inside the box. e) Add the following code in the textbox: C/O <<guarantor.firstname>> <<guarantor.surname>> <br/> Or add another guarantor. in the textbox from the select list. f) Click on "Save". 2. Set up the status trigger. a) Go in Tools/Overdue notice/status triggers. b) In "First" tab, put a number of days in the "Delay" column (ex: 1). c) In the column "Letter", put the "Name" of the letter of step 1a) . d) Check "Email". e) Click "Save". 3. Create a patron with a guarantor. a) Go in Administration/Patron categories. b) Create a child category AND a adult category. c) Create an adult patron. d) Create a child patron. e) Go in the child patron's page and click "Edit". f) In the "Patron guarantor" section, click add guarantor. g) Search for your adult patron and click "Select". h) Select a relationship for the guarantor (ex: Mother). i) Click on "Save". 4. Borrow an overdue item. a) Click on the arrow next to "Search button" (Top of the screen). b) Click on "Items search". c) Click on search. d) Copy a barcode in the list. e) Search for your child patron. f) Go in his page and click on "Checkout". g) Paste the barcode copied at step 4d) . h) Click on "Checkout settings". i) Put a date in the past greater than the number of days that you put on step 2b). j) Click on "Check out". k) Click on "Yes" Notice tht there is a message saying that Patron has ITEMS OVERDUE. 5. Test the patch. a) In the terminal, run ./misc/cronjobs/overdue_notices.pl b) Return in your child patron's page. c) Click on "Notice" and you should see a letter. d) Click on the letter to see the content. c) Notice that you can't see the guarantor's informations (Adult patron). d) Apply the patch. e) Repeat steps a) to d) f) Notice that you can see the guarantor's informations. This also works if you decide to add a non-patron guarantor instead of a patron guarantor at step 3. NOTE: If you want to delete the letters, go in your database and run: - delete from message_queue; Signed-off-by: Marius Mandrescu <marius.mandrescu@inLibro.com> Current patch-complexity: Small patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28556 Marius <marius.mandrescu@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #146397|0 |1 is obsolete| | --- Comment #7 from Marius <marius.mandrescu@inlibro.com> --- Created attachment 146398 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=146398&action=edit Bug 28556: Guarantor's information is available in notice This patch adds the guarantor's information when sending overdue notice. To test: 1. Make sure that there is an overdue letter. a) Go in Tools/Notices & Slips. b) Search for the code "ODUE" and note the "Name" of the letter. c) Click on "Edit". d) Click on "Email" and make sure that there is text inside the box. e) Add the following code in the textbox: C/O <<guarantor.firstname>> <<guarantor.surname>> <br/> Or add another guarantor. in the textbox from the select list. f) Click on "Save". 2. Set up the status trigger. a) Go in Tools/Overdue notice/status triggers. b) In "First" tab, put a number of days in the "Delay" column (ex: 1). c) In the column "Letter", put the "Name" of the letter of step 1a) . d) Check "Email". e) Click "Save". 3. Create a patron with a guarantor. a) Go in Administration/Patron categories. b) Create a child category AND a adult category. c) Create an adult patron. d) Create a child patron. e) Go in the child patron's page and click "Edit". f) In the "Patron guarantor" section, click add guarantor. g) Search for your adult patron and click "Select". h) Select a relationship for the guarantor (ex: Mother). i) Click on "Save". 4. Borrow an overdue item. a) Click on the arrow next to "Search button" (Top of the screen). b) Click on "Items search". c) Click on search. d) Copy a barcode in the list. e) Search for your child patron. f) Go in his page and click on "Checkout". g) Paste the barcode copied at step 4d) . h) Click on "Checkout settings". i) Put a date in the past greater than the number of days that you put on step 2b). j) Click on "Check out". k) Click on "Yes" Notice tht there is a message saying that Patron has ITEMS OVERDUE. 5. Test the patch. a) In the terminal, run ./misc/cronjobs/overdue_notices.pl b) Return in your child patron's page. c) Click on "Notice" and you should see a letter. d) Click on the letter to see the content. c) Notice that you can't see the guarantor's informations (Adult patron). d) Apply the patch. e) Repeat steps a) to d) f) Notice that you can see the guarantor's informations. This also works if you decide to add a non-patron guarantor instead of a patron guarantor at step 3. NOTE: If you want to delete the letters, go in your database and run: - delete from message_queue; Signed-off-by: Marius Mandrescu <marius.mandrescu@inLibro.com> Current patch-complexity: Small patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28556 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@ptfs-europe | |.com --- Comment #8 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- You realise you can already use ALL object methods in TT based notices right? So anywhere you have a patron in a notice you can use the relations to get at the guarantors. I'm not sure we need to add the boiler code here to support this.. we're trying to clean up these scripts and then simplify/clarify the pickers in the medium to long term. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28556 --- Comment #9 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- [% FOREACH guarantor_relation IN patron.guarantor_relatuonships %] [% SET guarantor = guarantor_relation.guarantor %] [% guarantor.firstname | html %] [% END %] -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28556 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=12532 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28556 --- Comment #10 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Improving the notice creation tools and migrating all notices to TT so we can deprecate the older custom syntaxes was on the roadmaps for at least three cycles, but it's not a one person job and didn't get the uptake from people... I'd rather see effort shared and pushed in that direction that adding more old style code and hacks on top like this I'm afraid. This gets a downvote from me. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28556 Eric Bégin <eric.begin@inLibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC|the-minh.luong@inlibro.com |eric.begin@inLibro.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28556 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |WORKSFORME Status|Needs Signoff |RESOLVED --- Comment #11 from Lucas Gass <lucas@bywatersolutions.com> --- After testing I can confirm that Martin is correct, this is alreay doable. Have a look these 2 subroutines in Patron.pm to see how: sub guarantor_relationships sub guarantee_relationships and if you want to get fines for guarantors or guarantees see: sub relationships_debt I am marking this one as RESOLVED = WORKSFORME -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org