Bug 1412393

Summary: Add validation message for chart with values
Product: Red Hat CloudForms Management Engine Reporter: Satoe Imaishi <simaishi>
Component: UI - OPSAssignee: Libor Pichler <lpichler>
Status: CLOSED CURRENTRELEASE QA Contact: Jiri Stefanisin <jistefan>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 5.7.0CC: hkataria, jhardy, mpovolny, obarenbo
Target Milestone: GAKeywords: TestOnly, ZStream
Target Release: 5.8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 5.8.0.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1412740 (view as bug list) Environment:
Last Closed: 2017-06-12 16:52:52 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1412740    

Description Satoe Imaishi 2017-01-11 23:07:37 UTC
From PR https://github.com/ManageIQ/manageiq/pull/13079 (modified slightly):

Added validation message for chart with values that data column have to be selected.

Also I added "Nothing selected" to data column. Then user is forced to select any data column and before fix it was done automatically and selected first numeric field. For some manipulation with this field in selected fields (removing, adding), variable @edit[:new][:chart_mode] was not updated properly. So I decided to add "Nothing selected" and clean this variable always and force use to selected data column always when data column is removed.

Updated variable @edit[:new][:chart_mode] when data column is selected.

Scenario 1:

To be able selected any data column you have to have selected any numeric field in selected fields in first tab of report definition. But when you will set 'Chart mode' to 'Values' then you were able to save report even if don't have selected any data column.

Scenario 2:

- Add numeric field and any other field in report.
- set other field in summary tab and set chart data column in chart tab. chart mode and values
- remove the numeric field from selected field
- save report -> this case is validated now.