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

Fix MiqWidget#grouped_subscribers #3115

Merged
merged 2 commits into from
Jun 18, 2015

Conversation

lfu
Copy link
Member

@lfu lfu commented Jun 10, 2015

to skip the user that does not exist any more.

Normally when a user is removed, say from UI, the associated dashboards are cleared as well.
But during this customer's migration from 3.0 to 3.1, looks like some users got deleted and left behind the dashboards in DB.

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

@@ -132,6 +132,33 @@
result[@group2].should match_array(users)
end

it 'ignores the user that does not exist any more' do
ws = FactoryGirl.create(:miq_widget_set, :name => "Home", :userid => @user1.userid, :group_id => @group1.id)
@widget_report_vendor_and_guest_os.make_memberof(ws)
Copy link
Member

Choose a reason for hiding this comment

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

@lfu These two lines are repeated at the top of every test in this context except the first one. Let's create a sub-context and move this logic into a before block.

@lfu lfu force-pushed the widget_group_with_nil_user_1227426 branch from efdb399 to 5dbd12e Compare June 17, 2015 16:58
@lfu
Copy link
Member Author

lfu commented Jun 17, 2015

@gmcculloug Updated.

lfu added 2 commits June 18, 2015 09:11
when a user is deleted somehow.
Normally when a user is removed, say from UI, the associated dashboard is cleared as well.
But during this customer's migration from 3.0 to 3.1, looks like some users got deleted and left behind the dashboards in DB.
https://bugzilla.redhat.com/show_bug.cgi?id=1227426
to skip the user that does not exist any more.
Normally when a user is removed, say from UI, the associated dashboard is cleared as well.
But during this customer's migration from 3.0 to 3.1, looks like some users got deleted and left behind the dashboards in DB.
https://bugzilla.redhat.com/show_bug.cgi?id=1227426
@lfu lfu force-pushed the widget_group_with_nil_user_1227426 branch from 5dbd12e to cc8df7f Compare June 18, 2015 13:12
@miq-bot
Copy link
Member

miq-bot commented Jun 18, 2015

Checked commits lfu@6197406 .. lfu@cc8df7f with rubocop 0.27.1
2 files checked, 0 offenses detected
Everything looks good. 👍

gmcculloug added a commit that referenced this pull request Jun 18, 2015
@gmcculloug gmcculloug merged commit 5ca0907 into ManageIQ:master Jun 18, 2015
@gmcculloug gmcculloug added this to the Sprint 25 Ending June 22, 2015 milestone Jun 18, 2015
@lfu lfu deleted the widget_group_with_nil_user_1227426 branch July 7, 2015 18:16
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.

None yet

4 participants