Bug 17384 - Categories do not display in patron editing form if they have only one category assigned
Summary: Categories do not display in patron editing form if they have only one catego...
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Patrons (show other bugs)
Version: Main
Hardware: All All
: P1 - high major (vote)
Assignee: Marc Véron
QA Contact: Testopia
URL:
Keywords:
Depends on: 15407
Blocks:
  Show dependency treegraph
 
Reported: 2016-09-30 15:07 UTC by Marc Véron
Modified: 2019-06-27 09:24 UTC (History)
4 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 17384 - Categories do not display in patron editing form if they have only one category assigned (1.83 KB, patch)
2016-09-30 16:07 UTC, Marc Véron
Details | Diff | Splinter Review
Bug 17384 - Categories do not display in patron editing form if they have only one category assigned (1.89 KB, patch)
2016-10-02 05:36 UTC, Chris Cormack
Details | Diff | Splinter Review
Bug 17384 - Categories do not display in patron editing form if they have only one category assigned (1.96 KB, patch)
2016-10-03 11:37 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Marc Véron 2016-09-30 15:07:04 UTC
To reproduce:

- Try to edit an existing patron with category Staff (category type Staff), or try to create a patron with such category
- Verify that the category drop down does not have any category of category type Staff.

This happens on current master (Koha version: 16.06.00.031)
Comment 1 Marc Véron 2016-09-30 15:31:24 UTC
New way to reproduce:

- Go to Home > Administration > Patron categories
- Make sure that you have only one category for a category type.
  Examples: Only one category "Staff" for category type "Staff" or
  Only one category "Library" for category type "Org."
- Edit a patron or create a new patron
- Verify that categories of examples above do not show up in category drop down
- Go back to Home > Administration > Patron categories and add categories to
  both category types 
- Edit or create a new patron. Veryfy that categories show up in dropdown.
Comment 2 Marc Véron 2016-09-30 16:07:43 UTC
Created attachment 55962 [details] [review]
Bug 17384 - Categories do not display in patron editing form if they have only one category assigned

To reproduce:
- Go to Home > Administration > Patron categories
- Make sure that you have only one category for a category type.
  Examples: Only one category "Staff" for category type "Staff" or
  Only one category "Library" for category type "Org."
- Edit a patron or create a new patron
- Verify that categories of examples above do not show up in category drop down
- Go back to Home > Administration > Patron categories and add categories to
  both category types
- Edit or create a new patron. Veryfy that categories show up in dropdown.

To test:
- Apply patch
- Make sure you have a category type with only one category assigned
  (e.g. category taype Staff with category Staff)
- Edit a patron or create a new patron. Verify that the category
  shows up in categroy drop down.

- Additional test: Verify that template param 'catcode' from removed line
  is not used in template memberentrygen.tt
Comment 3 Chris Cormack 2016-10-02 05:36:55 UTC
Created attachment 55966 [details] [review]
Bug 17384 - Categories do not display in patron editing form if they have only one category assigned

To reproduce:
- Go to Home > Administration > Patron categories
- Make sure that you have only one category for a category type.
  Examples: Only one category "Staff" for category type "Staff" or
  Only one category "Library" for category type "Org."
- Edit a patron or create a new patron
- Verify that categories of examples above do not show up in category drop down
- Go back to Home > Administration > Patron categories and add categories to
  both category types
- Edit or create a new patron. Veryfy that categories show up in dropdown.

To test:
- Apply patch
- Make sure you have a category type with only one category assigned
  (e.g. category taype Staff with category Staff)
- Edit a patron or create a new patron. Verify that the category
  shows up in categroy drop down.

- Additional test: Verify that template param 'catcode' from removed line
  is not used in template memberentrygen.tt

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Comment 4 Jonathan Druart 2016-10-03 11:37:09 UTC
Created attachment 55973 [details] [review]
Bug 17384 - Categories do not display in patron editing form if they have only one category assigned

To reproduce:
- Go to Home > Administration > Patron categories
- Make sure that you have only one category for a category type.
  Examples: Only one category "Staff" for category type "Staff" or
  Only one category "Library" for category type "Org."
- Edit a patron or create a new patron
- Verify that categories of examples above do not show up in category drop down
- Go back to Home > Administration > Patron categories and add categories to
  both category types
- Edit or create a new patron. Veryfy that categories show up in dropdown.

To test:
- Apply patch
- Make sure you have a category type with only one category assigned
  (e.g. category taype Staff with category Staff)
- Edit a patron or create a new patron. Verify that the category
  shows up in categroy drop down.

- Additional test: Verify that template param 'catcode' from removed line
  is not used in template memberentrygen.tt

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 5 Jonathan Druart 2016-10-03 11:38:44 UTC
Caused by:
  commit cae4b980607be083e5e0fb163c4949c73d6347db
    Bug 15407: Koha::Patron::Categories - replace GetborCatFromCatType

Really weird line, I guess it's a leftover debug line I put to understand this part of code.

Thanks for fixing it!
Comment 6 Brendan Gallagher 2016-10-10 10:02:35 UTC
Pushed to Master - Should be in the November Release 16.11 - Thanks!