[Rt-commit] [rtir] 01/03: Merge branch '2.9/cf-tweaks' into 2.9-trunk

Kevin Falcone falcone at bestpractical.com
Mon Jun 24 19:42:46 EDT 2013


This is an automated email from the git hooks/post-receive script.

falcone pushed a commit to branch 2.9-trunk
in repository rtir.

commit 9ef09d329f77d6c43f4d5d2a2bd357ac8cbc57d4
Merge: e25af70 95fbd3c
Author: Kevin Falcone <falcone at bestpractical.com>
Date:   Mon Jun 24 19:21:13 2013 -0400

    Merge branch '2.9/cf-tweaks' into 2.9-trunk
    
    Conflicts:
    	etc/upgrade/3.0.0rc2/content

 etc/initialdata                     |  7 +++++++
 etc/upgrade/3.0.0rc2/content        | 17 +++++++++++++++++
 html/RTIR/Elements/EditConstituency |  9 +++++++++
 html/RTIR/Incident/Create.html      |  1 -
 4 files changed, 33 insertions(+), 1 deletion(-)

diff --cc etc/upgrade/3.0.0rc2/content
index b202671,33e5e03..c5b179e
--- a/etc/upgrade/3.0.0rc2/content
+++ b/etc/upgrade/3.0.0rc2/content
@@@ -22,23 -3,23 +22,40 @@@ foreach my $queue (@OUR_QUEUES) 
  
  our @Final = (
  
 +    sub {
 +        $RT::Logger->debug("Going to make IP custom fields link to Lookup");
 +        my $ip_cf = RT::CustomField->new(RT->SystemUser);
 +        my ($ok, $msg) = $ip_cf->Load('IP');
 +        if ( $ip_cf->Id ) {
 +            if ( $ip_cf->LinkValueTo ){
 +                $RT::Logger->warning("IP custom field link value already set, skipping");
 +            }
 +            else{
 +                $ip_cf->SetLinkValueTo('__WebPath__/RTIR/Tools/Lookup.html?type=ip&q=__CustomField__&ticket=__id__');
 +            }
 +        }
 +        else{
 +            $RT::Logger->error("IP custom field not found: $msg");
 +        }
 +    },
 +
+     # fix our standard SelectSingle Custom Fields to use a more modern dropdown
+     sub {
+        for my $name ('Constituency', 'Resolution', 'Function', 'Classification', 'How Reported', 'Reporter Type', 'Customer') {
+             my $cf = RT::CustomField->new( RT->SystemUser );
+             # We have to be ugly here because Customers exists twice, once as a single value and once as a multiple
+             my ($ok, $msg) = $cf->LoadByCols(Name => $name, MaxValues => 1);
+             unless ($ok) {
+                 RT->Logger->error("Unable to load a Single Value Select named $name: $msg - skipping update of Render Type");
+                 next;
+             } 
+ 
+             ($ok,$msg) = $cf->SetRenderType('Dropdown');
+             unless ($ok) {
+                 RT->Logger->error("Unable to set Render Type to Dropdown for $name: $msg");
+             }
+         }
+     },
  );
  
  1;

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Rt-commit mailing list