Project

General

Profile

Actions

Bug #12360

closed

It's difficult to know if the node property added is valid json

Added by François ARMAND about 6 years ago. Updated almost 6 years ago.

Status:
Released
Priority:
N/A
Category:
Web - Nodes & inventories
Target version:
Severity:
Minor - inconvenience | misleading | easy workaround
UX impact:
User visibility:
Getting started - demo | first install | level 1 Techniques
Effort required:
Small
Priority:
64
Name check:
Fix check:
Regression:

Description

When we add a property to a node through the UI, if the property is not valid JSON (because we forgot something for ex), Rudder will happily stringify the value. Which is nice from him, but is a disaster from an usability point of view. We must provide to the user a mean so that he can assess "here Rudder, this is JSON, yell at me if you don't understand".

That could be a little dropdown at the begining of the "value" part where the user would choose between "string" and "json", and Rudder would act accordingly.


Related issues 2 (0 open2 closed)

Related to Rudder - User story #12691: Add a JSON validator in JSON fields in the editorResolvedActions
Related to Rudder - Bug #13892: Once added, we don't know if a node property is json or stringRejectedFrançois ARMANDActions
Actions #1

Updated by François ARMAND about 6 years ago

  • Effort required changed from Very Small to Small
  • Priority changed from 79 to 66

Raphael, could you evaluate the difficulty for that? It seems that it's pure JS, with a select box that let users choose between string|json (perhaps like the one that let user choose between normal|js in directive parameters), plus a JS check that the input is JSON on [Add] click when JSON is chosen, plus a "stringify" call on [Add] click when "string" is chosen (to force json to became a string) - and actually, the logic on [add] click is more likelly "try to parse value as JSON. If it succeed and string is selected, stringify. If it fails and json is selected, error message. In other case do nothing".

Actions #2

Updated by Raphael GAUTHIER about 6 years ago

I think it is not that hard and can be done in one day. Plus maybe another day to validate the UI and the error message, so 2 days should be enough.

Actions #3

Updated by Raphael GAUTHIER about 6 years ago

  • Status changed from New to In progress
  • Assignee set to Raphael GAUTHIER
Actions #4

Updated by Vincent MEMBRÉ about 6 years ago

  • Target version changed from 4.1.11 to 4.1.12
Actions #5

Updated by Raphael GAUTHIER about 6 years ago

  • Status changed from In progress to New
Actions #6

Updated by Vincent MEMBRÉ almost 6 years ago

  • Target version changed from 4.1.12 to 4.1.13
Actions #7

Updated by Benoît PECCATTE almost 6 years ago

  • Target version changed from 4.1.13 to 411
  • Priority changed from 66 to 65
Actions #8

Updated by Benoît PECCATTE almost 6 years ago

  • Target version changed from 411 to 4.1.13
Actions #9

Updated by François ARMAND almost 6 years ago

  • Related to User story #12691: Add a JSON validator in JSON fields in the editor added
Actions #12

Updated by Raphael GAUTHIER almost 6 years ago

  • Status changed from New to Pending technical review
  • Assignee changed from Raphael GAUTHIER to Vincent MEMBRÉ
  • Pull Request set to https://github.com/Normation/rudder/pull/1967
Actions #13

Updated by Rudder Quality Assistant almost 6 years ago

  • Status changed from Pending technical review to Discussion
  • Assignee changed from Vincent MEMBRÉ to Raphael GAUTHIER
  • Priority changed from 65 to 64
Actions #14

Updated by Raphael GAUTHIER almost 6 years ago

  • Status changed from Discussion to Pending technical review
  • Assignee changed from Raphael GAUTHIER to Vincent MEMBRÉ
Actions #15

Updated by Rudder Quality Assistant almost 6 years ago

  • Status changed from Pending technical review to Discussion
  • Assignee changed from Vincent MEMBRÉ to Raphael GAUTHIER
Actions #16

Updated by Raphael GAUTHIER almost 6 years ago

  • Status changed from Discussion to Pending technical review
  • Assignee changed from Raphael GAUTHIER to Vincent MEMBRÉ
Actions #17

Updated by Anonymous almost 6 years ago

  • Status changed from Pending technical review to Pending release
Actions #18

Updated by Vincent MEMBRÉ almost 6 years ago

  • Status changed from Pending release to Released

This bug has been fixed in Rudder 4.1.13, 4.2.7 and 4.3.3 which were released today.

Actions #19

Updated by François ARMAND over 5 years ago

  • Related to Bug #13892: Once added, we don't know if a node property is json or string added
Actions

Also available in: Atom PDF