Project

General

Profile

Actions

Idea #15781

closed

[WB2] Support multiple values for a given property key

Added by Tom Morris about 5 years ago. Updated almost 5 years ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Category:
Workbench2
Start date:
01/30/2020
Due date:
Story points:
4.0
Release relationship:
Auto

Description

Backend

https://www.postgresql.org/docs/9.5/functions-json.html

arvados_development=# select '{"a":["foo","bar"]}'::jsonb @> '{"a":["bar"]}'::jsonb;
 ?column? 
----------
 t

So jsonb subset match works if you know the key and are looking for an exact match on the value.

It looks like an Arvados filter of [["properties.a", "=", ["bar"]] might already work by since it uses @> in the implementation. Although that's arguably a bug since the expectation is to get an exact match. Instead we'll introduce a new operator [["properties.a", "contains", "bar"].

Frontend UI

For editing, rather than overwriting a tag:value pair as is done currently when the tag is specified multiple times, add the new tag:value pair to the list. When writing to the backend, merge the values into an array which becomes value that's written into the properties. Arrays are only used when there are multiple values.

For searching the implementation will use the new contains operator internally, but continue to use the "has" notation externally.


Subtasks 2 (0 open2 closed)

Arvados - Task #16030: Review 15781-multi-value-property-search (backend, arvados repo)ResolvedPeter Amstutz01/30/2020Actions
Task #16112: Review 15781-multi-value-property-edit (wb2 repo)ResolvedPeter Amstutz02/03/2020Actions

Related issues 1 (0 open1 closed)

Has duplicate Arvados Workbench 2 - Bug #15774: Advanced Search editor keeps adding search terms instead of replacingDuplicateActions
Actions

Also available in: Atom PDF