| 
CM Crossroads Forums
Welcome, Guest
Please Login or Register.    Lost Password?
Re:how to query to find a "fixed task" (1 viewing) (1) Guest
Go to bottom Post Reply Favoured: 0
TOPIC: Re:how to query to find a "fixed task"
#91291
robert doerr (User)
slightly greyed hair software geek
Posts: 181
graphgraph
User Online Now Click here to see the profile of this user
Gender: Male Rancho de Puerta pasofino1953 red_1953@hotmail.com Location: Land of Oz Birthdate: 1953-07-29
how to query to find a "fixed task" 3 Months, 1 Week ago  
I am looking for the CLI to query for a task related to another, i.e. "fixed" task. One has to be able to do it.... just not sure of what the syntax is.

ccm query "is_related_task_of('task_object'"

I have to be close, just not quite there.... I have three tasks, 5979 which is fixed by 5982 which is fixed by 5983.....

thanks
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#91292
robert doerr (User)
slightly greyed hair software geek
Posts: 181
graphgraph
User Online Now Click here to see the profile of this user
Gender: Male Rancho de Puerta pasofino1953 red_1953@hotmail.com Location: Land of Oz Birthdate: 1953-07-29
Re:how to query to find a "fixed task" 3 Months, 1 Week ago  
duh....

ccm task -show fixed_by task_spec
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#91323
robert doerr (User)
slightly greyed hair software geek
Posts: 181
graphgraph
User Online Now Click here to see the profile of this user
Gender: Male Rancho de Puerta pasofino1953 red_1953@hotmail.com Location: Land of Oz Birthdate: 1953-07-29
Re:how to query to find a "fixed task" 3 Months, 1 Week ago  
As it turns out I will want to be able to query to find all the tasks that have been 'fixed' by another task so once again I need a CLI query to find all tasks that has a relation of 'fixed_by' another task...
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#91376
David Honey (User)
Synergy CMPD Dev Lead. Synergy user since 1993.
Posts: 225
graphgraph
User Offline Click here to see the profile of this user
Gender: Male Location: UK
Re:how to query to find a "fixed task" 3 Months, 1 Week ago  
Hi Robert,

The relationship you want to query for is named fix and runs from the fix task to the bad task (the task being fixed). You can use standard relation based query functions to query in either direction or find objects that have or do not have such a relation. For example, to query for all the tasks that fix task A#123:

Code:

ccm query "is_fix_of(task('A#123'))"
Hope that helps. Regards, David.
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#91384
robert doerr (User)
slightly greyed hair software geek
Posts: 181
graphgraph
User Online Now Click here to see the profile of this user
Gender: Male Rancho de Puerta pasofino1953 red_1953@hotmail.com Location: Land of Oz Birthdate: 1953-07-29
Re:how to query to find a "fixed task" 3 Months ago  
What I need is a query to find all the tasks that are "FIXED" tasks or tasks that "FIXES"....
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#91391
David Honey (User)
Synergy CMPD Dev Lead. Synergy user since 1993.
Posts: 225
graphgraph
User Offline Click here to see the profile of this user
Gender: Male Location: UK
Re:how to query to find a "fixed task" 3 Months ago  
Hi Robert,

I'm not sure exactly what query you're looking for. There are four general query functions that are concerned with querying relations:
  1. is_relation_of(objectname)

  2. has_relation(objectname)

  3. is_no_relation()

  4. has_no_relation()

where relation is the name of the relation, and where objectname is either a four-part objectname or a query function that finds such an object. For example, if you know a task identifier, you can use the task query function to get its four part objectname.

Specific examples:
  • is_fix_of(task('A#123' )) queries for all objects with a relationship named fix from task A#123. In other words, it would find the bad tasks fixed by task A#123.

  • has_fix(task('A#123' )) queries for all objects with a relationship named fix to task A#123. In other words, it would find the good tasks that fix bad task A#123.

  • is_no_fix() queries for all objects that have no relationships named fix from them. In other words, it would find tasks that are not fix tasks.

  • has_no_fix() queries for all objects that have no relationships named fix to them. In other words it would tasks that are not bad tasks fixed by one or more fix tasks.

These are all described in the Learn more about...Query expressions...functions chapter of the CLI help.

So once you know the name of the relation involved, you can apply these general relation query functions to almost any situation.

Hope that helps,
Regards,
David.
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
Go to top Post Reply
Powered by FireBoardget the latest posts directly to your desktop

Video News