Custom field not mandatory in all queues

Is there a way to make a custom field mandatory in 3 queues, but not
mandatory in a 4th queue?

Thanks,
Laura
View this message in context: http://www.nabble.com/Custom-field-not-mandatory-in-all-queues-tp21880139p21880139.html

Laura,

I'm only on 3.6.4 so my comment may be out of date. I don't think 

that’s possible in configuration. If a CF is set up to be mandatory,
then whenever it is applied to a queue, those tickets will require an
entry. What you can do is remove the “Mandatory” setting and then write
a scrip for the queues you want it to be mandatory in and do a return 0
when checking it against the desired transactions and it is empty. Hope
this helps.

Kenn
LBNLOn 2/6/2009 12:33 PM, Laura Grella wrote:

Is there a way to make a custom field mandatory in 3 queues, but not
mandatory in a 4th queue?

Thanks,
Laura

Thanks Kenn,

It has been at least 6 months since I have done any scrip coding and was
wondering if you had any sample code that would check the field and return 0
when empty? I’d really appreciate it.

Thanks,
Laura

Kenneth Crocker wrote:

Laura,

I’m only on 3.6.4 so my comment may be out of date. I don’t think
that’s possible in configuration. If a CF is set up to be mandatory,
then whenever it is applied to a queue, those tickets will require an
entry. What you can do is remove the “Mandatory” setting and then write
a scrip for the queues you want it to be mandatory in and do a return 0
when checking it against the desired transactions and it is empty. Hope
this helps.

Kenn
LBNL

Is there a way to make a custom field mandatory in 3 queues, but not
mandatory in a 4th queue?

Thanks,
Laura


http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sales@bestpractical.com

Discover RT’s hidden secrets with RT Essentials from O’Reilly Media.
Buy a copy at http://rtbook.bestpractical.com

View this message in context: http://www.nabble.com/Custom-field-not-mandatory-in-all-queues-tp21880139p21880998.html

This is a code example where I’m checking to see if a CustomField
called “Application” has a value in it. If it doesn’t then the
cleanup code changes the status back to OPEN and add a comment to the
ticket stating it was missing a value.

The Custom Action code has to handle that an update may involve
multiple transactions and you have to look at each transaction to if
one of them is going to update that field.

Hope that helps,
CR

CONDITION: On Resolve
ACTION: User Defined
STAGE: TransactionBatch
#CUSTOM ACTION PREPARATION

See if there is a Transaction modifying Application field

my @batch= @{ $self->TicketObj->TransactionBatch };
foreach my $txn ( @batch ) {
my $txnType = $txn->Type;
my $txnDesc = $txn->Description;
if ($txnType eq ‘CustomField’) {
if ($txnDesc =~ /^Application/) {
return 0; # There is a transaction updating Application so
don’t run
}
}
}

Get the Application value

my $CFV = $self->TicketObj->FirstCustomFieldValue(‘Application’);

Choose whether to run script

if ($CFV) {
return 0; # There is a value so don’t execute scrip
}

if ($self->TicketObj->QueueObj->Name eq ‘Server’) {
return 0; # Skipping the Server queue
}
else {
return 1; # There isn’t a value so execute scrip
}

return 0;
#CUSTOM ACTION CLEANUP

Set ticket status to open

my ($status, $msg) = $self->TicketObj->SetStatus( ‘open’ );
unless( $status ) {
$RT::Logger->error( “ERROR - NoApplication SCRIP: $msg” );
return undef;
}

Add a comment to the ticket

$self->TicketObj->Comment( Content => ‘Missing Custom Field Value -
Application! - Status has been changed to OPEN’);

return 1;On Feb 6, 2009, at 3:30 PM, Laura Grella wrote:

Thanks Kenn,

It has been at least 6 months since I have done any scrip coding and
was
wondering if you had any sample code that would check the field and
return 0
when empty? I’d really appreciate it.

Thanks,
Laura

Kenneth Crocker wrote:

Laura,

I’m only on 3.6.4 so my comment may be out of date. I don’t think
that’s possible in configuration. If a CF is set up to be mandatory,
then whenever it is applied to a queue, those tickets will require an
entry. What you can do is remove the “Mandatory” setting and then
write
a scrip for the queues you want it to be mandatory in and do a
return 0
when checking it against the desired transactions and it is empty.
Hope
this helps.

Kenn
LBNL

On 2/6/2009 12:33 PM, Laura Grella wrote:

Is there a way to make a custom field mandatory in 3 queues, but not
mandatory in a 4th queue?

Thanks,
Laura


http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sales@bestpractical.com

Discover RT’s hidden secrets with RT Essentials from O’Reilly Media.
Buy a copy at http://rtbook.bestpractical.com


View this message in context: http://www.nabble.com/Custom-field-not-mandatory-in-all-queues-tp21880139p21880998.html
Sent from the Request Tracker - User mailing list archive at
Nabble.com.


http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sales@bestpractical.com

Discover RT’s hidden secrets with RT Essentials from O’Reilly Media.
Buy a copy at http://rtbook.bestpractical.com

It would be easier to make two CFs with the same name. Make it mandatory in
one and apply it to 3 queues. The other gets applied to the fourth queue.On Fri, Feb 6, 2009 at 4:30 PM, Laura Grella lgrella@acquiremedia.comwrote:

Thanks Kenn,

It has been at least 6 months since I have done any scrip coding and was
wondering if you had any sample code that would check the field and return
0
when empty? I’d really appreciate it.

Thanks,
Laura

Kenneth Crocker wrote:

Laura,

  I'm only on 3.6.4 so my comment may be out of date. I don't think

that’s possible in configuration. If a CF is set up to be mandatory,
then whenever it is applied to a queue, those tickets will require an
entry. What you can do is remove the “Mandatory” setting and then write
a scrip for the queues you want it to be mandatory in and do a return 0
when checking it against the desired transactions and it is empty. Hope
this helps.

Kenn
LBNL

On 2/6/2009 12:33 PM, Laura Grella wrote:

Is there a way to make a custom field mandatory in 3 queues, but not
mandatory in a 4th queue?

Thanks,
Laura


http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sales@bestpractical.com

Discover RT’s hidden secrets with RT Essentials from O’Reilly Media.
Buy a copy at http://rtbook.bestpractical.com


View this message in context:
http://www.nabble.com/Custom-field-not-mandatory-in-all-queues-tp21880139p21880998.html
Sent from the Request Tracker - User mailing list archive at Nabble.com.


http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sales@bestpractical.com

Discover RT’s hidden secrets with RT Essentials from O’Reilly Media.
Buy a copy at http://rtbook.bestpractical.com

Laura,

Although I hate redundancy and as an ex-DBA I have always believed 1 

field/1 name, I have to agree with Todd :-). RT is not an accounting
system or parts system where everything has to be tidy, etc. In this
case, it’s the same name for the same type of data. So, other than
double the work of maintaining the same values in two fields, that’s a
good idea. If it works, then it’s fine and Todd’s idea will certainly work.

Kenn
LBNLOn 2/6/2009 1:49 PM, Todd Chapman wrote:

It would be easier to make two CFs with the same name. Make it mandatory
in one and apply it to 3 queues. The other gets applied to the fourth queue.

On Fri, Feb 6, 2009 at 4:30 PM, Laura Grella <lgrella@acquiremedia.com mailto:lgrella@acquiremedia.com> wrote:

Thanks Kenn,

It has been at least 6 months since I have done any scrip coding and was
wondering if you had any sample code that would check the field and
return 0
when empty? I'd really appreciate it.

Thanks,
Laura

Kenneth Crocker wrote:
 >
 > Laura,
 >
 >       I'm only on 3.6.4 so my comment may be out of date. I don't
think
 > that's possible in configuration. If a CF is set up to be mandatory,
 > then whenever it is applied to a queue, those tickets will require an
 > entry. What you can do is remove the "Mandatory" setting and then
write
 > a scrip for the queues you want it to be mandatory in and do a
return 0
 > when checking it against the desired transactions and it is
empty. Hope
 > this helps.
 >
 >
 > Kenn
 > LBNL
 >
 > On 2/6/2009 12:33 PM, Laura Grella wrote:
 >> Is there a way to make a custom field mandatory in 3 queues, but not
 >> mandatory in a 4th queue?
 >>
 >> Thanks,
 >> Laura
 >
 > _______________________________________________
 > http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
 >
 > Community help: http://wiki.bestpractical.com
 > Commercial support: sales@bestpractical.com
<mailto:sales@bestpractical.com>
 >
 >
 > Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
 > Buy a copy at http://rtbook.bestpractical.com
 >
 >

--
View this message in context:
http://www.nabble.com/Custom-field-not-mandatory-in-all-queues-tp21880139p21880998.html
Sent from the Request Tracker - User mailing list archive at Nabble.com.

_______________________________________________
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sales@bestpractical.com
<mailto:sales@bestpractical.com>


Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
Buy a copy at http://rtbook.bestpractical.com


http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sales@bestpractical.com

Discover RT’s hidden secrets with RT Essentials from O’Reilly Media.
Buy a copy at http://rtbook.bestpractical.com

I thought of this, but the custom field is “Customer” and it is mandatory in
the customer support and account management queues, but I don’t want it
mandatory in the Software Dev. queue but I want the data to flow from one
queue to the next, so if it is in the cust queue, it switches to the soft
dev queue, I want it to follow along to the soft dev queue, but it should
not be mandatory for the input form. I do want the user to have the option
to enter it though.

Todd Chapman wrote:

It would be easier to make two CFs with the same name. Make it mandatory
in
one and apply it to 3 queues. The other gets applied to the fourth queue.

Thanks Kenn,

It has been at least 6 months since I have done any scrip coding and was
wondering if you had any sample code that would check the field and
return
0
when empty? I’d really appreciate it.

Thanks,
Laura

Kenneth Crocker wrote:

Laura,

  I'm only on 3.6.4 so my comment may be out of date. I don't think

that’s possible in configuration. If a CF is set up to be mandatory,
then whenever it is applied to a queue, those tickets will require an
entry. What you can do is remove the “Mandatory” setting and then write
a scrip for the queues you want it to be mandatory in and do a return 0
when checking it against the desired transactions and it is empty. Hope
this helps.

Kenn
LBNL

Is there a way to make a custom field mandatory in 3 queues, but not
mandatory in a 4th queue?

Thanks,
Laura


http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sales@bestpractical.com

Discover RT’s hidden secrets with RT Essentials from O’Reilly Media.
Buy a copy at http://rtbook.bestpractical.com


View this message in context:
http://www.nabble.com/Custom-field-not-mandatory-in-all-queues-tp21880139p21880998.html
Sent from the Request Tracker - User mailing list archive at Nabble.com.


http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sales@bestpractical.com

Discover RT’s hidden secrets with RT Essentials from O’Reilly Media.
Buy a copy at http://rtbook.bestpractical.com


http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sales@bestpractical.com

Discover RT’s hidden secrets with RT Essentials from O’Reilly Media.
Buy a copy at http://rtbook.bestpractical.com

View this message in context: http://www.nabble.com/Custom-field-not-mandatory-in-all-queues-tp21880139p21881917.html

Thanks Kenn,

But will this work if I want the field (customer) to follow from the soft
dev queue(not mandatory) to the customer support queue(mandatory)?

Kenneth Crocker wrote:

Laura,

Although I hate redundancy and as an ex-DBA I have always believed 1
field/1 name, I have to agree with Todd :-). RT is not an accounting
system or parts system where everything has to be tidy, etc. In this
case, it’s the same name for the same type of data. So, other than
double the work of maintaining the same values in two fields, that’s a
good idea. If it works, then it’s fine and Todd’s idea will certainly
work.

Kenn
LBNL

It would be easier to make two CFs with the same name. Make it mandatory
in one and apply it to 3 queues. The other gets applied to the fourth
queue.

Thanks Kenn,

It has been at least 6 months since I have done any scrip coding and

was
wondering if you had any sample code that would check the field and
return 0
when empty? I’d really appreciate it.

Thanks,
Laura

Kenneth Crocker wrote:
 >
 > Laura,
 >
 >       I'm only on 3.6.4 so my comment may be out of date. I don't
think
 > that's possible in configuration. If a CF is set up to be

mandatory,
> then whenever it is applied to a queue, those tickets will require
an
> entry. What you can do is remove the “Mandatory” setting and then
write
> a scrip for the queues you want it to be mandatory in and do a
return 0
> when checking it against the desired transactions and it is
empty. Hope
> this helps.
>
>
> Kenn
> LBNL
>

 >> Is there a way to make a custom field mandatory in 3 queues, but

not
>> mandatory in a 4th queue?
>>
>> Thanks,
>> Laura
>
> _______________________________________________
> http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
>
> Community help: http://wiki.bestpractical.com
> Commercial support: sales@bestpractical.com
mailto:sales@bestpractical.com
>
>
> Discover RT’s hidden secrets with RT Essentials from O’Reilly
Media.
> Buy a copy at http://rtbook.bestpractical.com
>
>

--
View this message in context:

http://www.nabble.com/Custom-field-not-mandatory-in-all-queues-tp21880139p21880998.html
Sent from the Request Tracker - User mailing list archive at
Nabble.com.

_______________________________________________
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sales@bestpractical.com
<mailto:sales@bestpractical.com>


Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
Buy a copy at http://rtbook.bestpractical.com


http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sales@bestpractical.com

Discover RT’s hidden secrets with RT Essentials from O’Reilly Media.
Buy a copy at http://rtbook.bestpractical.com


http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sales@bestpractical.com

Discover RT’s hidden secrets with RT Essentials from O’Reilly Media.
Buy a copy at http://rtbook.bestpractical.com

View this message in context: http://www.nabble.com/Custom-field-not-mandatory-in-all-queues-tp21880139p21881934.html

Thanks Kenn,

But will this work if I want the field (customer) to follow from the soft
dev queue(not mandatory) to the customer support queue(mandatory)?

Kenneth Crocker wrote:

Laura,

Although I hate redundancy and as an ex-DBA I have always believed 1
field/1 name, I have to agree with Todd :-). RT is not an accounting
system or parts system where everything has to be tidy, etc. In this
case, it’s the same name for the same type of data. So, other than
double the work of maintaining the same values in two fields, that’s a
good idea. If it works, then it’s fine and Todd’s idea will certainly
work.

Kenn
LBNL

It would be easier to make two CFs with the same name. Make it mandatory
in one and apply it to 3 queues. The other gets applied to the fourth
queue.

Thanks Kenn,

It has been at least 6 months since I have done any scrip coding and

was
wondering if you had any sample code that would check the field and
return 0
when empty? I’d really appreciate it.

Thanks,
Laura

Kenneth Crocker wrote:
 >
 > Laura,
 >
 >       I'm only on 3.6.4 so my comment may be out of date. I don't
think
 > that's possible in configuration. If a CF is set up to be

mandatory,
> then whenever it is applied to a queue, those tickets will require
an
> entry. What you can do is remove the “Mandatory” setting and then
write
> a scrip for the queues you want it to be mandatory in and do a
return 0
> when checking it against the desired transactions and it is
empty. Hope
> this helps.
>
>
> Kenn
> LBNL
>

 >> Is there a way to make a custom field mandatory in 3 queues, but

not
>> mandatory in a 4th queue?
>>
>> Thanks,
>> Laura
>
> _______________________________________________
> http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
>
> Community help: http://wiki.bestpractical.com
> Commercial support: sales@bestpractical.com
mailto:sales@bestpractical.com
>
>
> Discover RT’s hidden secrets with RT Essentials from O’Reilly
Media.
> Buy a copy at http://rtbook.bestpractical.com
>
>

--
View this message in context:

http://www.nabble.com/Custom-field-not-mandatory-in-all-queues-tp21880139p21880998.html
Sent from the Request Tracker - User mailing list archive at
Nabble.com.

_______________________________________________
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sales@bestpractical.com
<mailto:sales@bestpractical.com>


Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
Buy a copy at http://rtbook.bestpractical.com


http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sales@bestpractical.com

Discover RT’s hidden secrets with RT Essentials from O’Reilly Media.
Buy a copy at http://rtbook.bestpractical.com


http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sales@bestpractical.com

Discover RT’s hidden secrets with RT Essentials from O’Reilly Media.
Buy a copy at http://rtbook.bestpractical.com

View this message in context: http://www.nabble.com/Custom-field-not-mandatory-in-all-queues-tp21880139p21881936.html

Thanks Kenn,

But will this work if I want the field (customer) to follow from the soft
dev queue(not mandatory) to the customer support queue(mandatory)?

Kenneth Crocker wrote:

Laura,

Although I hate redundancy and as an ex-DBA I have always believed 1
field/1 name, I have to agree with Todd :-). RT is not an accounting
system or parts system where everything has to be tidy, etc. In this
case, it’s the same name for the same type of data. So, other than
double the work of maintaining the same values in two fields, that’s a
good idea. If it works, then it’s fine and Todd’s idea will certainly
work.

Kenn
LBNL

It would be easier to make two CFs with the same name. Make it mandatory
in one and apply it to 3 queues. The other gets applied to the fourth
queue.

Thanks Kenn,

It has been at least 6 months since I have done any scrip coding and

was
wondering if you had any sample code that would check the field and
return 0
when empty? I’d really appreciate it.

Thanks,
Laura

Kenneth Crocker wrote:
 >
 > Laura,
 >
 >       I'm only on 3.6.4 so my comment may be out of date. I don't
think
 > that's possible in configuration. If a CF is set up to be

mandatory,
> then whenever it is applied to a queue, those tickets will require
an
> entry. What you can do is remove the “Mandatory” setting and then
write
> a scrip for the queues you want it to be mandatory in and do a
return 0
> when checking it against the desired transactions and it is
empty. Hope
> this helps.
>
>
> Kenn
> LBNL
>

 >> Is there a way to make a custom field mandatory in 3 queues, but

not
>> mandatory in a 4th queue?
>>
>> Thanks,
>> Laura
>
> _______________________________________________
> http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
>
> Community help: http://wiki.bestpractical.com
> Commercial support: sales@bestpractical.com
mailto:sales@bestpractical.com
>
>
> Discover RT’s hidden secrets with RT Essentials from O’Reilly
Media.
> Buy a copy at http://rtbook.bestpractical.com
>
>

--
View this message in context:

http://www.nabble.com/Custom-field-not-mandatory-in-all-queues-tp21880139p21880998.html
Sent from the Request Tracker - User mailing list archive at
Nabble.com.

_______________________________________________
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sales@bestpractical.com
<mailto:sales@bestpractical.com>


Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
Buy a copy at http://rtbook.bestpractical.com


http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sales@bestpractical.com

Discover RT’s hidden secrets with RT Essentials from O’Reilly Media.
Buy a copy at http://rtbook.bestpractical.com


http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sales@bestpractical.com

Discover RT’s hidden secrets with RT Essentials from O’Reilly Media.
Buy a copy at http://rtbook.bestpractical.com

View this message in context: http://www.nabble.com/Custom-field-not-mandatory-in-all-queues-tp21880139p21881966.html

Laura,

No. The Custom FIeld only follows a ticket into another Queue if the 

same CF is applied to that new queue.

Kenn
LBNLOn 2/6/2009 2:25 PM, Laura Grella wrote:

Thanks Kenn,

But will this work if I want the field (customer) to follow from the soft
dev queue(not mandatory) to the customer support queue(mandatory)?

Kenneth Crocker wrote:

Laura,

Although I hate redundancy and as an ex-DBA I have always believed 1
field/1 name, I have to agree with Todd :-). RT is not an accounting
system or parts system where everything has to be tidy, etc. In this
case, it’s the same name for the same type of data. So, other than
double the work of maintaining the same values in two fields, that’s a
good idea. If it works, then it’s fine and Todd’s idea will certainly
work.

Kenn
LBNL

On 2/6/2009 1:49 PM, Todd Chapman wrote:

It would be easier to make two CFs with the same name. Make it mandatory
in one and apply it to 3 queues. The other gets applied to the fourth
queue.

On Fri, Feb 6, 2009 at 4:30 PM, Laura Grella <lgrella@acquiremedia.com mailto:lgrella@acquiremedia.com> wrote:

Thanks Kenn,

It has been at least 6 months since I have done any scrip coding and

was
wondering if you had any sample code that would check the field and
return 0
when empty? I’d really appreciate it.

Thanks,
Laura

Kenneth Crocker wrote:
 >
 > Laura,
 >
 >       I'm only on 3.6.4 so my comment may be out of date. I don't
think
 > that's possible in configuration. If a CF is set up to be

mandatory,
> then whenever it is applied to a queue, those tickets will require
an
> entry. What you can do is remove the “Mandatory” setting and then
write
> a scrip for the queues you want it to be mandatory in and do a
return 0
> when checking it against the desired transactions and it is
empty. Hope
> this helps.
>
>
> Kenn
> LBNL
>
> On 2/6/2009 12:33 PM, Laura Grella wrote:
>> Is there a way to make a custom field mandatory in 3 queues, but
not
>> mandatory in a 4th queue?
>>
>> Thanks,
>> Laura
>
> _______________________________________________
> http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
>
> Community help: http://wiki.bestpractical.com
> Commercial support: sales@bestpractical.com
mailto:sales@bestpractical.com
>
>
> Discover RT’s hidden secrets with RT Essentials from O’Reilly
Media.
> Buy a copy at http://rtbook.bestpractical.com
>
>

--
View this message in context:

http://www.nabble.com/Custom-field-not-mandatory-in-all-queues-tp21880139p21880998.html
Sent from the Request Tracker - User mailing list archive at
Nabble.com.

_______________________________________________
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sales@bestpractical.com
<mailto:sales@bestpractical.com>


Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
Buy a copy at http://rtbook.bestpractical.com


http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sales@bestpractical.com

Discover RT’s hidden secrets with RT Essentials from O’Reilly Media.
Buy a copy at http://rtbook.bestpractical.com


http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sales@bestpractical.com

Discover RT’s hidden secrets with RT Essentials from O’Reilly Media.
Buy a copy at http://rtbook.bestpractical.com

Laura,

You could create a scrip that looks something like this:

Description: Validate Customer
Condition: On Resolve
Action: User-Defined

Custom Action Prep Code:

return 1;

Custom Action Cleanup Code:

my $ticket = $self->TicketObj;

if $ticket->FirstCustomFieldValue(‘Customer’) ne ’ '
return 1
else
$ticket->SetStatus(“open”);
return 1;

What this will do is when someone changes the status to "resolved" it 

will check to make sure the CF “Customer” isn’t blank. If it isn’t, no
problem, no changes. If it IS blank, the Ticket Status is re-set to “open”.
You can also create a notification scrip to check for the same thing
only the action is to send an Email using a template that sends someone
a message on the need to put customer info in the ticket.

Description: Customer Missing on Resolved
Condition: User-defined
Action: Notify Owner (or whomever)
Template: Missing Customer (you create this)

Custom Condition:

Check for Ticket Status changed to “resolved”

my $trans = $self->TransactionObj;
my $ticket = $self->TicketObj;

if ($trans->Type eq “Status” &&
$trans->NewValue eq “resolved”) &&
$ticket->FirstCustomFieldValue(‘Customer’) eq ’ '
return 1;

Hope this helps.

Kenn
LBNLOn 2/6/2009 1:30 PM, Laura Grella wrote:

Thanks Kenn,

It has been at least 6 months since I have done any scrip coding and was
wondering if you had any sample code that would check the field and return 0
when empty? I’d really appreciate it.

Thanks,
Laura

Kenneth Crocker wrote:

Laura,

I’m only on 3.6.4 so my comment may be out of date. I don’t think
that’s possible in configuration. If a CF is set up to be mandatory,
then whenever it is applied to a queue, those tickets will require an
entry. What you can do is remove the “Mandatory” setting and then write
a scrip for the queues you want it to be mandatory in and do a return 0
when checking it against the desired transactions and it is empty. Hope
this helps.

Kenn
LBNL

On 2/6/2009 12:33 PM, Laura Grella wrote:

Is there a way to make a custom field mandatory in 3 queues, but not
mandatory in a 4th queue?

Thanks,
Laura


http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sales@bestpractical.com

Discover RT’s hidden secrets with RT Essentials from O’Reilly Media.
Buy a copy at http://rtbook.bestpractical.com