diff options
author | mark <mark> | 2011-05-16 23:28:19 +0000 |
---|---|---|
committer | mark <mark> | 2011-05-16 23:28:19 +0000 |
commit | f2a797b9cc0e9a6053399356e9e8cae22e553c9c (patch) | |
tree | 6453747cc57a16dbd75872e1c4a5cbd52ad81de0 /rt/lib/RT | |
parent | e141dcae4712d6fc9d5207ad42f864605788309f (diff) |
increment priority via bulk ticket update, #12901
Diffstat (limited to 'rt/lib/RT')
-rw-r--r-- | rt/lib/RT/Ticket_Vendor.pm | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/rt/lib/RT/Ticket_Vendor.pm b/rt/lib/RT/Ticket_Vendor.pm new file mode 100644 index 000000000..604a84aa2 --- /dev/null +++ b/rt/lib/RT/Ticket_Vendor.pm @@ -0,0 +1,16 @@ +package RT::Ticket; +use strict; + +sub SetPriority { + # Special case: Pass a value starting with 'R' to set priority + # relative to the current level. Used for bulk updates, though + # it can be used anywhere else too. + my $Ticket = shift; + my $value = shift; + if ( $value =~ /^R([+-]?\d+)$/ ) { + $value = $1 + ($Ticket->Priority || 0); + } + $Ticket->SUPER::SetPriority($value); +} + +1; |