Bug #15227

[API][Workbench] Adding tags via workbench1's tag editor saves the JSON string to properties

Added by Lucas Di Pentima 6 months ago. Updated 6 months ago.

Assigned To:
Target version:
Start date:
Due date:
% Done:


Estimated time:
(Total: 0.00 h)
Story points:
Release relationship:


When viewing a collection with previosly saved tags, they're rendered ok on the editor, but when saving changes/new tags, the API server is saving them as a json string, for example:

properties: "{\"tagName\":\"tagValue\"}" 

This happens with the rails 5.0 api server and both rails 4.2 & 5.0 workbench1. OTOH, editing the collection with arv edit and manually setting the properties field works ok.


Task #15234: Review 15227-apiserver-properties-bugfixResolvedLucas Di Pentima

Associated revisions

Revision 3a355673
Added by Lucas Di Pentima 6 months ago

Merge branch '15227-apiserver-properties-bugfix'
Closes #15227

Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <>


#1 Updated by Tom Clegg 6 months ago

If the database has a json-encoded string (instead of a json-encoded hash) then it seems we have at least two bugs:
  1. apiserver is allowing non-objects into the properties field(s) -- if it's allowing clients to store strings, it might be allowing false, [], and null too
  2. apiserver is not decoding json-encoded parameters supplied by workbench (I'm guessing the problem is apiserver failing to decode, rather than workbench double-encoding, just because ISTR request parsing changed in the rails5 upgrade)

#2 Updated by Lucas Di Pentima 6 months ago

  • Target version set to 2019-05-22 Sprint
  • Assigned To set to Lucas Di Pentima
  • Status changed from New to In Progress

#3 Updated by Lucas Di Pentima 6 months ago

Updates at f337797b4 - branch 15227-apiserver-properties-bugfix
Test run: https://ci.curoverse.com/job/developer-run-tests/1240/

Fixes type checking on JSON attributes.

#4 Updated by Tom Clegg 6 months ago

This LGTM, thanks.

#5 Updated by Lucas Di Pentima 6 months ago

  • % Done changed from 0 to 100
  • Status changed from In Progress to Resolved

#6 Updated by Tom Morris 6 months ago

  • Release set to 15

Also available in: Atom PDF