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

Added "Preserve owner?" checkbox on Import report screen #5060

Merged
merged 2 commits into from
Jan 16, 2019

Conversation

yrudman
Copy link
Contributor

@yrudman yrudman commented Dec 6, 2018

Before:
We unconditionally overrided user_id and miq_group_id fields of imported report with value for user who is doing import.
before

After:
Preserver owner? checkbox is controlling if we need to work in old way (override) or preserve user_id and miq_group_id from imported report
after

Depends on ManageIQ/manageiq#18270

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1638533

@miq-bot add-label enhancement , cloud intel/reporting, pending core

\cc @gtanzillo

yrudman added a commit to yrudman/manageiq that referenced this pull request Dec 7, 2018
…port.

There is 'Preserve owner' checkbox added on Import report page, UI PR: ManageIQ/manageiq-ui-classic#5060
This checkbox controls if report will be imported in the old way: unconditionally override user_id and miq_group_id fields of imported report,
OR in the new way: keep those fields untouched.
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1638533
@yrudman yrudman changed the title [WIP] Added "Preserve owner?" checkbox on Import report screen Added "Preserve owner?" checkbox on Import report screen Dec 7, 2018
@miq-bot miq-bot added hammer/yes and removed wip labels Dec 7, 2018
@@ -72,8 +72,11 @@ def upload
end
if params[:upload] && params[:upload][:file] && params[:upload][:file].respond_to?(:read)
@sb[:overwrite] = !params[:overwrite].nil?
@sb[:preserve_owner] = !params[:preserve_owner].nil?
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sb[:preserve_owner] = params[:preserve_owner].present? sounds better :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, I will change
it would look more easy to read, but will dissonance with the line above it...

Copy link
Contributor

@ZitaNemeckova ZitaNemeckova Dec 17, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll take care of that in #5094 :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ZitaNemeckova Ohh, I see, you have change that in PR

@@ -13,10 +13,14 @@
:multipart => true,
:method => :post) do
- overwrite = @sb[:overwrite] ? true : false
- preserve_owner = @sb[:preserve_owner] ? true : false
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to be extra. Why not use @sb[:preserve_owner] directly?

@ZitaNemeckova
Copy link
Contributor

LGTM 👍

@miq-bot
Copy link
Member

miq-bot commented Dec 17, 2018

This pull request is not mergeable. Please rebase and repush.

…ser_id and miq_group_id field of imported report with value for user who is doing import. After: owrk old way (ovverride) f Preserver Owner checkbox unchecked and do not override (keep original values) if this checkbox checked. After: owrk old way (ovverride) f Preserver Owner checkbox unchecked and do not override (keep original values) if this checkbox checked. Depends on ManageIQ/manageiq#18270

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1638533
@yrudman yrudman force-pushed the added-preserve-owner-checkbox branch from 062d75f to 57fde20 Compare December 17, 2018 16:02
@yrudman yrudman force-pushed the added-preserve-owner-checkbox branch from 57fde20 to acd3826 Compare December 17, 2018 16:26
@miq-bot
Copy link
Member

miq-bot commented Dec 17, 2018

Checked commits yrudman/manageiq-ui-classic@7a2e79f~...acd3826 with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0
1 file checked, 0 offenses detected
Everything looks fine. 👍

yrudman added a commit to yrudman/manageiq that referenced this pull request Dec 20, 2018
…port.

There is 'Preserve owner' checkbox added on Import report page, UI PR: ManageIQ/manageiq-ui-classic#5060
This checkbox controls if report will be imported in the old way: unconditionally override user_id and miq_group_id fields of imported report,
OR in the new way: keep those fields untouched.
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1638533
@martinpovolny
Copy link
Member

Travis was green but not shown here. Restarted.

@martinpovolny
Copy link
Member

Good to merge once the core PR is merged. 👍

yrudman added a commit to yrudman/manageiq that referenced this pull request Jan 9, 2019
There is 'Preserve owner' checkbox added on Import report page, UI PR: ManageIQ/manageiq-ui-classic#5060
This checkbox controls if report will be imported in the old way: unconditionally override user_id and miq_group_id fields of imported report,
OR in the new way: keep those fields untouched.

In order to support report import in mutilregion environment:
 added 'userid' and 'group_description' attributes to exported report
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1638533
yrudman added a commit to yrudman/manageiq that referenced this pull request Jan 9, 2019
There is 'Preserve owner' checkbox added on Import report page, UI PR: ManageIQ/manageiq-ui-classic#5060
This checkbox controls if report will be imported in the old way: unconditionally override user_id and miq_group_id fields of imported report,
OR in the new way: keep those fields untouched.

In order to support report import in mutilregion environment:
 added 'userid' and 'group_description' attributes to exported report
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1638533
yrudman added a commit to yrudman/manageiq that referenced this pull request Jan 11, 2019
There is 'Preserve owner' checkbox added on Import report page, UI PR: ManageIQ/manageiq-ui-classic#5060
This checkbox controls if report will be imported in the old way: unconditionally override user_id and miq_group_id fields of imported report,
OR in the new way: keep those fields untouched.

In order to support report import in mutilregion environment:
 added 'userid' and 'group_description' attributes to exported report
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1638533
@yrudman
Copy link
Contributor Author

yrudman commented Jan 15, 2019

@miq-bot remove-label pending core

@martinpovolny core PR merged

@martinpovolny martinpovolny merged commit 738d133 into ManageIQ:master Jan 16, 2019
@martinpovolny martinpovolny added this to the Sprint 103 Ending Jan 21, 2019 milestone Jan 16, 2019
@yrudman yrudman deleted the added-preserve-owner-checkbox branch January 16, 2019 12:42
simaishi pushed a commit that referenced this pull request Mar 29, 2019
Added "Preserve owner?" checkbox on Import report screen

(cherry picked from commit 738d133)

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1693719
@simaishi
Copy link
Contributor

Hammer backport details:

$ git log -1
commit 598995ec269f36094a84d264926f08a2dca83f00
Author: Martin Povolny <[email protected]>
Date:   Wed Jan 16 09:36:53 2019 +0100

    Merge pull request #5060 from yrudman/added-preserve-owner-checkbox
    
    Added "Preserve owner?" checkbox on Import report screen
    
    (cherry picked from commit 738d13379bc01b705544c41cac0206623796d706)
    
    Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1693719

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.

5 participants