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

Mailing List Archive: Request Tracker: Devel

Question about rt-extension-extractcustomfieldvalues design

 

 

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


todd at chaka

Oct 24, 2010, 8:57 AM

Post #1 of 5 (950 views)
Permalink
Question about rt-extension-extractcustomfieldvalues design

Is there some reason extractcustomfieldvalues does it's work in Commit
instead of Prepare? I would think it fairly common to want to use {
$Ticket->FirstCustomFieldValue('foo') } in email templates, but
since extractcustomfieldvalues does it's work in Commit and the templates
are evaulated in Prepare, even scrip ordering doesn't make this possible.

Thanks.

-Todd


jesse at bestpractical

Oct 24, 2010, 8:45 PM

Post #2 of 5 (922 views)
Permalink
Re: Question about rt-extension-extractcustomfieldvalues design [In reply to]

On Sun 24.Oct'10 at 11:57:10 -0400, Todd Chapman wrote:
> Is there some reasonextractcustomfieldvalues does it's work in Commit instead
> of Prepare?

...because that's when you're supposed to actually do the work. What
you're looking for is a sensible request and is something we intend to
address when we get Scrips' replacement out the door.

> I would think it fairly common to want to use { $Ticket->
> FirstCustomFieldValue('foo') } in email templates, but
> sinceextractcustomfieldvalues does it's work in Commit and the templates are
> evaulated in Prepare, even scrip ordering doesn't make this possible.
>
> Thanks.
>
> -Todd

> _______________________________________________
> List info: http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-devel

_______________________________________________
List info: http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-devel


todd at chaka

Oct 24, 2010, 10:41 PM

Post #3 of 5 (924 views)
Permalink
Re: Question about rt-extension-extractcustomfieldvalues design [In reply to]

On Sun, Oct 24, 2010 at 11:45 PM, Jesse Vincent <jesse [at] bestpractical>wrote:

>
>
>
> On Sun 24.Oct'10 at 11:57:10 -0400, Todd Chapman wrote:
> > Is there some reason extractcustomfieldvalues does it's work in Commit
> instead
> > of Prepare?
>
> ...because that's when you're supposed to actually do the work. What
> you're looking for is a sensible request and is something we intend to
> address when we get Scrips' replacement out the door.
>

Interesting that the work of evaluating the template is done in Prepare.

What is the status of the scrips replacement? It a preview available on the
github repo?

Also, will scrips for objects other that tickets be supported?


> > I would think it fairly common to want to use { $Ticket->
> > FirstCustomFieldValue('foo') } in email templates, but
> > since extractcustomfieldvalues does it's work in Commit and the templates
> are
> > evaulated in Prepare, even scrip ordering doesn't make this possible.
> >
> > Thanks.
> >
> > -Todd
>
> > _______________________________________________
> > List info:
> http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-devel
>
>


todd at chaka

Oct 25, 2010, 7:11 AM

Post #4 of 5 (914 views)
Permalink
Re: Question about rt-extension-extractcustomfieldvalues design [In reply to]

What populates RequestingUnit? You are probably not using
ExtractCustomFieldValues for that.

On Mon, Oct 25, 2010 at 10:04 AM, Francis L Fabrizio <fabrizio [at] uab>wrote:

> Unless I misunderstand what you are asking, I think this actually does
> work. Here’s part of a template I did yesterday:
>
>
>
> -----------------
>
> This unowned ticket has just been assigned to the {
>
> if ($Transaction->Type eq "Create") {
>
> $OUT .= $Ticket->FirstCustomFieldValue("RequestingUnit");
>
> } else {
>
> $OUT .= $Transaction->NewValue();
>
> }
>
> } Area of Responsibility. Please review this ticket and take or assign
> ownership as appropriate.
>
> -------------------
>
>
>
> The RequestingUnit value gets populated appropriately when doing a Create
> transaction, which means that the call to FirstCustomFieldValue() worked.
>
>
>
> Is that not what you are trying to do?
>
>
>
> -Fran
>
>
>
> PS – The purpose of my template is to notify certain people when
> RequestingUnit is first populated or is changed, hence the branching logic.
> I think I had to call NewValue() in the case of a CustomField transaction
> because FirstCustomFieldValue was giving me the old value instead of the new
> one… I can’t quite recall, but in any case, calling FirstCustomFieldValue()
> from a template appears to be working fine.
>
>
>
>
>
> *From:* rt-devel-bounces [at] lists [mailto:
> rt-devel-bounces [at] lists] *On Behalf Of *Todd Chapman
> *Sent:* Sunday, October 24, 2010 10:57 AM
> *To:* RT developers
> *Subject:* [Rt-devel] Question about rt-extension-extractcustomfieldvalues
> design
>
>
>
> Is there some reason extractcustomfieldvalues does it's work in Commit
> instead of Prepare? I would think it fairly common to want to use {
> $Ticket->FirstCustomFieldValue('foo') } in email templates, but
> since extractcustomfieldvalues does it's work in Commit and the templates
> are evaulated in Prepare, even scrip ordering doesn't make this possible.
>
>
>
> Thanks.
>
>
>
> -Todd
>


ruz at bestpractical

Oct 25, 2010, 8:42 AM

Post #5 of 5 (917 views)
Permalink
Re: Question about rt-extension-extractcustomfieldvalues design [In reply to]

Hi,

One way to go is staging notifications at batch stage.

Regards, Ruslan. From phone.
2010 10 24 19:57 пользователь "Todd Chapman" <todd [at] chaka> написал:
> Is there some reason extractcustomfieldvalues does it's work in Commit
> instead of Prepare? I would think it fairly common to want to use {
> $Ticket->FirstCustomFieldValue('foo') } in email templates, but
> since extractcustomfieldvalues does it's work in Commit and the templates
> are evaulated in Prepare, even scrip ordering doesn't make this possible.
>
> Thanks.
>
> -Todd

Request Tracker devel 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.