<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://rt-wiki.bestpractical.com/index.php?action=history&amp;feed=atom&amp;title=CreatePriorityBasedOnCustomFieldValues</id>
	<title>CreatePriorityBasedOnCustomFieldValues - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://rt-wiki.bestpractical.com/index.php?action=history&amp;feed=atom&amp;title=CreatePriorityBasedOnCustomFieldValues"/>
	<link rel="alternate" type="text/html" href="https://rt-wiki.bestpractical.com/index.php?title=CreatePriorityBasedOnCustomFieldValues&amp;action=history"/>
	<updated>2026-08-21T20:02:22Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.41.1</generator>
	<entry>
		<id>https://rt-wiki.bestpractical.com/index.php?title=CreatePriorityBasedOnCustomFieldValues&amp;diff=26355&amp;oldid=prev</id>
		<title>Tharn at 01:11, 14 August 2016</title>
		<link rel="alternate" type="text/html" href="https://rt-wiki.bestpractical.com/index.php?title=CreatePriorityBasedOnCustomFieldValues&amp;diff=26355&amp;oldid=prev"/>
		<updated>2016-08-14T01:11:25Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 21:11, 13 August 2016&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l49&quot;&gt;Line 49:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 49:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Custom action cleanup code:&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Custom action cleanup code:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;pre&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  if($self-&amp;amp;gt;TicketObj-&amp;amp;gt;Priority &amp;amp;gt; 0){&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  if($self-&amp;amp;gt;TicketObj-&amp;amp;gt;Priority &amp;amp;gt; 0){&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;      return 1;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;      return 1;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l73&quot;&gt;Line 73:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 74:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;      1;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;      1;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  }&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  }&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;/pre&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;----&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;----&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key bestpractical_mediawiki1459887241:diff:1.41:old-650:rev-26355:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>Tharn</name></author>
	</entry>
	<entry>
		<id>https://rt-wiki.bestpractical.com/index.php?title=CreatePriorityBasedOnCustomFieldValues&amp;diff=650&amp;oldid=prev</id>
		<title>Admin: 2 revisions imported</title>
		<link rel="alternate" type="text/html" href="https://rt-wiki.bestpractical.com/index.php?title=CreatePriorityBasedOnCustomFieldValues&amp;diff=650&amp;oldid=prev"/>
		<updated>2016-04-06T20:03:35Z</updated>

		<summary type="html">&lt;p&gt;2 revisions imported&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== Abstract ==&lt;br /&gt;
&lt;br /&gt;
We created this scrip for use with ITIL type custom fields. This takes ticket urgency and ticket impact, does some simple math and creates the number for the priority field.&lt;br /&gt;
&lt;br /&gt;
Note that in ITIL priority is determined by ticket urgency and impact, the values of these fields should be low, medium, high, critical. The definition of urgency is simply the amount of time before this task must be completed. The definition of Impact is who/how many people/machines are impacted. These are general definitions you may need to change them based on your working model.&lt;br /&gt;
&lt;br /&gt;
== How to install ==&lt;br /&gt;
&lt;br /&gt;
Create your custom fields for your impact and urgency.&lt;br /&gt;
&lt;br /&gt;
We are using custom field names Ticket_urgency, and Ticket_impact.&lt;br /&gt;
&lt;br /&gt;
* Name: Ticket_urgency&lt;br /&gt;
* Description: {blank, or put your own description}&lt;br /&gt;
* Type: Select one value&lt;br /&gt;
* Applies to: Tickets&lt;br /&gt;
* Validation: (?#Mandatory).&lt;br /&gt;
* Link Values to: {Blank}&lt;br /&gt;
* Include page: {Blank}&lt;br /&gt;
* Values:&lt;br /&gt;
** 10 - Critical - {Blank} - {Blank}&lt;br /&gt;
** 20 - High - {Blank} - {Blank}&lt;br /&gt;
** 30 - Medium - {Blank} - {Blank}&lt;br /&gt;
** 40 - Low - {Blank} - {Blank}&lt;br /&gt;
&lt;br /&gt;
* Name: Ticket_impact&lt;br /&gt;
* Description: {blank, or put your own description}&lt;br /&gt;
* Type: Select one value&lt;br /&gt;
&lt;br /&gt;
* Applies to: Tickets&lt;br /&gt;
* Validation: (?#Mandatory).&lt;br /&gt;
* Link Values to: {Blank}&lt;br /&gt;
* Include page: {Blank}&lt;br /&gt;
* Values:&lt;br /&gt;
** 10 - Critical - {Blank} - {Blank}&lt;br /&gt;
** 20 - High - {Blank} - {Blank}&lt;br /&gt;
** 30 - Medium - {Blank} - {Blank}&lt;br /&gt;
** 40 - Low - {Blank} - {Blank}&lt;br /&gt;
&lt;br /&gt;
= Scrip =&lt;br /&gt;
&lt;br /&gt;
* Description: Create Priority&lt;br /&gt;
* Condition: On Transaction&lt;br /&gt;
* Action: User Defined&lt;br /&gt;
* Template: Global template: Blank&lt;br /&gt;
* Stage: Transaction Batch&lt;br /&gt;
* Custom Condition: 1;&lt;br /&gt;
* Custom action preparation code: 1;&lt;br /&gt;
* Custom action cleanup code:&lt;br /&gt;
&lt;br /&gt;
 if($self-&amp;amp;gt;TicketObj-&amp;amp;gt;Priority &amp;amp;gt; 0){&lt;br /&gt;
     return 1;&lt;br /&gt;
 }&lt;br /&gt;
 else{&lt;br /&gt;
     my $urgent = $self-&amp;amp;gt;TicketObj-&amp;amp;gt;CustomFieldValues(&amp;#039;Ticket_urgency&amp;#039;);&lt;br /&gt;
     my $impact = $self-&amp;amp;gt;TicketObj-&amp;amp;gt;CustomFieldValues(&amp;#039;Ticket_impact&amp;#039;);&lt;br /&gt;
     my $urg = $urgent-&amp;amp;gt;Next-&amp;amp;gt;Content;&lt;br /&gt;
     my $imp = $impact-&amp;amp;gt;Next-&amp;amp;gt;Content;&lt;br /&gt;
     $RT::Logger-&amp;amp;gt;error( &amp;quot;Urg: &amp;quot;.$urg&lt;br /&gt;
 );&lt;br /&gt;
     $RT::Logger-&amp;amp;gt;error( &amp;quot;Imp: &amp;quot;.$imp&lt;br /&gt;
 );&lt;br /&gt;
     my $urgn = &amp;quot;60&amp;quot; if ($urg =~ /^C/); #Critical&lt;br /&gt;
     $urgn = &amp;quot;45&amp;quot; if ($urg =~ /^H/); #High&lt;br /&gt;
     $urgn = &amp;quot;30&amp;quot; if ($urg =~ /^M/); #Medium&lt;br /&gt;
     $urgn = &amp;quot;5&amp;quot; if ($urg =~ /^L/); #Low&lt;br /&gt;
     my $impn = &amp;quot;30&amp;quot; if ($imp =~ /^C/); #Critical&lt;br /&gt;
     $impn = &amp;quot;20&amp;quot; if ($imp =~ /^H/); #High&lt;br /&gt;
     $impn = &amp;quot;10&amp;quot; if ($imp =~ /^M/); #Medium&lt;br /&gt;
     $impn = &amp;quot;5&amp;quot; if ($imp =~ /^L/); #Low&lt;br /&gt;
     my $pri = $urgn + $impn;&lt;br /&gt;
     $self-&amp;amp;gt;TicketObj-&amp;amp;gt;SetPriority ($pri);&lt;br /&gt;
     1;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Here is a visual representation of this table: Across is Ticket Impact Down is urgency&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
| Critical&lt;br /&gt;
| High&lt;br /&gt;
| Medium&lt;br /&gt;
| Low&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Critical&lt;br /&gt;
| 90&lt;br /&gt;
| 80&lt;br /&gt;
| 70&lt;br /&gt;
| 65&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| High&lt;br /&gt;
| 75&lt;br /&gt;
| 65&lt;br /&gt;
| 55&lt;br /&gt;
| 50&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Medium&lt;br /&gt;
| 60&lt;br /&gt;
| 50&lt;br /&gt;
| 40&lt;br /&gt;
| 35&lt;br /&gt;
|- valign=&amp;quot;top&amp;quot;&lt;br /&gt;
| Low&lt;br /&gt;
| 35&lt;br /&gt;
| 25&lt;br /&gt;
| 15&lt;br /&gt;
| 10&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This allows room for moving the priority as needed, ITIL States that urgency and impact should not be changed through the life cycle of the ticket, that is the reason for the if statement at the beginning of the scrip, this allows you to change the priority with out changing the initial impact or urgency.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
By: Tc3driver -- Any questions hit me up on the list&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
</feed>