|
|
Choosing A Webhost: |
Re: Re: Transfer custom field value in ticket creation: msg#00079bug-tracking.request-tracker.devel
Still not work but I think that must be "BaseObj" instead of "TargetObj" because link base is Report and link target is the Incident. my $SourceTicket = $Reference->TargetObj if ($Reference); Fixed: my $SourceTicket = $Reference->BaseObj if ($Reference); Juan Ramón Alfageme Mata +34 91 787 23 00 alhambra-eidos.com ---------------------------------------------------------------------- Message: 1 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> |
|---|---|---|
| Previous by Date: | RE: CAS SSO using RT, Meo, Anthony |
|---|---|
| Next by Date: | RE: ModifySelf right produces "Permission Denied", Norton, Ian |
| Previous by Thread: | RE: Re: Transfer custom field value in ticket creation, Juan Ramón Alfageme Mata |
| Next by Thread: | Error Parsing of undecoded UTF-8, Rafael |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
Free MagazinesCisco NewsReceive 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 |