Hi all, i need to set the priority based on a ticket CF that the user sets at selfservice during the ticket submission.<br>Its set up so that the user can submit to only one queue: General<br>CF's name: Sürgősség (Priority in Hungarian, need that so for the end users use Hungarian..)<br>
<br>I'm very new on this, tried researching the rt wiki & i have the RT essentials book, but both seem outdated =( Perl.org is some help but still =(<br>And i cant figure it out what's wrong. Please help.<br>
<br>I set up a Scrip with the following at Config/Queues/General/Scrips: <br><br><span class="left">Scrip Fields:<br></span>
<span class="right-empty">
        
        
</span>
<div class="titlebox-content" id="TitleBox--_Admin_Queues_Scrip.html------U2NyaXAgRmllbGRz---0">
<table>
<tbody><tr><td align="right">Description:</td><td>
<input name="Scrip-13-Description" value="Prioritás átadás">
</td></tr>
<tr><td align="right">Condition:</td><td>
<select name="Scrip-13-ScripCondition">
<option value="">-</option>
<option value="11">On Close
</option>
<option value="4">On Comment
</option>
<option value="3">On Correspond
</option>
<option value="1" selected>On Create
</option>
<option value="7">On Owner Change
</option>
<option value="6">On Priority Change
</option>
<option value="8">On Queue Change
</option>
<option value="12">On Reopen
</option>
<option value="9">On Resolve
</option>
<option value="5">On Status Change
</option>
<option value="2">On Transaction
</option>
<option value="10">User Defined
</option>
</select>
</td></tr>
<tr><td align="right">Action:</td><td>
<select name="Scrip-13-ScripAction">
<option value="">-</option>
<option value="1">Autoreply To Requestors
</option>
<option value="16">Create Tickets
</option>
<option value="18">Extract Subject Tag
</option>
<option value="8">Notify AdminCcs
</option>
<option value="7">Notify AdminCcs as Comment
</option>
<option value="6">Notify Ccs
</option>
<option value="5">Notify Ccs as Comment
</option>
<option value="14">Notify Other Recipients
</option>
<option value="13">Notify Other Recipients as Comment
</option>
<option value="4">Notify Owner
</option>
<option value="3">Notify Owner as Comment
</option>
<option value="2">Notify Requestors
</option>
<option value="10">Notify Requestors and Ccs
</option>
<option value="9">Notify Requestors and Ccs as Comment
</option>
<option value="12">Notify Requestors, Ccs and AdminCcs
</option>
<option value="11">Notify Requestors, Ccs and AdminCcs as Comment
</option>
<option value="17">Open Tickets
</option>
<option value="15" selected>User Defined
</option>
</select>
</td></tr>
<tr><td align="right">Template:</td><td>
<select name="Scrip-13-Template">
<option value="">-</option>
<option value="6">Global template: Admin Comment
</option>
<option value="4">Global template: Admin Correspondence
</option>
<option value="22">Global template: Admin-new-outdated
</option>
<option value="2">Global template: Autoreply
</option>
<option value="1" selected>Global template: Blank
</option>
<option value="5">Global template: Correspondence
</option>
<option value="20">Global template: Email Digest
</option>
<option value="16">Global template: Error to RT owner: public key
</option>
<option value="18">Global template: Error: bad GnuPG data
</option>
<option value="21">Global template: Error: Missing dashboard
</option>
<option value="17">Global template: Error: no private key
</option>
<option value="15">Global template: Error: public key
</option>
<option value="14">Global template: Forward
</option>
<option value="19">Global template: PasswordChange
</option>
<option value="8">Global template: Resolved
</option>
<option value="7">Global template: Status Change
</option>
<option value="3">Global template: Transaction
</option>
</select>
</td></tr>
<tr><td align="right">Stage:</td><td>
<select name="Scrip-13-Stage">
<option value="TransactionCreate" selected>TransactionCreate
</option>
<option value="TransactionBatch">TransactionBatch
</option>
<option value="Disabled">Disabled
</option>
</select></td></tr></tbody></table></div><br>Custom action preparation code:<br><br>return 1;<br><br>Custom action cleanup code:
<br><br>my $CFName = 'Sürgősség';<br><br><br>if ( $self->TicketObj->FirstCustomFieldValue($CFName) =~ /Kritikus/i ) <br>{<br>$self->TicketObj->SetPriority( 85 );<br>return 1;<br>} else {<br> if ( $self->TicketObj->FirstCustomFieldValue($CFName) =~ /Súlyos/i ) <br>
{<br> $self->TicketObj->SetPriority(71);<br> return 1;<br> } else {<br> if ( $self->TicketObj->FirstCustomFieldValue($CFName) =~ /Magas/i ) <br> {<br> $self->TicketObj->SetPriority( 41 );<br> return 1;<br>
} else {<br> if ( $self->TicketObj->FirstCustomFieldValue($CFName) =~ /Közepes/i ) <br> {<br> $self->TicketObj->SetPriority( 21 );<br> return 1;<br> } else {<br> if ( $self->TicketObj->FirstCustomFieldValue($CFName) =~ /Alacsony/i ) <br>
{<br> $self->TicketObj->SetPriority( 0 );<br> return 1;<br> } else { return undef; }<br>}}}}<br>return 0;<br><br>It wont do nothing at all, i'm not even sure of if it runs down or not.<br><br>Thankyou in advance.<br>
Daniel<br>