-
Notifications
You must be signed in to change notification settings - Fork 897
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 ArchivedMixin to ServiceTemplate #17480
Add ArchivedMixin to ServiceTemplate #17480
Conversation
aaaa0a0
to
01613de
Compare
app/models/service_template.rb
Outdated
@@ -56,6 +57,7 @@ class ServiceTemplate < ApplicationRecord | |||
has_many :dialogs, -> { distinct }, :through => :resource_actions | |||
|
|||
has_many :miq_requests, :as => :source, :dependent => :nullify | |||
has_many :active_requests, -> { where(:request_state => %w(active queued)) }, :as => :source, :class_name => "MiqRequest" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bzwei can you confirm this covers all "active requests"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can use constants
https://github.com/ManageIQ/manageiq/blob/master/app/models/miq_request.rb#L4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❤️ perfect
d494d8c
to
6978d03
Compare
6978d03
to
f56ef1f
Compare
f56ef1f
to
ccdde4b
Compare
Checked commits agrare/manageiq@d025b82~...ccdde4b with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0 app/models/service_template.rb
|
Backported to Gaprindashvili via #17481 |
This adds the archived mixin to service templates to allow for v2v
migration plans to be archived by the user.
ManageIQ/manageiq-v2v#314
Gap backport: #17481
Depends on: ManageIQ/manageiq-schema#207