CR to CR query with Synergy command line

510 views
Skip to first unread message

Brandon

unread,
Jul 27, 2014, 3:28:41 PM7/27/14
to synergy...@googlegroups.com
I've looked at this for most of a day and figure I am just not seeing the forest from the trees.
 
I presume the tools (Synergy & Change) really only know of two entities, a task and a CR, and that a user can customize different types of CRs (since we have: IRs, SCRs, SCPs).
We have tasks related to IRs, so the query examples I have figured out so far work great finding those IDs back and forth.
We then have IRs related to SCRs and SCPs.
And when we do a relation, attributes are created for has_associated_xxx.
 
From the command line (UNIX), I would like to find the CRID of an SCR related to the IR, basically one CR to another.
 
I search for IRs without a task related. Based on the return, I would like to display the CRIDs of the SCR related to the IR. For us, we start with the SCR and create an IR from it, which gets related to a task when code changes start. This query to trying to show which SCRs haven't had their code changes done yet.  [SCR->IR->task]. SCR and IR are both type problem and, I believe, the cr_types are 'SCR' and 'IR'.
 
I tried starting with 'query for all problems associated with a task' and tried to turn it into a 'query for all problems associated with a problem', but it returned nothing.
ccm query -type problem "has_associated_task('task20-1:task:db')"
 
ccm query -type problem "has_associated_cr('problem123-1:problem:db')"
ccm query -type problem "has_associated_ir('problem123-1:problem:db')"
 
Thanks
 
Also, I see in the help the funcitons 'cr' and 'task'. I tired to do something like
ccm query "(cr('123'))" -f "%displayname"
and it comes back with nothing, which I take to mean it didn't find 123, which does exists. Is there a way to get the info of an item through the format (rather than multiple attr calls) if you know the CR ID without doing a nested query?
 
Thanks again

Brandon

unread,
Jul 27, 2014, 4:18:46 PM7/27/14
to synergy...@googlegroups.com
 
Don't know what was different the other day, but the 'cr' is working ok now.  :)

On Sunday, July 27, 2014 3:28:41 PM UTC-4, Brandon wrote:
 ......

Sheehan, Richard F (US SSA)

unread,
Jul 28, 2014, 9:46:25 AM7/28/14
to synergy...@googlegroups.com

Brandon,

 

If I’m translating what you want to do correctly then I think something like the below query should provide you all the SCRs that have associated IRs that either do not have associated tasks yet or have tasks that are still assigned and for kicks I threw in a check to remove any that are rejected.

 

ccm query "has_associated_ir(( not has_associated_task(cvtype='task') or has_associated_task(status='task_assigned'))  and crstatus!='ir_rejected')" -f “%create_time %objectname”

 

Good luck,

 

Rich

 

Richard F. Sheehan

BAE SYSTEMS

Huron Campus – Bldg 46-2

1098 Clark Street

Endicott, NY 13760 - USA

 

(607) 770-2897 (desk)

(607) 953-9424 (mobile)

"If everyone is thinking alike, then somebody isn't thinking." - George S. Patton

--
You received this message because you are subscribed to the Google Groups "Synergy CM Tool" group.
To unsubscribe from this group and stop receiving emails from it, send an email to synergy-cm-to...@googlegroups.com.
To post to this group, send email to synergy...@googlegroups.com.
Visit this group at http://groups.google.com/group/synergy-cm-tool.
For more options, visit https://groups.google.com/d/optout.

William D Richards

unread,
Sep 4, 2014, 1:47:13 PM9/4/14
to synergy...@googlegroups.com

Urgent need :

 

   Is there a command line method to Attach a file to a Rational Change CR ?

 

Thanks.



Nothing in this message is intended to constitute an electronic signature unless a specific statement to the contrary is included in this message.

Confidentiality Note: This message is intended only for the person or entity to which it is addressed. It may contain confidential and/or privileged material. Any review, transmission, dissemination or other use, or taking of any action in reliance upon this message by persons or entities other than the intended recipient is prohibited and may be unlawful. If you received this message in error, please contact the sender and delete it from your computer.

Rudi

unread,
Sep 4, 2014, 3:10:44 PM9/4/14
to synergy...@googlegroups.com
Hi Bill,

(I think this post slipped into the the wrong discussion) .. to answer your question, I think you should be able "make" attachments.  I haven't had a need to do so myself, but have used the 'export' and 'import' functions heavily in the past to move CR data from one db to another.

Have a look at the following description:

I could imagine, that you can create an object relationship upfront and than do an import to "suck in" the named attachment. Something worth playing with ..

Good luck - Rudi.

Ritesh Nigam

unread,
Sep 5, 2014, 12:09:01 AM9/5/14
to synergy...@googlegroups.com
Hi William

You can try PERL based APIs provided by Rational Change, the one API I can remember is 'CreateAttachmentObject' which can solve your problem hopefully and you can run this through command line interface also. For details on the APIs please refer perl API help documentation.

Thanks
Ritesh Nigam


--
Reply all
Reply to author
Forward
0 new messages