Comment 5 for bug 1075401

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.)