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: I want to set a CCM_DATE attribute with CSAPI with format
Topic Summary:
Created On: 8-Apr-2005 14:00
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.
 8-Apr-2005 14:00
User is offline View Users Profile Print this message


François Jouve

Posts: 3
Joined: 16-Jul-2004

I try to use the CSAPI to create new CRs.
In the required attributes I need to fill for the CR creation, there is one of CCM_DATE type.

How can I set a value for that kind of type, with a value in the form "mm/dd/yyyy HH:MM:SS"?
When I use SubmitCR() method, I get no result. I imagine it is due to this attribute.

Below is the sample of code :
my $tmp = $csapi_scm->SubmitCRData($aUser, "START_HERE2OPEN");

$tmp->getDataObjectByName("problem_synopsis")->setValue($aSynopis);
$tmp->getDataObjectByName("problem_description")->setValue($aDescription);
$tmp->getDataObjectByName("is_problem")->setValue($tmp->getDataObjectByName("is_problem")->getDefault());
$tmp->getDataObjectByName("request_origin")->setValue($aOrigin);

# This is the CCM_DATE attribute
$tmp->getDataObjectByName("due_date")->setDate("05/22/2005 00:00:00");
$tmp->getDataObjectByName("crstatus")->setValue($tmp->getTransitionLink(0)->getToState());

my $tmpstr = $csapi_scm->SubmitCR($aUser, $tmp);
my $response=($tmpstr->getResponseData());

No date is filled in the created CR.

Is there any date conversion tool availble in some perl module ?
Report this to a Moderator Report this to a Moderator
 2-Aug-2005 10:31
User is offline View Users Profile Print this message


Adrian Faiers

Posts: 4
Joined: 6-Jul-2004

Francois

I have some Perl date routines I have downloaded from several websites in the past. If you email me at afaiers@essentis.com, I will pass them on to you.

Regards
Adrian
Report this to a Moderator Report this to a Moderator
 5-Aug-2005 09:49
User is offline View Users Profile Print this message


ludovic michoux

Posts: 8
Joined: 8-Feb-2005

Hi, I suggest you look at telelogic document "NACM00716" By default, a user may only input dates to SYNERGY/Change. Any time values which a user enters are stripped off. The following describes how to configure SYNERGY/Change (CS) to also accept a time value. Ludo
Report this to a Moderator Report this to a Moderator
 14-Oct-2005 20:25
User is offline View Users Profile Print this message


James H. Heimbach

Posts: 4
Joined: 21-May-2004

You are quite close. I believe you are simply using the incorrect call. Replace 'setDate', which I don't believe exists for the obect you are calling, with 'setValue' and you should be OK. The line should read:
$tmp->getDataObjectByName("due_date")->setValue("05/22/2005 00:00:00");

See the comments in $CS_HOME/cs_app/webapps/synergy/WEB-INF/bin/lib/ChangeSynergy/csapi.pm

Regards,
Jim Heimbach
Sprint
Report this to a Moderator Report this to a Moderator
 18-Jul-2007 17:04
User is offline View Users Profile Print this message


Tiffany Barnes

Posts: 4
Joined: 22-Jul-2006

Did you ever get this to work.  I'm having the same problem.  Please send code.
Report this to a Moderator Report this to a Moderator
 18-Jul-2007 19:33
User is offline View Users Profile Print this message


Brian Barde

Posts: 39
Joined: 24-Sep-2004

I had a problem very similar and this is how I set a date object using CSAPI:


-------------------------
Thanks,
Brian
Report this to a Moderator Report this to a Moderator
 18-Jul-2007 19:42
User is offline View Users Profile Print this message


Tiffany Barnes

Posts: 4
Joined: 22-Jul-2006

This didn't work for me.  But I didn't get any errors.

  I have attached my code.

Thanks for your help

Report this to a Moderator Report this to a Moderator
 18-Jul-2007 21:48
User is offline View Users Profile Print this message


Brian Barde

Posts: 39
Joined: 24-Sep-2004

The only thing that I saw that was different in mine was the following line: #Get the object my $tmp = $csapi->GetCRData($user, $trigger->get_object_id(), "$attrName"); try using the $trigger-> before get_object_id

-------------------------
Thanks,
Brian
Report this to a Moderator Report this to a Moderator
 19-Jul-2007 21:17
User is offline View Users Profile Print this message


Tiffany Barnes

Posts: 4
Joined: 22-Jul-2006

Thanks for your help.  The code you provide did work successfully.  I had async on the trigger, which caused the date field not to update immediately.  I removed the async and now it works great.

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.