[Bps-public-commit] RT-Extension-rt_cpan_org branch, rt4, updated. 16b10aea8a51f59fb93a7be43018c8a9ce3a0b2f

Thomas Sibley trs at bestpractical.com
Fri Apr 5 16:30:22 EDT 2013


The branch, rt4 has been updated
       via  16b10aea8a51f59fb93a7be43018c8a9ce3a0b2f (commit)
      from  b75e59fbf49192c2502464f06f31d7a11305fe8d (commit)

Summary of changes:
 etc/upgrade/4.0/content | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

- Log -----------------------------------------------------------------
commit 16b10aea8a51f59fb93a7be43018c8a9ce3a0b2f
Author: Thomas Sibley <trs at bestpractical.com>
Date:   Fri Apr 5 13:29:31 2013 -0700

    Tweak the Severity CF display
    
    Render it as a dropdown since it's a single value select and sort it
    first when showing/editing CFs (ahead of queue-level Broken in/Fixed
    in).

diff --git a/etc/upgrade/4.0/content b/etc/upgrade/4.0/content
index 50c442f..7b2b181 100644
--- a/etc/upgrade/4.0/content
+++ b/etc/upgrade/4.0/content
@@ -35,6 +35,25 @@ our @Final = (
         RT->Logger->error("Unable to set scrip stage to Disabled: $msg")
             unless $ok;
     },
+    sub {
+        my $cf = RT::CustomField->new( RT->SystemUser );
+        $cf->LoadByCols( Name => "Severity" );
+        RT->Logger->error("Unable to find CF Severity"), return
+            unless $cf->id;
+
+        my ($ok, $msg) = $cf->SetRenderType('Dropdown');
+        RT->Logger->error("Unable to set CF render type to Dropdown: $msg")
+            unless $ok;
+
+        my $ocf = RT::ObjectCustomField->new( RT->SystemUser );
+        $ocf->LoadByCols( CustomField => $cf->id, ObjectId => 0 ); # global application
+        RT->Logger->error("Unable to find global OCF for CF Severity"), return
+            unless $ocf->id;
+
+        ($ok, $msg) = $ocf->SetSortOrder(0);
+        RT->Logger->error("Unable to set OCF sort order to 0: $msg")
+            unless $ok;
+    },
 );
 
 1;

-----------------------------------------------------------------------



More information about the Bps-public-commit mailing list