![]() |
Telelogic SYNERGY (steve huntington) | ![]() |
Topic Title: Can you create a CR from the command line? Topic Summary: Created On: 13-May-2004 14:57 Status: Read Only |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() Answer: I used this script to create a CR, but how is-it possible to identify the number of the CR created? I tried this my $problem2 = $tmpstr->getResponseData(); print $problem2; but it gives me a line too long and not only the CR number regards Alain Maury | |
![]() |
|
Hello !!! :-)
it used to be possible to create Problems with SYNERGY/CM CLI (command line interface), but this feature has been removed from SYNERGY/CM 6.3 and SYNERGY/Change 4.3 product releases. The only way to create CR from command line is now to use the CS Perl API that is bundled in SYNERGY/Change. Please tell me if you need some examples. Vincent |
|
![]() |
|
![]() |
|
Hello,
New(er) user here. I have a situation where it would be very useful to be able to use a Perl script to create CRs. I would also appreciate it if you would be so kind as to post those scripts here. Thanks! |
|
![]() |
|
![]() |
|
Hello,
I use the PERL API to create CR and it works fine. Please find this example of code : use ChangeSynergy::csapi; #Main module for the CS API. my $csapi = new ChangeSynergy::csapi(); my $aUser; # Parameters definition my $host = <your server_name>; my $port = <your port number>; my $database = <your full_database_path>; eval { # Setup the connection $csapi->setUpConnection("http", $host, $port); # Create a user object my $aUser = $csapi->Login("csuser", "csuser_password", "User", $database); my $tmp = $csapi->SubmitCRData($aUser, "START_HERE2entered"); # Build CR data $tmp->getDataObjectByName("problem_synopsis")->setValue("TEST"); $tmp->getDataObjectByName("problem_description")->setValue("TEST"); $tmp->getDataObjectByName("crstatus")->setValue($tmp->getTransitionLink(0)->getToState()); # Submit my $tmpstr = $csapi->SubmitCR($aUser, $tmp); }; exit 0; if submit.pl contains this code, you can execute it by entering : perl submit.pl Hope that will help you. Regards, Jean-Pierre LEIVA |
|
![]() |
|
![]() |
|
Can you also indicate how you create Change Requests under CMSynergy 6.2 and ChangeSynergy 4.2. Or can the Perl API be used in these versions as well
|
|
![]() |
|
![]() |
|
I used this script to create a CR, but how is-it possible to identify the number of the CR created?
I tried this my $problem2 = $tmpstr->getResponseData(); print $problem2; but it gives me a line too long and not only the CR number regards Alain Maury |
|
![]() |
|
![]() |
|
Once your script displays : Submit was successful. CR ID is mydb~1234.
Just parse the data using perl. my $response=($tmpstr->getResponseData()); chomp $response ; #remove 'dots' $response=~ s/\./ /g; #print the 6th argument my @data= split(' ',$response); print "$data[6] \n"; |
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.