Summary: | Display of housebound delivery information broken by Bug 13618 | ||
---|---|---|---|
Product: | Koha | Reporter: | Owen Leonard <oleonard> |
Component: | Circulation | Assignee: | Owen Leonard <oleonard> |
Status: | CLOSED FIXED | QA Contact: | Marcel de Rooy <m.de.rooy> |
Severity: | major | ||
Priority: | P5 - low | CC: | gmcharlt, jonathan.druart, kyle.m.hall, m.de.rooy, nick, testopia |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
GIT URL: | Change sponsored?: | --- | |
Patch complexity: | Trivial patch | Documentation contact: | |
Documentation submission: | Text to go in the release notes: | ||
Version(s) released in: | Circulation function: | ||
Bug Depends on: | 13618 | ||
Bug Blocks: | |||
Attachments: |
Bug 21293: Display of housebound delivery information broken by Bug 13618
Bug 21293: Display of housebound delivery information broken by Bug 13618 Bug 21293: Remove another misplaced html filter on housebound.tt Bug 21293: Display of housebound delivery information broken by Bug 13618 Bug 21293: Remove another misplaced html filter on housebound.tt |
Description
Owen Leonard
2018-08-30 16:42:33 UTC
Created attachment 78314 [details] [review] Bug 21293: Display of housebound delivery information broken by Bug 13618 This patch corrects the patron housebound details template. A stray "html" filter broke display of delivery information. To test, apply the patch and enable the HouseboundModule system preference. - Open a patron record and select the "Housebound" tab in the left-hand navigation menu. - Click "Add a new deliver" and save some delivery details. - Upon saving you should be directed back to the housebound details page. All the details of the delivery you saved should appear correctly. Created attachment 78341 [details] [review] Bug 21293: Display of housebound delivery information broken by Bug 13618 This patch corrects the patron housebound details template. A stray "html" filter broke display of delivery information. To test, apply the patch and enable the HouseboundModule system preference. - Open a patron record and select the "Housebound" tab in the left-hand navigation menu. - Click "Add a new deliver" and save some delivery details. - Upon saving you should be directed back to the housebound details page. All the details of the delivery you saved should appear correctly. Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Created attachment 78342 [details] [review] Bug 21293: Remove another misplaced html filter on housebound.tt Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> QA: Looking here Created attachment 78640 [details] [review] Bug 21293: Display of housebound delivery information broken by Bug 13618 This patch corrects the patron housebound details template. A stray "html" filter broke display of delivery information. To test, apply the patch and enable the HouseboundModule system preference. - Open a patron record and select the "Housebound" tab in the left-hand navigation menu. - Click "Add a new deliver" and save some delivery details. - Upon saving you should be directed back to the housebound details page. All the details of the delivery you saved should appear correctly. Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Created attachment 78641 [details] [review] Bug 21293: Remove another misplaced html filter on housebound.tt Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Some testing told me: A construction with an assignment and a filter may be dangerous. Like this one: [% test = housebound_profile.housebound_visits | html %] housebound_profile is an object; visits is the returned arrayref. Somehow, the html filter in TT makes that template var test becomes the string ARRAY(..) instead of an array. In the second patch we remove the filter from [% hpd = housebound_profile.day | html %] This is less problematic, since day is a string already. Lesson: All occurrences of [% var = something | html %] are error prone. If something is not a string, but an object, array, hash etc., we are in trouble. This probably needs more attention since we are passing objects to templates in more scripts. (In reply to Marcel de Rooy from comment #7) > Lesson: > All occurrences of [% var = something | html %] are error prone. If > something is not a string, but an object, array, hash etc., we are in > trouble. > This probably needs more attention since we are passing objects to templates > in more scripts. Yes, that's a problem the script did not spot/handle. I searched for other occurrences but did not find any. Awesome work all! Pushed to master for 18.11 |