Bug 21208

Summary: Housebound deliverer/chooser have wrong name when creating a visit
Product: Koha Reporter: Caroline Cyr La Rose <caroline.cyr-la-rose>
Component: PatronsAssignee: Jonathan Druart <jonathan.druart>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: major    
Priority: P5 - low CC: fridolin.somers, gmcharlt, jonathan.druart, kyle.m.hall, martin.renvoize, nick
Version: master   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on: 18403    
Bug Blocks:    
Attachments: Bug 21208: Fix housebound deliverer/chooser names
Bug 21208: Fix housebound deliverer/chooser names

Description Caroline Cyr La Rose 2018-08-10 19:41:10 UTC
When creating a housebound visit, the names of the chooser and deliverer are the same as the housebound patron (even though the housebound patron does not have chooser and deliverer roles).

To reproduce :

1- Make sure HouseboundModule is enabled in system preferences
2- Go to a patron file (Patron A)
3- Edit this patron's housebound roles to Chooser
4- Go to another patron file (Patron B)
5- Edit this patron's housebound roles to Deliverer
6- Go to a third patron's file (Patron C)
7- Go to the Housebound tab
8- Fill out the housebound profile for Patron c
9- Click on "Add a new delivery"
10- Fill out day and time
11- Check the Chooser drop down, notice the only choice is Patron C and not Patron A, choose Patron C anyway
12- Check the Deliverer drop down, notice the only choice is Patron C and not Patron B, choose Patron C anyway
13- Save the delivery
14- Notice the Chooser and Deliverer are both Patron C
15- Click on the name of the Chooser, it goes to Patron A's file
16- Go back and click on the name of the Deliverer, it goes to Patron B's file
Comment 1 Jonathan Druart 2018-08-10 20:39:05 UTC
Caused by:
  commit 5f80977875ff124d411f2cd89de4a944fa9c27af
  Bug 18403: Use patron-title.inc when hidepatronname is used
Comment 2 Jonathan Druart 2018-08-10 20:42:32 UTC
Created attachment 77717 [details] [review]
Bug 21208: Fix housebound deliverer/chooser names

When creating a housebound visit, the names of the chooser and deliverer are the
same as the housebound patron (even though the housebound patron does not have
chooser and deliverer roles).

It has been caused by:
  commit 5f80977875ff124d411f2cd89de4a944fa9c27af
  Bug 18403: Use patron-title.inc when hidepatronname is used
patron-title.inc now starts looking for a variable named "patron", which exists in
members/housebound.
A better fix could be to renamed this "patron" variable tested by
patron-title.inc, but at first glance it's the only place this issue
exists.

Test plan:
1- Make sure HouseboundModule is enabled in system preferences
2- Go to a patron file (Patron A)
3- Edit this patron's housebound roles to Chooser
4- Go to another patron file (Patron B)
5- Edit this patron's housebound roles to Deliverer
6- Go to a third patron's file (Patron C)
7- Go to the Housebound tab
8- Fill out the housebound profile for Patron c
9- Click on "Add a new delivery"
10- Fill out day and time
11- Check the Chooser drop down
12- Check the Deliverer drop down
13- Save the delivery
14- Notice the Chooser and Deliverer names are correct
15- Click on the name of the Chooser, it goes to Patron A's file
16- Go back and click on the name of the Deliverer, it goes to Patron B's file
Comment 3 Caroline Cyr La Rose 2018-08-10 20:59:21 UTC
Names are displaying fine now!
Comment 4 Katrin Fischer 2018-08-12 15:42:51 UTC
Created attachment 77728 [details] [review]
Bug 21208: Fix housebound deliverer/chooser names

When creating a housebound visit, the names of the chooser and deliverer are the
same as the housebound patron (even though the housebound patron does not have
chooser and deliverer roles).

It has been caused by:
  commit 5f80977875ff124d411f2cd89de4a944fa9c27af
  Bug 18403: Use patron-title.inc when hidepatronname is used
patron-title.inc now starts looking for a variable named "patron", which exists in
members/housebound.
A better fix could be to renamed this "patron" variable tested by
patron-title.inc, but at first glance it's the only place this issue
exists.

Test plan:
1- Make sure HouseboundModule is enabled in system preferences
2- Go to a patron file (Patron A)
3- Edit this patron's housebound roles to Chooser
4- Go to another patron file (Patron B)
5- Edit this patron's housebound roles to Deliverer
6- Go to a third patron's file (Patron C)
7- Go to the Housebound tab
8- Fill out the housebound profile for Patron c
9- Click on "Add a new delivery"
10- Fill out day and time
11- Check the Chooser drop down
12- Check the Deliverer drop down
13- Save the delivery
14- Notice the Chooser and Deliverer names are correct
15- Click on the name of the Chooser, it goes to Patron A's file
16- Go back and click on the name of the Deliverer, it goes to Patron B's file

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 5 Nick Clemens 2018-08-14 12:57:05 UTC
Awesome work all!

Pushed to master for 18.11
Comment 6 Martin Renvoize 2018-08-16 09:51:05 UTC
Pushed to 18.05.x for 18.05.03
Comment 7 Fridolin Somers 2018-08-28 13:25:08 UTC
Depends on Bug 18403 not in 17.11.x