Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 1480959 Details for
Bug 1614927
[RFE] Provide the ability to delete a lifecycle environment from the middle of an existing path
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
6.3 patch
1614927.patch (text/plain), 1.17 KB, created by
Justin Sherrill
on 2018-09-05 03:15:49 UTC
(
hide
)
Description:
6.3 patch
Filename:
MIME Type:
Creator:
Justin Sherrill
Created:
2018-09-05 03:15:49 UTC
Size:
1.17 KB
patch
obsolete
>diff --git a/app/models/katello/kt_environment.rb b/app/models/katello/kt_environment.rb >index e70e99adfd..3fd581d82f 100644 >--- a/app/models/katello/kt_environment.rb >+++ b/app/models/katello/kt_environment.rb >@@ -61,6 +61,7 @@ module Katello > > # RAILS3458: before_destroys before associations. see http://tinyurl.com/rails3458 > before_destroy :deletable?, :prepend => true >+ before_destroy :remove_from_path, :prepend => true > > scope(:not_in_capsule, > lambda do |capsule| >@@ -147,8 +148,6 @@ module Katello > > if library? > errors.add :base, _("Library lifecycle environments may not be deleted.") >- elsif !successor.nil? >- errors.add :base, _("Lifecycle Environment %s has a successor. Only the last lifecycle environment on a path can be deleted") % self.name > end > > if content_facets.any? >@@ -203,6 +202,15 @@ module Katello > to_ret > end > >+ def remove_from_path >+ if self.successor && self.prior >+ prior_env = self.prior >+ self.prior = nil >+ self.successor.prior = prior_env >+ self.successor.save! >+ end >+ end >+ > def key_for(item) > "environment_#{id}_#{item}" > end
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1614927
: 1480959