While it was fairly harmless to not be able to set an ident_type2
value in the webstaff editor, the way things worked out if a user
had one set from the XUL client or direct manipulation an attempt
to save such a user would crash the cstore backend.
To test
-------
[1] Use the patron editor to edit a patron that has a value set
for ident_value2. Save a change, but note that nothing is
displayed and that eventually an open-ils.cstore error is
reported in the browser console.
[2] Apply the patch and repeat step 1. This time, the patron
editor will display the secondary identification type field
and allow you to save changes to the record.
Signed-off-by: Jason Boyer <JBoyer@library.in.gov>
Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
</div>
</div>
+<!-- ident_type2 -->
+
+<div class="row reg-field-row" ng-show="show_field('au.ident_type2')">
+ [% draw_field_label('au', 'ident_type2') %]
+ <div class="col-md-3 reg-field-input">
+ <select
+ class="form-control"
+ ng-model="patron.ident_type2"
+ ng-required="field_required('au', 'ident_type2')"
+ ng-blur="handle_field_changed(patron, 'ident_type2')"
+ ng-options="type.name() for type in ident_types track by type.id()">
+ </select>
+ </div>
+</div>
+
<!-- IDENT_VALUE2 -->
<div class="row reg-field-row" ng-show="show_field('au.ident_value2')">
[% draw_field_label('au', 'ident_value2') %]
patron.profile = current.profile(); // pre-hash version
patron.net_access_level = current.net_access_level();
patron.ident_type = current.ident_type();
+ patron.ident_type2 = current.ident_type2();
patron.groups = current.groups(); // pre-hash
angular.forEach(
if (user.profile) user.profile = egCore.env.pgt.map[user.profile];
if (user.ident_type)
user.ident_type = egCore.env.cit.map[user.ident_type];
+ if (user.ident_type2)
+ user.ident_type2 = egCore.env.cit.map[user.ident_type2];
user.dob = service.parse_dob(user.dob);
// Clear the usrname if it looks like a UUID
'au.first_given_name' : 3,
'au.family_name' : 3,
'au.ident_type' : 3,
+ 'au.ident_type2' : 2,
'au.home_ou' : 3,
'au.profile' : 3,
'au.expire_date' : 3,