Bug 19129 - Clean up templates for organisation patrons in staff
Summary: Clean up templates for organisation patrons in staff
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Patrons (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Katrin Fischer
QA Contact: Kyle M Hall
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-08-16 15:45 UTC by Francois Charbonnier
Modified: 2018-06-04 20:10 UTC (History)
6 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:


Attachments
Bug 19129 - Clean up Details tab for Organisation patrons (10.28 KB, patch)
2017-08-17 21:28 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 19129 - Clean up Details tab for Organisation patrons (11.89 KB, patch)
2017-08-17 21:39 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 19129 - Clean up Details tab for Organisation patrons (12.11 KB, patch)
2017-08-17 22:21 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 19129 - Follow-up - Add changes to patron duplicate warning (4.45 KB, patch)
2017-08-17 22:21 UTC, Katrin Fischer
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 19129 - Clean up Details tab for Organisation patrons (12.18 KB, patch)
2017-08-20 23:46 UTC, Aleisha Amohia
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 19129 - Follow-up - Add changes to patron duplicate warning (4.52 KB, patch)
2017-08-20 23:47 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 19129 - Clean up Details tab for Organisation patrons (12.23 KB, patch)
2017-09-01 11:42 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 19129 - Follow-up - Add changes to patron duplicate warning (4.56 KB, patch)
2017-09-01 11:42 UTC, Kyle M Hall
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Francois Charbonnier 2017-08-16 15:45:25 UTC
I noticed this on 16.05 and 16.11.

If a patron categorycode is I, the patron detail page is broken.

Test plan :

1. Create a a new patron category. Use "I" as a category code.
2. Go to patron detail page
3. Change the patron category for this new one. Save.
4. The patron detail page is broken.
Comment 1 Katrin Fischer 2017-08-17 20:12:17 UTC
I think there might be a confusion of variables - I is also the code for the category type of Institutional = Organisation patrons. I will investigate a bit.
Comment 2 Katrin Fischer 2017-08-17 21:28:55 UTC
Created attachment 66152 [details] [review]
Bug 19129 - Clean up Details tab for Organisation patrons

Problem: A patron category "I" would cause display problems
on the details in the intranet. This is because the templates
confused patron category "I" with patron type "I" (organisation).

Patch:
- Cleans up variable confusion by introducint a new
  variable 'is_organisation' instead of using 'I'.
- The template contained code to change the labels below
  the address to 'Organisational phone:" etc., I have removed
  this part as it does not match the edit form anymore.
- Initials, date of birth and gender are still hidden for
  organisation - matching the edit form.

Bonus:
- The patron category description was missing on the
  right and left side of the details tab. Now it displays.
- Fixes some html issues:
  - doubled up class attribute in a tag
  - doubled up </li></li>

To test:
- Create 3 patrons
  - patron category code doesn't matter, but category type organisation
  - patron category code 'I', category type NOT organisation
  - patron category code NOT I, category type NOT organisaton
- Check details tab in patron account in staff for all 3
  - Verify patron category description shows correctly
  - Verify information added to the account displays correctly
    (phone numbers, emails, ...)
Comment 3 Katrin Fischer 2017-08-17 21:39:32 UTC
Created attachment 66153 [details] [review]
Bug 19129 - Clean up Details tab for Organisation patrons

Problem: A patron category "I" would cause display problems
on the details in the intranet. This is because the templates
confused patron category "I" with patron type "I" (organisation).

Patch:
- Cleans up variable confusion by introducint a new
  variable 'is_organisation' instead of using 'I'.
- The template contained code to change the labels below
  the address to 'Organisational phone:" etc., I have removed
  this part as it does not match the edit form anymore.
- Initials, date of birth and gender are still hidden for
  organisation - matching the edit form.

Bonus:
- The patron category description was missing on the
  right and left side of the details tab. Now it displays.
- Fixes some html issues:
  - doubled up class attribute in a tag
  - doubled up </li></li>

To test:
- Create 3 patrons
  - patron category code doesn't matter, but category type organisation
  - patron category code 'I', category type NOT organisation
  - patron category code NOT I, category type NOT organisaton
- Check details tab in patron account in staff for all 3
  - Verify patron category description shows correctly
  - Verify information added to the account displays correctly
    (phone numbers, emails, ...)
Comment 4 Katrin Fischer 2017-08-17 22:21:16 UTC
Created attachment 66155 [details] [review]
Bug 19129 - Clean up Details tab for Organisation patrons

Problem: A patron category "I" would cause display problems
on the details in the intranet. This is because the templates
confused patron category "I" with patron type "I" (organisation).

Patch:
- Cleans up variable confusion between categorycode and
  categorytype.
- The template contained code to change the labels below
  the address to 'Organisational phone:" etc., I have removed
  this part as it does not match the edit form anymore.
- Initials, date of birth and gender are still hidden for
  organisation - matching the edit form.

Bonus:
- The patron category description was missing on the
  right and left side of the details tab. Now it displays.
- Fixes some html issues:
  - doubled up class attribute in a tag
  - doubled up </li></li>

To test:
- Create 3 patrons
  - patron category code doesn't matter, but category type organisation
  - patron category code 'I', category type NOT organisation
  - patron category code NOT I, category type NOT organisaton
- Check details tab in patron account in staff for all 3
  - Verify patron category description shows correctly
  - Verify information added to the account displays correctly
    (phone numbers, emails, ...)
Comment 5 Katrin Fischer 2017-08-17 22:21:20 UTC
Created attachment 66156 [details] [review]
Bug 19129 - Follow-up - Add changes to patron duplicate warning

Adds logic from the previous fix to the brief patron summary
shown when checking a possible patron duplicate.

Bonus: Also fixes missing patron category description there.

To Test:
- Add 2 patrons
- Add a patron with the same surname and firstname as an
  existing patron in order to trigger the duplicate message
- Click "View existing patron"
- Verify display is correct when existing patron is
  - an organisation
  - not an organisation
- Verify that the patron category description shows
Comment 6 Aleisha Amohia 2017-08-20 23:46:32 UTC
Created attachment 66257 [details] [review]
[SIGNED-OFF] Bug 19129 - Clean up Details tab for Organisation patrons

Problem: A patron category "I" would cause display problems
on the details in the intranet. This is because the templates
confused patron category "I" with patron type "I" (organisation).

Patch:
- Cleans up variable confusion between categorycode and
  categorytype.
- The template contained code to change the labels below
  the address to 'Organisational phone:" etc., I have removed
  this part as it does not match the edit form anymore.
- Initials, date of birth and gender are still hidden for
  organisation - matching the edit form.

Bonus:
- The patron category description was missing on the
  right and left side of the details tab. Now it displays.
- Fixes some html issues:
  - doubled up class attribute in a tag
  - doubled up </li></li>

To test:
- Create 3 patrons
  - patron category code doesn't matter, but category type organisation
  - patron category code 'I', category type NOT organisation
  - patron category code NOT I, category type NOT organisaton
- Check details tab in patron account in staff for all 3
  - Verify patron category description shows correctly
  - Verify information added to the account displays correctly
    (phone numbers, emails, ...)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
Comment 7 Aleisha Amohia 2017-08-20 23:47:23 UTC
Created attachment 66258 [details] [review]
[SIGNED-OFF] Bug 19129 - Follow-up - Add changes to patron duplicate warning

Adds logic from the previous fix to the brief patron summary
shown when checking a possible patron duplicate.

Bonus: Also fixes missing patron category description there.

To Test:
- Add 2 patrons
- Add a patron with the same surname and firstname as an
  existing patron in order to trigger the duplicate message
- Click "View existing patron"
- Verify display is correct when existing patron is
  - an organisation
  - not an organisation
- Verify that the patron category description shows

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
Comment 8 Kyle M Hall 2017-09-01 11:42:20 UTC
Created attachment 66713 [details] [review]
Bug 19129 - Clean up Details tab for Organisation patrons

Problem: A patron category "I" would cause display problems
on the details in the intranet. This is because the templates
confused patron category "I" with patron type "I" (organisation).

Patch:
- Cleans up variable confusion between categorycode and
  categorytype.
- The template contained code to change the labels below
  the address to 'Organisational phone:" etc., I have removed
  this part as it does not match the edit form anymore.
- Initials, date of birth and gender are still hidden for
  organisation - matching the edit form.

Bonus:
- The patron category description was missing on the
  right and left side of the details tab. Now it displays.
- Fixes some html issues:
  - doubled up class attribute in a tag
  - doubled up </li></li>

To test:
- Create 3 patrons
  - patron category code doesn't matter, but category type organisation
  - patron category code 'I', category type NOT organisation
  - patron category code NOT I, category type NOT organisaton
- Check details tab in patron account in staff for all 3
  - Verify patron category description shows correctly
  - Verify information added to the account displays correctly
    (phone numbers, emails, ...)

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 9 Kyle M Hall 2017-09-01 11:42:28 UTC
Created attachment 66714 [details] [review]
Bug 19129 - Follow-up - Add changes to patron duplicate warning

Adds logic from the previous fix to the brief patron summary
shown when checking a possible patron duplicate.

Bonus: Also fixes missing patron category description there.

To Test:
- Add 2 patrons
- Add a patron with the same surname and firstname as an
  existing patron in order to trigger the duplicate message
- Click "View existing patron"
- Verify display is correct when existing patron is
  - an organisation
  - not an organisation
- Verify that the patron category description shows

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 10 Jonathan Druart 2017-09-01 16:08:52 UTC
Pushed to master for 17.11, thanks to everybody involved!
Comment 11 Fridolin Somers 2017-10-03 09:08:58 UTC
Pushed to 17.05.x, will be in 17.05.05.
Comment 12 Katrin Fischer 2017-10-05 21:30:32 UTC
Doesn't apply cleanly - will need more work.
Comment 13 Katrin Fischer 2017-11-15 20:33:57 UTC
I don't have the time to rebase patches for 16.11.x. Closing.