Re: [rt-users] Custom fields in transaction
Can you provide some example? On the wiki I saw some scrip which was testing the return value of TransactionBatch method, but now after doing that I don't see the log. In custom action commit code: my $batch = $self->TicketObj->TransactionBatch; if($batch) { RT::Logger->info("transaction batch"); RT::Logger->info("Field Value: " . $self->TransactionObj- >FirstCustomFieldValue('Product')); } -- Nilesh On 01-Jul-2016 10:52 pm, "Jim Brandt" wrote: On 6/30/16 11:41 PM, Nilesh wrote: > Hi, > > I'm trying to assign the ticket to a queue based on a transaction > custom field, but I am unable to fetch the custom field in my scrip. > > Scrip details: > Condition: On correspond > Action: User defined > Template: Blank > > Custom condition: > 1; > > Custom action preparation code: > 1; > > Custom action commit code: > my $queueName = $self->TicketObj->QueueObj->Name; > RT::Logger->info("Queue name: $queueName"); > > my $trans = $self->TransactionObj; > RT::Logger->info($trans->FirstCustomFieldValue("Product")); > > -- > > The method FirstCustomFieldValue returns empty even though the value > is > set in form submission. > > All the stuff I found on Google are about custom fields in tickets, > seems nobody uses transaction custom fields? > > I'm using RT 4.4.0. > > If you are submitting the value for Product in the same update, the On Correspond transaction may run before the value is committed, so it's not there yet. Try moving the scrip to Batch stage rather than Normal. Batch runs at the end, so the value should be set. - RT 4.4 and RTIR Training Sessions https://bestpractical.com/training * Los Angeles - September, 2016 -- Nilesh - RT 4.4 and RTIR Training Sessions https://bestpractical.com/training * Los Angeles - September, 2016
Re: [rt-users] Custom fields in transaction
On 6/30/16 11:41 PM, Nilesh wrote: Hi, I'm trying to assign the ticket to a queue based on a transaction custom field, but I am unable to fetch the custom field in my scrip. Scrip details: Condition: On correspond Action: User defined Template: Blank Custom condition: 1; Custom action preparation code: 1; Custom action commit code: my $queueName = $self->TicketObj->QueueObj->Name; RT::Logger->info("Queue name: $queueName"); my $trans = $self->TransactionObj; RT::Logger->info($trans->FirstCustomFieldValue("Product")); -- The method FirstCustomFieldValue returns empty even though the value is set in form submission. All the stuff I found on Google are about custom fields in tickets, seems nobody uses transaction custom fields? I'm using RT 4.4.0. If you are submitting the value for Product in the same update, the On Correspond transaction may run before the value is committed, so it's not there yet. Try moving the scrip to Batch stage rather than Normal. Batch runs at the end, so the value should be set. - RT 4.4 and RTIR Training Sessions https://bestpractical.com/training * Los Angeles - September, 2016
Re: [rt-users] SLA Extension change SLA on queue change
Thanks Sally! Seems like that may be my only option here! Appreciate your assistance. Nick Adams > On Jun 28, 2016, at 3:06 AM, Sally Ainsley > wrote: > > Hi Nick > > We have the SLA field as Mandatory so when I move a ticket between queues I > have to re-set the SLA to an SLA relevant for that queue before I can save it. > > Sally > > > -Original Message- > From: Nicholas Adams [mailto:nick.adams...@gmail.com] > Sent: 27 June 2016 18:26 > To: Sally Ainsley > Cc: rt-users@lists.bestpractical.com > Subject: Re: [rt-users] SLA Extension change SLA on queue change > > Sally, > > Tried this with unique alpha names for the SLA’s in between two queues. > > Still no such luck. Any other ideas? > > Thank you! > Nick > >> On Jun 27, 2016, at 11:25 AM, Sally Ainsley >> wrote: >> >> Maybe the default only works when the SLA is blank in which case it wouldn’t >> work when you change queues. I guess you could try having very different >> names for the SLAs in each queue. >> >> -Original Message- >> From: Nicholas Adams [mailto:nick.adams...@gmail.com] >> Sent: 27 June 2016 17:24 >> To: Sally Ainsley >> Cc: rt-users@lists.bestpractical.com >> Subject: Re: [rt-users] SLA Extension change SLA on queue change >> >> Hi Sally, >> >> Thanks for the reply. >> >> I believe I have the default SLA set but it does not apply when the queue is >> changed. >> But I’m going to double check my defaults just in case I am mistaken. >> >> Thank you! >> Nick >> >>> On Jun 27, 2016, at 11:22 AM, Sally Ainsley >>> wrote: >>> >>> Hi Nick >>> >>> Can you use a "default" SLA for each queue - then in theory when the >>> ticket changed queue the SLA would update to be the default? >>> >>> Not sure it would work but we have default SLAs for our queues as >>> well as ones that are chosen by users. (ie default is used the >>> user/requestor leaves blank. >>> >>> Sally >>> >>> -Original Message- >>> From: rt-users [mailto:rt-users-boun...@lists.bestpractical.com] On >>> Behalf Of Nicholas Adams >>> Sent: 27 June 2016 17:20 >>> To: rt-users@lists.bestpractical.com >>> Subject: [rt-users] SLA Extension change SLA on queue change >>> >>> Good day, >>> >>> I have successfully configured the SLA extension to apply SLA to new >>> tickets within specific queues. >>> >>> I wonder if there is a way that I can apply a new SLA to an existing >>> ticket on queue change. >>> >>> For example - ticket is created in queue Alpha and is automatically >>> assigned an SLA of my choice. A user moves the ticket from Alpha >>> into queue Beta. I would like for a new SLA to automatically be >>> applied when the ticket is moved. >>> >>> Any ideas on how I could accomplish this? >>> >>> Thanks >>> Nick >>> - >>> RT 4.4 and RTIR Training Sessions https://bestpractical.com/training >>> * Los Angeles - September, 2016 >>> >> >> > > - RT 4.4 and RTIR Training Sessions https://bestpractical.com/training * Los Angeles - September, 2016
[rt-users] Query time in queue after queue change
Hello all, Thanks for reading this. I am attempting to figure out a way to query whether mysql query or through the web gui how long a ticket spent in a queue. For example - I have a workflow which takes tickets between multiple queues. For reporting on the workflow effectiveness I want to see how long a ticket spent in each queue. Does anyone have any ideas regarding? Thank you! Nick Adams - RT 4.4 and RTIR Training Sessions https://bestpractical.com/training * Los Angeles - September, 2016