Bug #9283

Reference code shown incorrectly in browse/search after editing record

Added by Mike Gale over 6 years ago. Updated over 6 years ago.

Status:VerifiedStart date:01/11/2016
Priority:MediumDue date:
Assignee:Dan Gillean% Done:

0%

Category:Search / Browse
Target version:Release 2.3.0
Google Code Legacy ID: Tested version:
Sponsored:No Requires documentation:

Description

Sometimes if we have inherited reference codes set to "yes", and edit a child description, the reference code in browse/search will not show the fully inherited reference code anymore.

To reproduce:
  1. Ensure inherit reference code is set to "yes" in admin->settings
  2. Create a repository with an identifier/country code set
  3. Create an archival description, set its identifier, and set the repository to the one in step 1
  4. Create a child archival description for the above description, set an identifier
  5. Note in browse/search the child archival description above should properly show the inherited reference code in the results (don't forget to uncheck top level descriptions only filter)
  6. Now go edit the child description (can change pretty much anything)

Result: now in browse/search the child description will show the non-inherited reference code
Expected result: we should still display the inherited reference code in the browse/search results in this case

0001-Ensure-ancestors-is-set-when-indexing-record-9283.patch Magnifier (1.85 KB) Mike Gale, 01/11/2016 03:44 PM

History

#2 Updated by Mike Gale over 6 years ago

The issue was when performing the steps above, the code path in arElasticSearchInformationObjectPdo.class.php calls $this->ancestors before it gets set in getRepository(), creating the bug. The fix is to call $this->getAncestors() instead which has an isset($this->ancestors) check in it.

#3 Updated by Mike Cantelon over 6 years ago

  • Status changed from Code Review to Feedback
  • Assignee changed from Mike Cantelon to Mike Gale

Looks good!

#4 Updated by Mike Gale over 6 years ago

merged 58071a12a0e710dd8e9c62614cfcdd8df54a3b68 qa/2.3.x

#5 Updated by Mike Gale over 6 years ago

  • Status changed from Feedback to QA/Review
  • Assignee changed from Mike Gale to Dan Gillean

Not sure if you want to QA this Dan, or wait until the client tests the fix on their site in the related ticket above.

#6 Updated by Dan Gillean over 6 years ago

  • Status changed from QA/Review to Verified

Also available in: Atom PDF