Actions
Bug #15227
closed[API][Workbench] Adding tags via workbench1's tag editor saves the JSON string to properties
Status:
Resolved
Priority:
Normal
Assigned To:
Category:
-
Target version:
Story points:
-
Release:
Release relationship:
Auto
Description
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.
Updated by Tom Clegg over 5 years ago
If the database has a json-encoded string (instead of a json-encoded hash) then it seems we have at least two bugs:
- 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
- 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)
Updated by Lucas Di Pentima over 5 years ago
- Status changed from New to In Progress
- Assigned To set to Lucas Di Pentima
- Target version set to 2019-05-22 Sprint
Updated by Lucas Di Pentima over 5 years 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.
Updated by Lucas Di Pentima over 5 years ago
- Status changed from In Progress to Resolved
- % Done changed from 0 to 100
Applied in changeset arvados|3a355673427cf352fd28adb7f6279cab125c42aa.
Actions