Please take our Survey
logo       

Choosing A Webhost:
A web hosting service is a type of Internet hosting service that allows individuals and organizations to provide their own website accessible via the World Wide Web. Web hosts are companies that provide space on a server they own for use by their clients as well as providing Internet connectivity, typically in a data center. Web hosts can also provide data center space and connectivity to the Internet for servers they do not own to be located in their data center, called colocation. more...

RE: Re: Transfer custom field value in ticket creation: msg#00064

bug-tracking.request-tracker.devel

Subject: RE: Re: Transfer custom field value in ticket creation

It's a global CustomField named "Customer" we use it in RTIR queues, the idea
is trasfer the value from the Report to Incident, Investigations and Blocks,
because find it in a large list for every ticket is very time consuming.

I tried the scrip, but doesn't work.

Thanks.


Juan Ramón Alfageme Mata
+34 91 787 23 00 alhambra-eidos.com







----------------------------------------------------------------------

Date: Thu, 10 Mar 2005 15:02:19 -0300
From: "Lucas F. Rosada" <lucas@xxxxxxxxxxxxx>
Subject: [Rt-devel] Re: Transfer custom field value in ticket creation
To: rt-devel@xxxxxxxxxxxxxxxxxxxxxxx
Message-ID: <42308BAB.1000602@xxxxxxxxxxxxx>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

> Someone have any idea abaout how to transfer a custom field value?, when you
> create a new ticket from another, as for example create a
> Incident from Incident Report, but instead of selecting it again values for
> custom field in the Incident use the Report ones.


You can do it by developing an scrip, but we need to have some reference to the
"source ticket" (the ticket which have the custom fields we want). Supose the
situation:

- We want to copy custom field values of CF1;

- Ticket A (Incident Report) - Have the custom field values we want to copy;
- Ticket B (Incident) - The just created ticket;

The queues must have the same custom fields (or just with equal names)

- Ticket B REFERS TO Ticket A;

Scrip:
Queue: Incident
Stage: TransactionCreate
Condition: OnCreate
Action: User Defined:
Custom Prepare Code:
return 1;

Custom Commit code:

# Reaching the referred ticket by the links
my $Reference = $self->TicketObj->RefersTo->Next;
my $SourceTicket = $Reference->TargetObj if ($Reference);

# we get the custom fields
my $CF1Values = $SourceTicket->CustomFieldValues ('CF1');

while (my $CurrValue = $CF1Values->Next) {
$self->TicketObj->AddCustomFieldValue (Field => 'CF1', Value =>
$CurrValue->Content);
}

return 1;

I think that's all!

Regards,

--
Lucas F. Rosada
lucas@xxxxxxxxxxxxx

Dextra Sistemas
+55 (19) 3256 6722
http://www.dextra.com.br


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
drivers.mtd/200...    security.firewa...    java.openamf.cv...    rpm.yum/2003-08...    telephony.sipp....    file-systems.oc...    qnx.openqnx.dev...    voip.linphone.u...    hardware.sony/2...    network.simulat...    boot-loaders.gr...    ietf.usenet.for...    culture.languag...    emacs.latex.pre...    music.jamiroqua...    xfree86.neomagi...    user-groups.lin...    ltp/2006-08/msg...    kde.kst/2005-08...    programming.too...    os.freebsd.deve...    window-managers...    audio.cd-record...    gnu.fiasco.bugs...   
Home | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe

Navigation