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 Sat6 subscription organization handling #7893

Merged
merged 1 commit into from Apr 13, 2016

Conversation

carbonin
Copy link
Member

This was preventing correctly saving the organization name,
which prevented any one from subscribing to updates from Sat6.

Created a new form key which stores the organization display name.

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

@Fryguy @h-kataria please review

This was preventing correctly saving the organization name,
which prevented any one from subscribing to updates from Sat6.

Created a new form key which stores the organization display name.

https://bugzilla.redhat.com/show_bug.cgi?id=1301607
@miq-bot
Copy link
Member

miq-bot commented Apr 12, 2016

Checked commit carbonin@2251116 with ruby 2.2.3, rubocop 0.37.2, and haml-lint 0.16.1
3 files checked, 1 offense detected

app/views/ops/_settings_rhn_edit_tab.html.haml

  • 🔴 Warn - Line 98, Col - - Line is too long. [171/160]

@carbonin
Copy link
Member Author

Adding some screenshots. The difference can be seen in the organization name.

Before:
sat6validate-before
sat6save-before

After:
sat6validate-after
sat6save-after

else
@edit[:new][:customer_org] = nil unless @edit[:organizations].include?(@edit[:new][:customer_org])
@edit[:new][:customer_org] = nil unless @edit[:organizations].key?(@edit[:new][:customer_org_display])
Copy link
Member

Choose a reason for hiding this comment

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

What sets customer_org_display in this branch?

Copy link
Member Author

Choose a reason for hiding this comment

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

It gets pulled from the @edit[:organizations] hash either way on save here, so I guess setting it in the if block is useless, but might look better than ignoring that part of the @edit[:organizations].first array

Copy link
Member Author

Choose a reason for hiding this comment

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

So this is saying "Set customer_org to nil unless the current org came back in the organizations list", meaning we are editing, which means it would get pulled from the database.

Copy link
Member Author

Choose a reason for hiding this comment

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

I guess the short answer is if it was set, it came from the database here.

@Fryguy Fryguy merged commit cf118d0 into ManageIQ:master Apr 13, 2016
@Fryguy Fryguy added this to the Sprint 39 Ending Apr 18, 2016 milestone Apr 13, 2016
@carbonin carbonin deleted the fix_setting_sat6_org_name branch June 10, 2016 13:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants