Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Request Tracker: Users

ticket's getheader method

 

 

Request Tracker users RSS feed   Index | Next | Previous | View Threaded


fm100terra at mail

Jun 26, 2012, 3:37 PM

Post #1 of 4 (539 views)
Permalink
ticket's getheader method

Hello. I have some questions abot GetHeader method. Any help is appreciated.

 I have a scrip which retrieves Date header  from ticket :

my $Transaction = $self->TransactionObj;
my $date_header = $Transaction->Attachments->First->GetHeader('Date');

This extraction works perfactly.  Further in the same scrip I have:

my $ticket = $search->Next     # ticket object is retrieved from queue
 
The question is how to get the same Date header from ticket object? Does the  Transaction/Attachment exist for already created ticket in queue ? Will Transactions field be useful in this case?


ruz at bestpractical

Jun 27, 2012, 2:21 PM

Post #2 of 4 (508 views)
Permalink
Re: ticket's getheader method [In reply to]

hi,

my $txns = $Ticket->Transactions;
while ( my $txn = $txns ) {
....
}

On Wed, Jun 27, 2012 at 1:37 AM, Alexander Sagratyan <fm100terra [at] mail> wrote:
> Hello. I have some questions abot GetHeader method. Any help is appreciated.
>
>  I have a scrip which retrieves Date header  from ticket :
>
> my $Transaction = $self->TransactionObj;
> my $date_header = $Transaction->Attachments->First->GetHeader('Date');
>
> This extraction works perfactly.  Further in the same scrip I have:
>
> my $ticket = $search->Next     # ticket object is retrieved from queue
>
> The question is how to get the same Date header from ticket object? Does the
>  Transaction/Attachment exist for already created ticket in queue ? Will
> Transactions field be useful in this case?



--
Best regards, Ruslan.


fm100terra at mail

Jun 27, 2012, 11:10 PM

Post #3 of 4 (506 views)
Permalink
Re: ticket's getheader method [In reply to]

Thanks for a help.

I also used Transactions property. But instead of while loop used Next method. Although I\ve expected to see First-lie method. Nevertheless everything works.


Thu, 28 Jun 2012 00:21:20 +0300 от Ruslan Zakirov <ruz [at] bestpractical>:



hi,

my $txns = $Ticket->Transactions;
while ( my $txn = $txns ) {
   ....
}

On Wed, Jun 27, 2012 at 1:37 AM, Alexander Sagratyan <fm100terra [at] mail> wrote:
> Hello. I have some questions abot GetHeader method. Any help is appreciated.
>
>  I have a scrip which retrieves Date header  from ticket :
>
> my $Transaction = $self->TransactionObj;
> my $date_header = $Transaction->Attachments->First->GetHeader('Date');
>
> This extraction works perfactly.  Further in the same scrip I have:
>
> my $ticket = $search->Next     # ticket object is retrieved from queue
>
> The question is how to get the same Date header from ticket object? Does the
>  Transaction/Attachment exist for already created ticket in queue ? Will
> Transactions field be useful in this case?



--
Best regards, Ruslan.


ruz at bestpractical

Jun 28, 2012, 11:17 AM

Post #4 of 4 (507 views)
Permalink
Re: ticket's getheader method [In reply to]

On Thu, Jun 28, 2012 at 9:10 AM, Alexander Sagratyan <fm100terra [at] mail> wrote:
> Thanks for a help.
>
> I also used Transactions property. But instead of while loop used Next
> method. Although I\ve expected to see First-lie method. Nevertheless
> everything works.

there was a typo. It sure should be my $txn = $txns->Next


>
>
> Thu, 28 Jun 2012 00:21:20 +0300 от Ruslan Zakirov <ruz [at] bestpractical>:
>
> hi,
>
> my $txns = $Ticket->Transactions;
> while ( my $txn = $txns ) {
>    ....
> }
>
> On Wed, Jun 27, 2012 at 1:37 AM, Alexander Sagratyan <fm100terra [at] mail>
> wrote:
>> Hello. I have some questions abot GetHeader method. Any help is
>> appreciated.
>>
>>  I have a scrip which retrieves Date header  from ticket :
>>
>> my $Transaction = $self->TransactionObj;
>> my $date_header = $Transaction->Attachments->First->GetHeader('Date');
>>
>> This extraction works perfactly.  Further in the same scrip I have:
>>
>> my $ticket = $search->Next     # ticket object is retrieved from queue
>>
>> The question is how to get the same Date header from ticket object? Does
>> the
>>  Transaction/Attachment exist for already created ticket in queue ? Will
>> Transactions field be useful in this case?
>
>
>
> --
> Best regards, Ruslan.
>
>



--
Best regards, Ruslan.

Request Tracker users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.