Querying for tasks

You can query for tasks that are in a release, not in a release, or that match the specified query criteria or query expression. Use the tasks found by the query to set the query selection set.

About this task

ccm task -qu|-query -in_rel|-in_release [-f|-format format] 
         [-nf|-noformat] ([-ch|-column_header] | [-nch|-nocolumn_header])
         [-sep|-separator separator] ([-sby|-sortby sortspec] |
         [-ns|-nosort|-no_sort]) [-gby|-groupby groupformat] 
         [-u|-unnumbered] old_project_spec project_spec
ccm task -qu|-query -in_rel|-in_release [-f|-format format]
         [-nf|-noformat] ([-ch|-column_header] | [-nch|-nocolumn_header])
         [-sep|-separator separator] ([-sby|-sortby sortspec] |
         [-ns|-nosort|-no_sort]) [-gby|-groupby groupformat] 
         [-u|-unnumbered] project_spec
ccm task -qu|-query -not_in_rel|-not_in_release [-f|-format format]
         [-nf|-noformat] ([-ch|-column_header] | [-nch|-nocolumn_header])
         [-sep|-separator separator] ([-sby|-sortby sortspec] |
         [-ns|-nosort|-no_sort]) [-gby|-groupby groupformat] 
         [-u|-unnumbered] project_spec
ccm task -qu|-query [-cus|-custom custom_query]
         [(-db|-dbid|-database_id database_spec)...]
         [(-plat|-platform platform)...] [(-purpose purpose)...]
         [(-rel|-release release_spec)...]
         [(-sub|-subsystem subsystem)...]
         [-ts|-scope|-task_scope (user_defined |
         (all_my_assigned|all_owners_assigned) |
         (all_my_assigned_or_completed|all_owners_assigned_or_completed) |
         (all_my_completed|all_owners_completed) |
         (all_my_tasks|all_owners_tasks) | all_completed | all_tasks)]
         (ct_projs|ct_projects|component_task_projects) | 
         (ct_prods|ct_products|component_task_products) | 
         (ct_projs_prods|ct_projects_products | 
         component_task_projects_products))]
         [-f|-format format] [-nf|-noformat] ([-ch|-column_header] |
         [-nch|-nocolumn_header]) [-sep|-separator separator]
         ([-sby|-sortby sortspec] | [-ns|-nosort|-no_sort])
         [-gby|-groupby groupformat] [-u|-unnumbered]
-ch|-column_header
Specifies to use a column header in the output format. See -ch|-column_header for details.
-cus|-custom custom_query
Specifies to include the specified custom query expression in the query.
-db|-dbid|-database_iddatabase_spec
When used with the -task_scope option, specifies a database identifier that modifies the query generated from the task scope. See Database specification for further details.
-f|-format format
Specifies the command output format. See -f|-format for details.
-gby|-groupby groupformat
Specifies how to group the command output. See -gby|-groupby for details.
-in_rel|-in_release old_project_spec project_spec
Shows all tasks that are in the project hierarchy with project_spec as its root. The task list is determined by gathering all tasks for all objects in the hierarchy, and for all their ancestors, and then subtracting the similar list of tasks for the hierarchy with old_project_spec as its root.

If you do not specify old_project_spec, no tasks are subtracted. Specify old_project_spec except for the first release of the product, when there is no baseline release.

-nch|-nocolumn_header
Specifies not to use a column header in the output format. See -nch|-nocolumn_header for details.
-nf|-noformat
Specifies not to use column alignment. See -nf|-noformat for details.
-ns|-no_sort
Specifies not to sort the output for the command. See -ns|-nosort for details.
-not_in_rel|-not_in_release project_spec
Shows all tasks that are not in the project hierarchy with project_spec as its root.
-plat|-platform platform
Specifies the platform. The platform must be a valid platform.
-purpose purpose
Specifies to create the folder with a task query that includes a query for the specified purpose. See the project_purpose command Showing a project purpose for a detailed description of purposes.

This option typically applies to queries for component tasks that are specified with one of these scopes: component_task_projects, component_task_products, or component_task_projects_products.

-rel|-release release_spec
Specifies the release. You can set release_spec to one release. For details, see Release specification.
-sep|-separator separator
Specifies a different separator character. See -sep|-separator for details.
-sby|-sortby sortspec
Specifies how to sort the command output. See -sby|-sortby for details.
-sub|-subsystem subsystem
Specifies the task subsystem. The subsystem must be a valid task subsystem.
-ts|-scope|-task_scope
Specifies to use a task query. The task query includes a query expression that depends on the specified scope. The query expression associated with the specified scope also depends on the -database_id option. You can use the following scopes:
  • user_defined

    If you specify
    -database_id, the query also includes a query expression for tasks modifiable in or completed in the specified database.

  • all_my_assigned|all_owners_assigned

    This scope queries for all tasks assigned to you. If you specify -database_id, the query is for all tasks assigned to you that are modifiable in the specified database.

  • all_my_assigned_or_completed|all_owners_assigned_or_completed

    This scope queries for all tasks assigned to you or completed by you. If you specify -database_id, the query is for all tasks assigned to you and modifiable in the specified database, or completed by you in the specified database.

  • all_my_completed|all_owners_completed

    This scope queries for all tasks completed by you. If you specify -database_id, the query is for all tasks completed by you in the specified database.

  • all_my_tasks|all_owners_tasks

    This scope queries for all tasks for which you are the task resolver. If you specify -database_id, the query is for all tasks that you can resolve and that are modifiable or completed in the specified database.

  • all_completed

    This scope queries for all completed tasks. If you specify -database_id, the query is for all tasks completed in the specified database.

  • all_tasks

    This scope queries for all tasks. If you specify -database_id, the query is for all tasks that are modifiable in the specified database or that were completed in the specified database.

  • component_task_projects|component_task_products| component_task_projects_products

    This scope queries for component tasks for projects, products, or projects and products. If you specify -database_id, the query is for all component tasks that were created in the specified database. If you specify -purpose, the query is for component tasks with the specified purpose.

-u|-unnumbered
Suppresses automatic numbering of the output (that is, the output is not numbered). See -u|-unnumbered for details.

Example

Query for the tasks that have a release value set to 3.0. Format the output so that it shows only the task synopsis.

ccm task -qu -rel 3.0 -f "%priority %task_synopsis"

1) high Correct formatting of calculating number
2) high Redesign gui for file open dialog
3) high Performance improvement for file close
4) low  Enhance message text

Feedback