<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Hi,<br>
<br>
On a similar note, I was trying to understand where is this
limitation coming from, and had a dive into the source code, in the
hope for an easy patch. I found out where is the SLA field (re-)set,
in the RT-Extension-SLA/lib/RT/Action/SLA_SetDue.pm file:<br>
<br>
<br>
sub Commit {<br>
my $self = shift;<br>
<br>
my $ticket = $self->TicketObj;<br>
my $txn = $self->TransactionObj;<br>
my $level = $ticket->FirstCustomFieldValue('SLA');<br>
<br>
my ($last_reply, $is_requestor) = $self->LastEffectiveAct;<br>
$RT::Logger->debug(<br>
'Last effective '. ($is_requestor? '':'non-') .'requestors\'
reply'<br>
.' to ticket #'. $ticket->id .' is txn #'.
$last_reply->id<br>
);<br>
<br>
my $response_due = $self->Due(<br>
Ticket => $ticket,<br>
Level => $level,<br>
Type => $is_requestor? 'Response': 'KeepInLoop',<br>
Time => $last_reply->CreatedObj->Unix,<br>
);<br>
<br>
my $resolve_due = $self->Due(<br>
Ticket => $ticket,<br>
Level => $level,<br>
Type => 'Resolve',<br>
Time => $ticket->CreatedObj->Unix,<br>
);<br>
<br>
my $due;<br>
$due = $response_due if defined $response_due;<br>
$due = $resolve_due unless defined $due;<br>
$due = $resolve_due if defined $due && defined
$resolve_due && $resolve_due < $due;<br>
<br>
return $self->SetDateField( Due => $due );<br>
}<br>
<br>
<br>
The Reponse type is nice and dynamic... but the Resolve type is very
static: either the ticket original due date, or nothing.<br>
It would be ideal to make it $ticket->CreatedObj->Unix +
TIME_SPENT_IN_IGNORED_STATES.<br>
<br>
Is there a way we can query how much time did a ticket spend in one
state?<br>
(this is probably a question for the rt-devel list, I will subscribe
if needed)<br>
<br>
Thanks!!<br>
BR/Pablo<br>
<br>
<br>
<div class="moz-cite-prefix">On 02/27/2014 10:53 PM, Kevin Falcone
wrote:<br>
</div>
<blockquote cite="mid:20140227215310.GG3080@jibsheet.com"
type="cite">
<pre wrap="">On Thu, Feb 27, 2014 at 10:58:48AM +0100, Andrea Zimmerli wrote:
</pre>
<blockquote type="cite">
<pre wrap=""> Hi,
I'm using RT 3.8.17 and installed RT::Extension::SLA 0.07, currently testing it.
When I set a ticket status to "Stalled" the due date gets unset, and this is what I want.
However, when I set the ticket status back to "open", the due date is set back
to the original value, it may correspond already to a past date.
Do you know if there is a way to have the due date set automatically
to a time in future, i.e. now+QueuePriority?
Response => { RealMinutes => 60*1 , IgnoreOnStatuses => ['stalled'] },
</pre>
</blockquote>
<pre wrap="">
Looking at the docs for IgnoreOnStatuses, there's a NOTE that
addresses what you want.
<a class="moz-txt-link-freetext" href="https://metacpan.org/source/TSIBLEY/RT-Extension-SLA-0.07/README#L240">https://metacpan.org/source/TSIBLEY/RT-Extension-SLA-0.07/README#L240</a>
Unfortunately, the answer is no without further enhancement of the SLA
extension.
-kevin
</pre>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
</blockquote>
<br>
</body>
</html>