![]() |
Telelogic SYNERGY (steve huntington) | ![]() |
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 |
![]() |
![]()
|
![]() |
|
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 ? |
|
![]() |
|
![]() |
|
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 |
|
![]() |
|
![]() |
|
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
|
|
![]() |
|
![]() |
|
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 |
|
![]() |
|
![]() |
|
Did you ever get this to work. I'm having the same problem. Please send code.
|
|
![]() |
|
![]() |
|
I had a problem very similar and this is how I set a date object using CSAPI:
------------------------- Thanks, Brian |
|
![]() |
|
![]() |
|
This didn't work for me. But I didn't get any errors. |
|
![]() |
|
![]() |
|
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 |
|
![]() |
|
![]() |
|
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. |
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.