[rt-users] Problems with ExtractCustomFieldValues
Andy Harrison
aharrison at gmail.com
Tue Feb 22 10:48:43 EST 2005
On Mon, 21 Feb 2005 09:23:02 -0800, Atom Powers <APowers at pyramidbrew.com> wrote:
>
> -----Original Message-----
> From: Andy Harrison [mailto:aharrison at gmail.com]
> Sent: Saturday, February 19, 2005 8:37 AM
> To: Atom Powers
> Cc: rt-users at lists.bestpractical.com
> Subject: Re: [rt-users] Problems with ExtractCustomFieldValues
>
> On Fri, 18 Feb 2005 15:57:20 -0800, Atom Powers <APowers at pyramidbrew.com>
> wrote:
> >
> > I'm attempting to set the initial priority of a ticket using
> > ExtractCustomFieldValues.
> > New tickets are entered through a web form which includes this line
> > (or something similar):
> > --
> > Priority: 11, Low - Minor Disruption/Inconv Due Date: 2/25/2005
> > --
> >
> > I've installed ExtractCustomFieldValues and set up an OnCreate script
> > with this form:
> > --
> > # Syntax:
> > # cf-name | Headername or "Body" | MatchString(re) | Postcmd | Options
> > # # Scan body for Priority and put it into priority
> > Priority|Body|Priority:\s*(\d+),.*|
> > --
>
> Your scrip should be nothing more than:
>
> Condition: On Create
> Action: Extract Custom Field Values
> Stage: TransationCreate
> Template: YourCustomFieldExtractionTemplate
>
> The part you've put in as a scrip needs to be the template.
>
> ----
> That's what I have:
> In Configuration, Global, Scripts, ExtractFieldValues:
>
> Description: ExtractFieldValues
> Condition: On Create
> Action: Extract Custom Field Values
> Template: Global template: CustomFieldScanner
> Stage: TransactionCreate
>
> In Configuration, Global, Templates, CustomFieldScanner:
>
> # Syntax:
> # cf-name | Headername or "Body" | MatchString(re) | Postcmd | Options
> #
> # Scan body for "Priority" and put it into Priority
> Priority|Body|Priority:\s*(\d+),.*|
>
> The perl used in RT is beyond my ability to read. Can you tell me if my form
> is correct? Where can I find logs for this action?
>
That comma in your regex might be breaking it. It expects to match
"Priority: 50, foo bar baz" but if you have just "Priority: 50" by
itself, no match.
--
Andy Harrison
More information about the rt-users
mailing list