DefaultCustomFieldValue in RT 4.2.11

Dear members of this mailing list,

since an upgrade from RT 3.8.8 to 4.2.11 our mechanism to set specific values for custom fields on creation of tickets is no longer working.

I was wondering how this can be achieved with the latter RT. Found this WIKI article: http://requesttracker.wikia.com/wiki/DefaultCustomFieldValue (and others).
But to be honest, I do not really understand how this is supposed to work.
Creating the Callback, okay, I get that. But then:

"Second, you need to go to the custom fields values class, and add the method that will return the default value."
Which one is the custom fields values class?
And even after the second code snippet (example) I don’t get it.

Then the author of this article goes ahead, but his explanations are not really helpful, at least not for me.
Even if this should work somehow in a magic way, how does one specify the default value for a certain custom field?
In the past we had a mechanism to write ‘default’ in the custom field description, and this value was preselected when creating a ticket.
This was implemented in 3.8.8 in /var/www/html/rt/local/html/Elements/EditCustomFieldSelect but the changes compared to the code in 4.2.11 are huge and unfortunately I am not really comfortable with Perl …

So any advice would be highly appreciated, thanks & Cheers

André.

Dear members of this mailing list,

since an upgrade from RT 3.8.8 to 4.2.11 our mechanism to set specific
values for custom fields on creation of tickets is no longer working.

[…]

So any advice would be highly appreciated, thanks & Cheers

4.4 has native support for CF default values. I’d wait and upgrade to that.

-m

Hi Andre,

I would create a scrip:

Condition: On Create
Action: User defined
Template: Blank
Custom action preparation code: return 1;
Custom action commit code:

$self->TicketObj(
Field => 'custom field id or name’
Value => ‘the default value’
);

This will work if you don’t have many queues and custom fields where you
want to set a default value.

As Matt Zagrabelny already noted, RT 4.4 will have the ability to define
custom field default values per queue.
So this scrip would be only a temporary solution until you upgrade to RT
4.4 (which isn’t released yet, but RC1 is available).

ChrisAm 18.11.2015 um 11:13 schrieb Andre.Schmelzer@t-systems.com:

Dear members of this mailing list,

since an upgrade from RT 3.8.8 to 4.2.11 our mechanism to set specific
values for custom fields on creation of tickets is no longer working.

I was wondering how this can be achieved with the latter RT. Found this
WIKI article:
http://requesttracker.wikia.com/wiki/DefaultCustomFieldValue (and others).
But to be honest, I do not really understand how this is supposed to work.
Creating the Callback, okay, I get that. But then:

�/Second, you need to go to the custom fields values class, and add the
method that will return the default value./�
Which one is the custom fields values class?
And even after the second code snippet (example) I don�t get it.

Then the author of this article goes ahead, but his explanations are not
really helpful, at least not for me.
Even if this should work somehow in a magic way, how does one specify
the default value for a certain custom field?
In the past we had a mechanism to write �default� in the custom field
description, and this value was preselected when creating a ticket.
This was implemented in 3.8.8 in
/var/www/html/rt/local/html/Elements/EditCustomFieldSelect but the
changes compared to the code in 4.2.11 are huge and unfortunately I am
not really comfortable with Perl …

So any advice would be highly appreciated, thanks & Cheers

Andr�.