Project

General

Profile

Actions

Bug #15407

closed

[WB2] Property keys on collections are getting translated from snake_case to camelCase

Added by Lucas Di Pentima almost 5 years ago. Updated over 4 years ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Category:
Workbench2
Target version:
Story points:
-
Release relationship:
Auto

Description

While working on https://dev.arvados.org/issues/14874 I came across an issue with how workbench2 handles JSON data from the API server: the keys are being translated from snake_case format to camelCase.

In the context of properties handling, the problem is evident when looking at a collection that has a property with a key like responsible_person_uuid, because it's displayed as responsiblePersonUuid.

Also, when updating properties, the translated keys are being submitted to the API server, corrupting the original set of properties.

Looking at the code, it seems that the snake case formatting is done due to internal representation of data, but this is applied to all the API server provided data recursively. I've tried modifying the recursive call on https://github.com/curoverse/arvados-workbench2/blob/06fc8f6a97afa24144cb435f5af228fec6162a6b/src/services/common-service/common-service.ts#L57 and the properties start show and behave correctly. The problem is that a couple of tests start to fail because this recursive behavior is needed on other places.


Subtasks 1 (0 open1 closed)

Task #15509: Review 15407-camel-casing-fixResolvedLucas Di Pentima08/19/2019Actions

Related issues

Related to Arvados - Feature #14874: [API] Protected collection property -- preserves original project owner through copy/move/modify operationsResolvedLucas Di Pentima06/18/2019Actions
Related to Arvados - Idea #15067: [Workbench 2] Update property editing to use IDsResolvedLucas Di Pentima11/12/2019Actions
Has duplicate Arvados Workbench 2 - Bug #15645: [Workbench2] Property Keys are converted into Camel Case Format in Collection ViewDuplicateLucas Di PentimaActions
Blocks Arvados Workbench 2 - Bug #14984: Display command line, inputs with links to collectionsResolvedActions
Actions

Also available in: Atom PDF