We're updating the issue view to help you get more done. 

Extend SearchResult::get() syntax to allow convenient return of attribute value_ids

Description

Extend SearchResult::get() data specifications to allow return of internal attribute value_ids, both directly as values and in structured data return with the "returnWithStructure" option.

value_ids uniquely identify a specific value in a specific attribute. They can be useful when the ability to distinguish between identical values from potentially different sources. They are also required when rendering media and files attribute values in the media viewer user interface. (Rendering media and file attributes is the most common use-case requiring value_ids). To date, deriving value_ids has been painful, involving resolution of attribute_ids returned with "returnWithStructure" and manually extracting value_ids from attribute records.

Changes should include:

• Extend the get() specification syntax to support return of value_ids for any attribute value by appending ".value_id". Ex. ca_objects.decription.value_id would return value_ids for description elements, rather than the description text.

• Add a new "includeValueIDs" option to get() to be used in conjunction with "returnWithStructure". When both are set, value_id values would be included in the returned data structure, alongside the values. Keys for value_ids would be element codes with "_value_id" appended.

Environment

None

Assignee

Seth

Reporter

Maria Passarotti

Labels

None

Components

Fix versions

Affects versions

Priority

Major
Configure