| 
CM Crossroads
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
red1953 (User)
slightly greyed hair software geek
Posts: 222
graphgraph
User Offline Click here to see the profile of this user
Gender: Male pasofino1953 red_1953@hotmail.com Location: Leavenworth, KS Birthdate: 1953-07-29
how to query to find a "fixed task" 1 Year ago Karma: 3  
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
red1953 (User)
slightly greyed hair software geek
Posts: 222
graphgraph
User Offline Click here to see the profile of this user
Gender: Male pasofino1953 red_1953@hotmail.com Location: Leavenworth, KS Birthdate: 1953-07-29
Re:how to query to find a "fixed task" 1 Year ago Karma: 3  
duh....

ccm task -show fixed_by task_spec
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#91323
red1953 (User)
slightly greyed hair software geek
Posts: 222
graphgraph
User Offline Click here to see the profile of this user
Gender: Male pasofino1953 red_1953@hotmail.com Location: Leavenworth, KS Birthdate: 1953-07-29
Re:how to query to find a "fixed task" 1 Year ago Karma: 3  
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
dhoney (User)
Synergy CMPD Dev Lead. Synergy user since 1993.
Posts: 254
graphgraph
User Offline Click here to see the profile of this user
Gender: Male Location: UK Birthdate: 1956-05-02
Re:how to query to find a "fixed task" 1 Year ago Karma: 3  
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
red1953 (User)
slightly greyed hair software geek
Posts: 222
graphgraph
User Offline Click here to see the profile of this user
Gender: Male pasofino1953 red_1953@hotmail.com Location: Leavenworth, KS Birthdate: 1953-07-29
Re:how to query to find a "fixed task" 12 Months ago Karma: 3  
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
dhoney (User)
Synergy CMPD Dev Lead. Synergy user since 1993.
Posts: 254
graphgraph
User Offline Click here to see the profile of this user
Gender: Male Location: UK Birthdate: 1956-05-02
Re:how to query to find a "fixed task" 12 Months ago Karma: 3  
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.
#91393
red1953 (User)
slightly greyed hair software geek
Posts: 222
graphgraph
User Offline Click here to see the profile of this user
Gender: Male pasofino1953 red_1953@hotmail.com Location: Leavenworth, KS Birthdate: 1953-07-29
Re:how to query to find a "fixed task" 12 Months ago Karma: 3  
The KEY here is figuring out what the relation involved is called....

Tested the "is_fix_of" and got what I needed, thanks again.
 
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
If you already have an account on CM Crossroads, Login Now. If you do not, register using the link below...

NOTE: Once you register you will need to activate your account by clicking the link sent to you by email.

Video Spotlight

Accurev

Sponsored Links