Comment 14 for bug 1730758

Revision history for this message
Kathy Lussier (klussier) wrote :

Thanks Mike! After some continued digging, I think my initial assessment of the bib source problem was wrong.

I think biblo.record_entry.vis_attr_vector was updating when the record saved, but the problem was actually that biblo.record_entry.vis_attr_vector updates before the source updates. The vector, therefore, is based on the previous value in the source field, not on the new one that's being applied.

In my original testing, I probably only edited each record once. It therefore appeared as if the value wasn't changing but it was just calculating the visibility based on the wrong information. In the case of the Concerto records, it was looking at the old null value in the source field and maintained the null value in the vis_attr_vector field. When I tested it on the upgraded database, the vis_attr_vector stayed the same because the calculation was using the same source that was on the record during the upgrade.

I applied the changes from your new branch, and this problem continues. On my test record, I did the following:
1. Changed the bib source of a record from oclc to gutenberg. vis_attr_vector updated to {268435457}
2. Running the biblo.calculate_bib_visibility_attribute_set function against that same record, I get {268435459}
3. I then changed the bib source of the same record to local system. vis_attr_vector updated to {268435459} (the result we got when running the calculation with the previous source.)

If you continue changing the source, you'll continue to see the same pattern.