Hi,
This would be better asked on clearquestug, but here's the answer:
This is the sort of thing that external scripts are good for, I'd
do it something like this:
use CQPerlExt;
my $session = CQPerlExt::CQSession_Build();
$session->UserLogon(admin, "mypw", "ADTS", ""))
$query = $session->BuildQuery("Defect");
$query->BuildField("id");
$query->BuildField("DeferredUntil");
$op = $query->BuildFilterOperator($CQPerlExt::CQ_BOOL_OP_AND);
my @today = localtime($^T);
$today[5]+=1900; #years since 1900
$today[4]++; # month nums are zero-based (jan = 0)
my $today = "$today[4]/$today[3]/$today[5]";
$op->BuildFilter("DeferredUntil", $CQPerlExt::CQ_COMP_OP_LT, [$today]);
$op->BuildFilter("State", $CQPerlExt::CQ_COMP_OP_EQ, ["Deferred"]);
my $result=$session->BuildResultSet($query);
$result->Execute();
while ($result->MoveNext()==$CQPerlExt::CQ_SUCCESS) {
my $id = $result->GetColumnValue(1);
my $defect = $session->GetEntity("Defect", $id);
$session->EditEntity($defect, "ReOpen");
$defect->SetFieldValue("NoteEntry", "DeferredUntil date has arrived");
$defect->Validate();
$defect->Commit();
}
With appropriate error checking, of course, especially on the call to
Validate()
and the call to UserLogon, but this should get you started...
-Peter
---
Peter A. Vogel
Manager+Consultant, Configuration Management
Arsin Corporation, Professional Services
<http://www.arsin.com>
> -----Original Message-----
> From: Huynh, Long [mailto:LHuynh@ea.com
> Sent: Tuesday, July 10, 2001 4:52 PM
> To: ClearCase User Group
> Cc: 'support@rational.com'
> Subject: [cciug] Adding logic to "Deferred Until" field?
>
>
>
> Is there a way to add logic to the "Deferred Until" field?
> For example, if
> a user sets a defect to Deferred and fills in the Deferred
> Until field with
> a date and time, can logic be added so that the specific
> defect is ReOpened
> on that day? Can this be done internally in ClearQuest? We
> are using CQ
> 2001.03.00.
>
> Long Huynh
> Mail lhuynh@ea.com
> AIM lhuynh408
> Electronic Arts Online
> EA.COM ~ the place to play!
>
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
>
> can also
> unsubscribe
>
> http://clearcase.rational.com/cciug/mailing_list.html
>
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
This archive was generated by hypermail 2b29 : Tue Jul 31 2001 - 22:03:52 EDT