This subcommand creates a save offline and delete
scope.
Note: When you create a scope, test the scope by
performing a preview using that scope. Ensure that the scope has the
exclusion rules set to prevent deleting data that you want to keep.
For
more information about SOAD scopes and how SOAD evaluates scopes,
see Save Offline and Delete scopes.
Before you begin
You can create a scope when working in the ccm_admin role.
About this task
ccm soad_scope|save_offline_and_delete_scope -c|-create [-roles role]
[-parameters parameters] ([-object four_part_object_name] |
[-query query]) [-expand|-expansion_rules expansion_rules]
[-exclude|-exclusion_rules exclusion_rules]
[-exclude_query|-exclusion_query exclusion_query]
[-pn|-package_name package_name] scope_name
- -exclude|-exclusion_rules exclusion_rules
- Specifies one or more exclusion rules. Exclusion rules remove
related objects from the initial object list.
- For example, your query retrieves all objects for a specified
release, with the release name as the first parameter (release='%1').
You can restrict the scope by adding exclusion rules to remove from
the scope folders and tasks used by other projects. Tasks used by
other folders or associated with other objects, baselines used by
other non-static projects, and objects that are part of other saved
baselines can also be removed.
- -expand|-expansion_rules expansion_rules
- Specifies one or more expansion rules. Expansion rules add related
objects to the initial object list.
- For example, if your query retrieves all objects for a specified
release, with the release name as the first parameter (release='%1').
Expand the scope by adding expansion rules to include the folder and
tasks for a project, the tasks for a folder, and the objects for a
task.
- -exclude_query|-exclusion_query exclusion_query
- Specifies a query used to remove objects from the scope.
- For example, to exclude from the scope objects that have an attribute
named requirements, specify this query expression:
- has_attr('requirements')
- SOAD adds this negated clause, wherever it evaluates an object
name, query, or rule:
- and not has_attr('requirements')
- -object four_part_name
- Specifies the name of the object used for the initial object list
(for example, %1). The resulting expanded string
must be a valid four-part object name.
- For example, you can use the project object name, entered as the
first parameter (%1), to set the initial object list
to that project object name.
- -parameters parameters
- Supplies labels for arguments for the -object,
-query, and -exclude_query and definitions.
- For example, define a scope such as this for one parameter label, Release
Value, for the query used in the "All objects for
specified release" scope:
- ccm soad_scope -create "All objects for specified release"
-parameters "Release Value" -query "release='%1'" other_options
- Next, use the scope in the ccm soad -delete command,
where 2.3 is the release value:
- ccm soad -delete -scope "All objects for specified release"
2.3
- -pn|-package_name package_name
- Specifies the name of the Save Offline package to which objects
are saved for the scope. The package name can include keywords.
- -query query
- Specifies the query expression that defines the initial object
list.
- For example, to make the initial object list include all the projects
and products for a specified release for the current user, specify
this query expression:
- (cvtype='project' or is_product=TRUE) and owner='%user'
and
status='working' and release='%1'
- -roles role
- Specifies the role that can use the scope. By default, only users
working in the ccm_admin role can change the scope.
- scope_name
- Specifies the scope for Save Offline and Delete.
- Use only characters not restricted by the OS.
- This name is also the file name for the scope, including spaces
and other characters, converted to a URL. For example, if you name
the scope This is my test scope, the file name created
is This_is_my_test_scope.xml.
- This name is used as the file name for the scope. Spaces and punctuation
characters are converted into underscore hex encoding. For example,
if you name the scope This is my test scope,
the file name created is This_0020is_0020my_0020_test_0020scope.xml.