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

Adding tenant stuff to service template copy #18990

Merged

Conversation

d-m-u
Copy link
Contributor

@d-m-u d-m-u commented Jul 16, 2019

Service Template copy should include tenant info.

Commit one adds the tenant info per ManageIQ/manageiq-ui-classic#5667 (comment).
Commit two fixes https://github.com/ManageIQ/manageiq/pull/18973/files#r303953846.

@miq-bot assign @tinaafitz
@miq-bot add_reviewer @bdunne

@d-m-u d-m-u force-pushed the adding_tenant_stuff_to_service_template_copy branch from 3786b86 to 6488431 Compare July 16, 2019 22:46
@h-kataria
Copy link
Contributor

@d-m-u i am getting error when trying to copy a catalog item with Additional tenant info

[----] I, [2019-07-17T09:54:49.406810 #10268:447f30c]  INFO -- : Started POST "/catalog/save_copy_catalog" for ::1 at 2019-07-17 09:54:49 -0400
[----] I, [2019-07-17T09:54:49.439889 #10268:447f30c]  INFO -- : Processing by CatalogController#save_copy_catalog as */*
[----] I, [2019-07-17T09:54:49.440064 #10268:447f30c]  INFO -- :   Parameters: {"id"=>"110", "name"=>"Copy of Copy of 13", "catalog"=>{"id"=>"110", "name"=>"Copy of Copy of 13"}}
[----] F, [2019-07-17T09:54:49.475871 #10268:447f30c] FATAL -- : Error caught: [TypeError] no implicit conversion of nil into String
/home/hkataria/dev/manageiq/app/models/service_template/copy.rb:27:in `+'
/home/hkataria/dev/manageiq/app/models/service_template/copy.rb:27:in `block in additional_tenant_copy'
/home/hkataria/.rvm/gems/ruby-2.4.4/gems/activerecord-5.1.7/lib/active_record/relation/delegation.rb:39:in `each'
/home/hkataria/.rvm/gems/ruby-2.4.4/gems/activerecord-5.1.7/lib/active_record/relation/delegation.rb:39:in `each'
/home/hkataria/dev/manageiq/app/models/service_template/copy.rb:25:in `additional_tenant_copy'
/home/hkataria/dev/manageiq/app/models/service_template/copy.rb:11:in `block (2 levels) in template_copy'
/home/hkataria/dev/manageiq/app/models/service_template/copy.rb:7:in `tap'
/home/hkataria/dev/manageiq/app/models/service_template/copy.rb:7:in `block in template_copy'

@d-m-u d-m-u force-pushed the adding_tenant_stuff_to_service_template_copy branch from 6488431 to 15d5742 Compare July 17, 2019 14:00
@h-kataria
Copy link
Contributor

@d-m-u after i made a copy of an item that had additional tenants selected, it seems like it changed names of tenants in my db and prefixed them with "copy of xx" see screenshot
Screenshot from 2019-07-17 10-15-55

@d-m-u
Copy link
Contributor Author

d-m-u commented Jul 17, 2019

Yeah, I saw! I'm looking at it, give me a minute, please.

@d-m-u d-m-u force-pushed the adding_tenant_stuff_to_service_template_copy branch from 15d5742 to d025294 Compare July 17, 2019 14:49
@h-kataria
Copy link
Contributor

tested, work fine now 👍

@miq-bot
Copy link
Member

miq-bot commented Jul 17, 2019

Checked commits d-m-u/manageiq@c64720b~...d025294 with ruby 2.4.6, rubocop 0.69.0, haml-lint 0.20.0, and yamllint 1.10.0
2 files checked, 0 offenses detected
Everything looks fine. 🍪

Copy link
Member

@tinaafitz tinaafitz left a comment

Choose a reason for hiding this comment

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

Looks good.

@tinaafitz
Copy link
Member

@bdunne Please review.

@h-kataria h-kataria added this to the Sprint 116 Ending Jul 22, 2019 milestone Jul 17, 2019
@h-kataria h-kataria merged commit 1e01a97 into ManageIQ:master Jul 17, 2019
@d-m-u d-m-u deleted the adding_tenant_stuff_to_service_template_copy branch September 26, 2019 10:36
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