Patron Registration: Primary Identification Type should be hidden when Primary Identification is hidden

Bug #1631005 reported by Josh Stompro
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Evergreen
New
Undecided
Unassigned

Bug Description

EG 2.10.6

Patron Registration: XUL Client and I tested with the web client at https://demo.evergreencatalog.com/eg/staff

We don't make any use of the Primary Identification field. When the YAOUS for "Show ident_value field on patron registration" is set to false to hide the "Primary Identification" field, the "Primary Identification Type" should also be hidden.

Currently there doesn't seem to be a way to not show it. It doesn't make sense to me to show just the type field when the entry field is hidden.

Josh

tags: added: patron webstaffclient
Revision history for this message
Josh Stompro (u-launchpad-stompro-org) wrote :

EG 3.3 - Web client

There seems to be a very simple way to address this in the web client.

In templates/staff/circ/patron/t_edit.tt2

Set the show_field() for the ident_type to look at the au.ident_value field for visibility info. So if the ident_value field is shown, then show the ident_type field also.

This assumes that the ident_value and ident_type fields are supposed to be used together. If many sites use the behavior of only wanting the ident_type and ident_type2 dropdowns to show without the ident_value fields, then this won't fly. Maybe sites want to make note of what type of ID was shown, but not actually record anything about it?

If that is the case, then the org unit settings for showing, requiring and suggesting ident_type and ident_type2 need to be plumbed in.
'ui.patron.edit.au.ident_type.show',
'ui.patron.edit.au.ident_type.require',
'ui.patron.edit.au.ident_type.suggest',
'ui.patron.edit.au.ident2_type.show',
'ui.patron.edit.au.ident2_type.require',
'ui.patron.edit.au.ident2_type.suggest',

Working branch that ties the ident_type and ident_type2 to the ident_value and ident_value2 visibility settings is at: user/stompro/lp1631005_ident_type_visibility
https://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/stompro/lp1631005_ident_type_visibility

Josh

tags: added: pullrequest
removed: webstaffclient
Revision history for this message
Dawn Dale (ddale) wrote :

Using concerto data on https://kcls-icelandic.catalystdev.works/eg/staff/, I set "Show ident_value field on patron registration" to false. The identification fields are still showing on the patron registration page.

Revision history for this message
Josh Stompro (u-launchpad-stompro-org) wrote :

Dawn, I think the issue may have been that another library setting is needed to test this one.

I think the patron registration screen shows all fields by default, so the settings in question will have no effect.

But if you set the following library setting to true, then it seems to work.
"Default showing suggested patron registration fields"

I changed that setting on the server you mentioned, and now the ident fields are not shown for me. I had to log off and log on, must be that new settings caching feature that I'm not used to.

I have a memory of one other issue, but I'm not sure I'm remembering all the details.
au.ident_type is also a required field... I think it is required in the database... so it has to have a value. So you may also need to have the library setting for the "Default Ident Type for Patron Registration" library setting.

Josh

Revision history for this message
Josh Stompro (u-launchpad-stompro-org) wrote :

I just double checked and the "Default Ident Type for Patron Registration" is required for this all to work. I set that also. I also changed the email field to being suggested and not required since it seems like it is required by default, but not suggested (That seems like a different bug). Now I can create users on the mentioned test server now.

Josh

Revision history for this message
Jennifer Pringle (jpringle-u) wrote :

I set the following library settings:
Default showing suggested patron registration fields - True
Default Ident Type for Patron Registration - Other
Show ident_value field on patron registration - False

When I look at the patron registration (which defaults to Suggested Fields as expected) the Primary Identification Type field is hidden as expected. It appears when you switch to All Fields (also as expected).

However, the Secondary Identification Type field is also hidden when looking at Suggested Fields. The library setting for "Show ident_value2 field on patron registration" is currently unset. I tested with the same settings on the 3.7.0 community server and without this fix applied both the Primary Identification Type and Secondary Identification Type display when looking at Suggested Fields so I would expect that the Secondary Identification Type would continue to display unless the "Show ident_value2 field on patron registration" setting is set to False.

Revision history for this message
Terran McCanna (tmccanna) wrote :

I can confirm the behavior that Jennifer reported in comment 5 - prior to the fix, the behavior for both fields defaulted to true if a value wasn't explicitly set, and after the change they defaulted to false.

I don't have a strong opinion on changing the default behavior or not, but if it were to change then it would need to be spelled out in the release notes and the setting description so that libraries doing upgrades would be aware of it.

Revision history for this message
Terran McCanna (tmccanna) wrote :

Another option would be to add SQL so that at upgrade time, all of the NULL values were set to true.

Revision history for this message
Terran McCanna (tmccanna) wrote :

Never mind, with org unit settings the rows don't exist in that case.

Revision history for this message
Josh Stompro (u-launchpad-stompro-org) wrote :

Note: try adding in the ident_value and ident_value2 into the default_field_visibility data structure to see if that fixes the issue.

https://git.evergreen-ils.org/?p=Evergreen.git;a=blob;f=Open-ILS/web/js/ui/default/staff/circ/patron/regctl.js;hb=60fb007312c9cd3b88f4be9af3c68621a6df5a22#l1557

Revision history for this message
Terran McCanna (tmccanna) wrote :

Removing pullrequest as this still needs a little tweaking.

tags: added: needsrepatch
removed: pullrequest
tags: added: needswork
removed: needsrepatch
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.