Project

General

Profile

Actions

Bug #5141

closed

[Workbench] Should permit all numeric values for numeric pipeline inputs, not just integers

Added by Brett Smith about 9 years ago. Updated about 9 years ago.

Status:
Resolved
Priority:
Normal
Assigned To:
-
Category:
Workbench
Target version:
Story points:
0.5

Description

Currently, when a pipeline input has dataclass: numeric, Workbench lets users specify that with an numeric X-Editable input. However, X-Editable only accepts integers in this case. It should be expanded to permit all numeric types, including floats.


Subtasks 1 (0 open1 closed)

Task #5143: Review 5141-workbench-numeric-inputs-wipResolvedPeter Amstutz02/05/2015Actions
Actions #1

Updated by Brett Smith about 9 years ago

  • Status changed from New to In Progress
Actions #2

Updated by Peter Amstutz about 9 years ago

I don't have a problem with treating it like a string on the browser side if the editing form is being obnoxious.

However, (correct me if I'm wrong), I believe the "number" type did ensure that the "value" field would be set to a JSON number. With this change, "value" is now a string. There needs to be some fixup logic that converts parses values with dataclass "number" to actual numbers to avoid unpleasant surprises for downstream scripts.

Actions #3

Updated by Brett Smith about 9 years ago

Peter Amstutz wrote:

However, (correct me if I'm wrong), I believe the "number" type did ensure that the "value" field would be set to a JSON number.

This does not seem to be the case. Check out 4xphq-d1hrv-0lhbqyjab4g0bwp, which is a pipeline instance I created on 4xphq just now to test this, setting a number value using the existing Workbench code. That value is a string.

Actions #4

Updated by Peter Amstutz about 9 years ago

Brett Smith wrote:

Peter Amstutz wrote:

However, (correct me if I'm wrong), I believe the "number" type did ensure that the "value" field would be set to a JSON number.

This does not seem to be the case. Check out 4xphq-d1hrv-0lhbqyjab4g0bwp, which is a pipeline instance I created on 4xphq just now to test this, setting a number value using the existing Workbench code. That value is a string.

You got me there. Ok.

In render_pipeline_component_attribute if attrvalue is a number (not a string) then datatype does not get set and will be nil. However, it appears that the result is simply that "data-type" is not set on the x-editable control, and x-editable defaults to text anyway.

Go ahead and merge.

Actions #5

Updated by Brett Smith about 9 years ago

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

Applied in changeset arvados|commit:e5b8f6826a2034c0c7d7142cff3fb02f64fb8831.

Actions

Also available in: Atom PDF