Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add validation for charts with values #13079

Merged

Conversation

lpichler
Copy link
Contributor

@lpichler lpichler commented Dec 9, 2016

screen shot 2016-12-09 at 10 44 48

  • This is PR is adding validation message for chart with values that data column have to be selected in this commit.

  • Also I added "Nothing selected" to data column in this commit. 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.

  • this commit is updating 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.

@miq-bot add_label ui, bug, euwe/yes
@miq_bot assign @mzazrivec
cc @PanSpagetka

@miq-bot
Copy link
Member

miq-bot commented Dec 9, 2016

Checked commits lpichler/manageiq@22540d6~...474eb16 with ruby 2.2.5, rubocop 0.37.2, and haml-lint 0.16.1
3 files checked, 0 offenses detected
Everything looks good. ⭐

@lpichler
Copy link
Contributor Author

lpichler commented Dec 9, 2016

@miq-bot assign @mzazrivec

@mzazrivec mzazrivec added this to the Sprint 51 Ending Jan 2, 2017 milestone Dec 13, 2016
@mzazrivec mzazrivec merged commit f5bb6b7 into ManageIQ:master Dec 13, 2016
@simaishi
Copy link
Contributor

simaishi commented Jan 9, 2017

@lpichler is there a BZ for this?

@lpichler lpichler deleted the add_validation_for_charts_with_values branch January 11, 2017 17:02
@lpichler
Copy link
Contributor Author

@simaishi No. There isn't.

@simaishi
Copy link
Contributor

simaishi pushed a commit that referenced this pull request Jan 12, 2017
@simaishi
Copy link
Contributor

Euwe backport details:

$ git log -1
commit 8cbdb0d9c3e8bf4b4cf03ea10faa0c95e2fb43dd
Author: Milan Zázrivec <[email protected]>
Date:   Tue Dec 13 14:09:41 2016 +0100

    Merge pull request #13079 from lpichler/add_validation_for_charts_with_values
    
    Add validation for charts with values
    (cherry picked from commit f5bb6b7b1be618f993cc6784d6649cbaf2ccad47)
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1412740

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants