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

Content deletion - initial merge to master #479

Merged
merged 111 commits into from Aug 20, 2012
Merged

Content deletion - initial merge to master #479

merged 111 commits into from Aug 20, 2012

Conversation

bbuckingham
Copy link
Member

NOTE: Once this is merged to master, developers must run 'rake db:migrate' to pick up the addition of 'type' to the changeset model.

This is the initial merge of the content deletion feature to master. There is still more work to be done; however, we wanted to make the current functionality available to users.

High-level summary:

  • UI nav change - usage of 'Promotion' has been replaced with 'Changeset', since you may now create a promotion or deletion changeset.
  • UI - ability to associate a type with a changeset (promotion/deletion) during changeset creation
  • UI - ability to assign content to a changeset w/ behavior of content tree adjusting to the type of changeset being worked on
  • UI - ability to support deletion of products, repos, pkgs, errata, distros and system templates
  • UI - various changes to styling to handle the promotion vs deletion concept
  • CLI/API - similar capabilities to the above, but from CLI/API point of view

We do have some more testing/hardening to do; however, we'll address that with up upcoming pull requests.

parthaa and others added 30 commits July 19, 2012 12:17
Added initial bindings to changeset. We may decide to go with the inheritance model
soon, depending on the variations in the backend code.
content-deletion - Added action type to  changeset to accomadate content deletion
…angeset

This commit contains the changes to allow user to define the changeset as
either a deletion or promotion changeset.
Updating several of the i18n strings to remove the word 'promotion'
since the changeset will be used to support both promotion and deletion.

As we add in the deletion capability and test, we'll make the distinctions
in the text, where appropriate.
While working on a feature, found that a couple of bugs in being
able to delete packages from a changeset via the changeset sliding
tree.
Once a repo has been promoted to the next environment, it should show
as 'promoted' in the UI and the user should not be adding it
to another changeset to promote again.  (I.e. once the repo is promoted,
the user would promote the pkgs and errata for promotion).  (This is
based upon feedback from the original developer).

Without this commit, the user can promote the same repo over and
over, even if it has already been promoted.   This appears to
be a regression introduced when we added the repository model
to the katello AR.
This commit contains the initial changes needed to allow a user
to add/remove objects to deletion changeset.  Object in this
context include: products, system templates, repositories,
packages, errata and distributions.

In the case of a deletion changeset, the user should be able to add/remove
anything that is in the current environment.

In the case of a promotion changeset, the user should only
be able to add content based upon the previous established rules
(e.g. product promoted to next env, object not already promoted...etc)
When user views the details for a changeset on the promotions
page, they should see that it is either for deletion or promotion.

At this time, user cannot edit the changeset type, since doing
so could completely invalidate some of the content in the changeset.
When viewing a changeset from the changeset history, include the
type as part of the information displayed.
When a changeset is created, it is associated with an environment.
This commit will associate the changeset with the proper environment
based upon the type of changeset.

In the case of a deletion changeset, it needs to be associated with
the current environment (e.g. dev, if in dev env).

In the case of a promotion changeset, it needs to be associated with
the next environment where the content is being promoted to
(e.g. if in dev and next env is test, it would be set to test).
In the previous commit, we updated the logic to associate
proper environment with the changeset based upon the
changeset action (promotion/deletion); however, the
specs needed some updates to account for this change.
When the user is in the Library, only allow for changesets of
type 'promotion'.  Do not allow for 'deletion' changesets.
With content-deletion, we are adding the ability to support both
promotions and deletions of content.  The current navigation is
worded such that it indicates support of only promotions.

Based on feedback/discussion on mailing list, updating the navigation
from:

  Content -> Changeset Promotions -> Promotions
                                  -> Changeset Promotion History

to:

  Content -> Changset Management -> Changesets
                                 -> Changesets History
…n cs type

This small commit updates the 'play' button text to set it to delete or
promote based upon the type of changeset that is currently open.
content deletion - few more UI commits
Moving to an inheritance model where changeset class is now
split as PromotionChangeset and DeletionChangeset.
A 'type' column was added to changests table instead of the action_type
so that the rails model works naturally
…dling

This commit fixes a bug that I introduced :( when adding support
for content deletion.
bbuckingham and others added 26 commits August 13, 2012 23:13
…sting

Previously we had a single list consisting of all changesets.  In
that listing, we included some text to indicate the type for each
changeset (i.e. deletion/promotion).  Since we are now creating 2
separate lists, that type is no longer necessary; therefore, removing it.
Quick fix to a bug introduced in the package deletion and promotion
…Remove'

This commit contains changes so that when an item (e.g. product, pkg,
errata...) is added to the changeset, the content tree includes
"Added (Undo)" (where undo is a link) vs "Remove".  Although this
affects the content tree (left side), it does not affect the changeset
tree (right side), which will continue to use 'Remove'.

This commit also contains a small fix to allow repos to be removed
from a changeset after they have been added.  Previously there was
a bug where the repo once added was not correctly detected by
the changeset 'has_item' method.
…Remove'

This is a follow-up to the previous commit to address the changes needed
to the system templates view.
This commit adds the title attribute to the items in the
changeset action bar (e.g. Remove, Edit Details, Review, Promote/Edit).
For simplicity/efficiency, chose to use html title attribute for
these vs creating a tipsy element.
Update to have a custom confirm on changeset deletion, so user
is aware of the type of changeset they are deleting.
Added a tipsy to the 'Added' text in the content tree so that
when user hovers, they see info like "Added to changeset XYZ".
Added title attribute to changeset actions (e.g. Remove, Edit..etc);
however, noticed that tipsy is used in this page quite a bit but
title is not.  As a result, updated them to use tipsy for consistency.
Also, added a 'tipsify' class so that we can have a single instantiation
of tipsy for the tipsies added for the actions, the ones used for
the "Added (Undo)" and others in the future.
content-deletion - changes to UI based on mockups
This commit addresses the issue where the notices generated
for a successful promotion or deletion changeset was a
'sticky message'.
This commit contains a small fix to address an issue where if
the user goes to the 'last' environment, they do not see the
any deletion changesets listed on page load.
Added system template deletion feature
System Template Content Deletion fixes
…ontent-deletion

Conflicts:
	src/app/models/deletion_changeset.rb
Content deletion - add support for product delete
Conflicts:
	src/app/controllers/api/changesets_controller.rb
	src/app/controllers/changesets_controller.rb
	src/app/views/changesets/_new.html.haml
	src/spec/controllers/changeset_controller_spec.rb
@mccun934
Copy link
Member

ACK to merge, this is a pretty big commit but we have been reviewing the code throughout the dev process so I'm OK with a merge to master

Conflicts:
	src/app/models/changeset.rb
	src/spec/models/changeset_spec.rb
mccun934 added a commit that referenced this pull request Aug 20, 2012
Content deletion - initial merge to master
@mccun934 mccun934 merged commit 4d1418d into master Aug 20, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants