How to delete all versions of a file

book

Article ID: 77517

calendar_today

Updated On:

Products

CA Harvest Software Change Manager - OpenMake Meister

Issue/Introduction



If I want to delete all versions of a file from my repository, and the file can be found in multiple states within my project, how can this be accomplished?

Environment

Release:
Component: CCCHV

Resolution

If you want to eliminate all versions of a file from all data views in your Harvest repository, it can be complicated.  Different versions of the file may have been promoted to different states within the project, and all these versions must be demoted back to the original state to succeed in using “Delete Version” to delete them.  Here is a method that will accomplish this task.

Notes:
  • Only works if the item you want to remove is not in the baseline
  • Due to “Switch Package” rules, this only works if there are no branch versions (would need to modify the procedure in that case)
  • Only works to remove files, not folders
  • Only works if the item has not been refactored (renamed, or moved, or a parent path renamed, moved or removed)
The steps to follow are:
  1. (if you want to remove, but “keep” the file) In Administrator Tool, create a new state to hold all versions of the item after it has been removed.  You should configure this new state to not have an associated data view.
 

<Please see attached file for image>

User-added image
  1. In Administrator Tool, ensure you have configured promote and demote processes that sequentially pass through every state, both going up and coming down.  Include a “Demote” process from your first state to the new state created in Step 1.  Also ensure that every state has a “Switch Package” process.  To get a graphical representation of your states and the promote/demote paths available, you can right click on the project name and select “View Project Lifecycle”. 

<Please see attached file for image>

User-added image
 

<Please see attached file for image>

User-added image
  1. In Workbench, find the “itemobjid” of the item you want to remove. 

<Please see attached file for image>

User-added image 
  1. Find the names of all packages containing any version of the item you want to remove, and in what state each package is found.  If you right click on the version in the Explorer View and select “History Diagram” it should give you a graphical representation of all versions of this file, and the names of the packages in which those versions can be found: 

<Please see attached file for image>

User-added image 
  1. In Workbench, create a new package in your project’s initial state to contain the versions of the item you want to remove. 
 

<Please see attached file for image>

User-added image
  1. In the initial state, locate any packages containing versions of the item you want to remove and perform “Switch Package” to move those items to the new package. 
 

<Please see attached file for image>

User-added image

<Please see attached file for image>

User-added image
 
  1. Promote to the next state and repeat step 6, until you arrive at the last state in your project 

<Please see attached file for image>

User-added image 
  1. After collecting all versions of the file to be removed, demote the package sequentially back down through all the states until you reach the initial state 

<Please see attached file for image>

User-added image 
  1. (if you want to remove, but “keep” the file) From there demote from the initial state to the new “cleanup” state.  

<Please see attached file for image>

User-added image 
  1. (if you want to delete all versions of the file) select all items in the package, then right click and select “Delete Version” 

<Please see attached file for image>

User-added image

Attachments

1558701305738000077517_sktwi1f5rjvs16khj.jpeg get_app
1558701304036000077517_sktwi1f5rjvs16khi.png get_app
1558701302296000077517_sktwi1f5rjvs16khh.jpeg get_app
1558701300336000077517_sktwi1f5rjvs16khg.jpeg get_app
1558701298325000077517_sktwi1f5rjvs16khf.jpeg get_app
1558701296076000077517_sktwi1f5rjvs16khe.jpeg get_app
1558701294391000077517_sktwi1f5rjvs16khd.jpeg get_app
1558701292571000077517_sktwi1f5rjvs16khc.jpeg get_app
1558701290722000077517_sktwi1f5rjvs16khb.jpeg get_app
1558701289016000077517_sktwi1f5rjvs16kha.jpeg get_app
1558701287297000077517_sktwi1f5rjvs16kh9.jpeg get_app
1558701285269000077517_sktwi1f5rjvs16kh8.jpeg get_app