Welcome to Telelogic Product Support
  Home Downloads Knowledgebase Case Tracking Licensing Help Telelogic Passport
Telelogic SYNERGY (steve huntington)
Decrease font size
Increase font size
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
Search Topic Search Topic
Topic Tools Topic Tools
Subscribe to this topic Subscribe to this topic
E-mail this topic to someone. E-mail this topic
Bookmark this topic Bookmark this topic
View similar topics View similar topics
View topic in raw text format. Print this topic.
Answer This question was answered by eric pantalone, on Friday, March 11, 2005 4:47 PM

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
 13-May-2004 20:20
User is offline View Users Profile Print this message


Vincent Gaudeul

Posts: 68
Joined: 10-Oct-2002

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
Report this to a Moderator Report this to a Moderator
 9-Jul-2004 18:05
User is offline View Users Profile Print this message


Leslie Larsen

Posts: 9
Joined: 24-Feb-2004

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!
Report this to a Moderator Report this to a Moderator
 11-Aug-2004 14:29
User is offline View Users Profile Print this message


Jean-Pierre LEIVA

Posts: 5
Joined: 17-Dec-2003

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
Report this to a Moderator Report this to a Moderator
 2-Sep-2004 16:01
User is offline View Users Profile Print this message


Michael Woods

Posts: 1
Joined: 26-Jan-2004

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
Report this to a Moderator Report this to a Moderator
 13-Dec-2004 14:58
User is offline View Users Profile Print this message


eric pantalone

Posts: 1
Joined: 13-Dec-2004

Answer 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
Report this to a Moderator Report this to a Moderator
 15-Mar-2005 10:14
User is offline View Users Profile Print this message


ludovic michoux

Posts: 8
Joined: 8-Feb-2005

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";


Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic SYNERGY forum.
There are currently 1 users logged in.
The most users ever online was 15 on 15-Jan-2009 at 15:34.
There are currently 0 guests browsing this forum, which makes a total of 1 users using this forum.
You have posted 0 messages to this forum. 0 overall.

FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.