serials: copy templates need dropdown menus for age protect and circ as type fields

Bug #1075401 reported by Kathy Lussier on 2012-11-06
This bug affects 4 people
Affects Status Importance Assigned to Milestone

Bug Description

Evergreen version 2.3

The copy templates editor for serials provides text boxes for the age protect and circ as type fields. These fields should really be dropdown menus allowing users to select the age protection options available on their system and to select circ as type options, which are difficult for the average user to remember.

Changed in evergreen:
status: New → Triaged
importance: Undecided → Wishlist
Jennifer Pringle (jpringle-u) wrote :

I agree, our average user is not going to remember what text to put into these fields.

Andrea Neiman (aneiman) wrote :

Still seeing this in 2.10

Changed in evergreen:
status: Triaged → Confirmed
Michele Morgan (mmorgan) wrote :

This bug still exists in 2.12 in both the xul and web clients.

Michele Morgan (mmorgan) on 2017-04-10
Changed in evergreen:
assignee: nobody → Michele Morgan (mmorgan)
Michele Morgan (mmorgan) wrote :

Fix pushed to:;a=shortlog;h=refs/heads/user/mmorgan/LP_1075401_Populate_age_protect_and_circ_as_type_fields_in_serials_template

This changes the fm_IDL.xml entries for age_protect and circ_as_type fields to links, which provides the dropdowns for the fields in both the web and xul clients.

Targeting to 2.12.1

tags: added: pullrequest
Changed in evergreen:
milestone: none → 2.12.1
assignee: Michele Morgan (mmorgan) → nobody
Changed in evergreen:
milestone: 2.12.1 → 2.12.2
Galen Charlton (gmc) wrote :

I've reviewed the patch. The patch itself works fine when asset.copy_template has valid values in age_protect and circ_as_type: the age protect / circ as type columns in the grid display the names, and the dialog uses drop-downs for selecting values.

However, any existing copy templates that have invalid values in either of those two columns will break the grid. In particular, once it hits a row where age_protect/circ_as_type is not null but doesn't contain the ID of a related row in the config.* table, the grid will stop rendering.

Consequently, I think there will also need an upgrade script that checks for whether data cleanup is needed, similar to commit c40982ee3a6b for bug 1552861. However, rather than deleting invalid copy templates, it should probably just set age_protect / circ_as_type to NULL as needed (and report that it has done so.)

Changed in evergreen:
milestone: 2.12.2 → 2.12.3
Changed in evergreen:
milestone: 2.12.3 → 2.12.4
Michele Morgan (mmorgan) wrote :

I added an upgrade script to nullify invalid values in existing templates as Galen suggested and forced pushed to the same branch.

Changed in evergreen:
assignee: nobody → Josh Stompro (u-launchpad-stompro-org)
status: Confirmed → In Progress

I created two serial copy templates and then changed the "Age Hold protect" and "Circ as type" to invalid values.

update asset.copy_template set circ_as_type='zzz', age_protect=1000 where id=1;
update asset.copy_template set circ_as_type='blee', age_protect=1001 where id=2;

After those changes, I can see that the grid in the serial copy template editor no longer loads.

Then I ran the upgrade script and it seemed to work, with a strange requirement that I click the back link in the grid to get them to show up. I also noticed that the floating group field is displaying the id number and not the name in the editing view. And in the grid view the Owning Lib, Loan Duration, Fine Level, and Floating Group are shown as the ID numbers and not as the linked values.

I see how to fix the Owning Lib from looking at another admin interface that does it.

The upgrade script doesn't let you know which templates were updated. Adding some returning output should solve that. I'll create a new branch to share with a few changes.


Michele, I made some changes to your branch -;a=shortlog;h=refs/heads/user/stompro/LP_1075401_Populate_age_protect_and_circ_as_type_fields_in_serials_template

1. Changed the reporter:datatype to org_unit for the owning_lib and circ_lib. That seems to trigger the autogrid to display the shortname instead of the

2. Changed the config.floating_group cfg definition so that the reporter.selector value is set to name for the id field. This causes the autogrid to use the display name for choosing the floating group.

3. Expanded on the upgrade script so that the name and owning_lib are displayed for any templates that have their values updated.


Changed in evergreen:
status: In Progress → Confirmed
assignee: Josh Stompro (u-launchpad-stompro-org) → nobody
Changed in evergreen:
milestone: 2.12.4 → 2.12.5
Galen Charlton (gmc) on 2017-08-07
Changed in evergreen:
assignee: nobody → Galen Charlton (gmc)
Kathy Lussier (klussier) on 2017-08-07
tags: added: xulclient
Galen Charlton (gmc) on 2017-08-07
Changed in evergreen:
milestone: 2.12.5 → 3.0-alpha
Galen Charlton (gmc) wrote :

Pushed to master for inclusion in 3.0. Thanks, Michele and Josh!

Changed in evergreen:
status: Confirmed → Fix Committed
assignee: Galen Charlton (gmc) → nobody
Changed in evergreen:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers