[Rt-commit] [rtir] 01/01: Make IP custom field link to Lookup page
Jim Brandt
jbrandt at bestpractical.com
Mon Apr 29 15:15:21 EDT 2013
This is an automated email from the git hooks/post-receive script.
jbrandt pushed a commit to branch 2.9/lookup-link-for-ip-cf
in repository rtir.
commit 978f444bbc2288d04c0b0e67bcc3cf7800820d0b
Author: Jim Brandt <jbrandt at bestpractical.com>
Date: Wed Apr 24 10:09:30 2013 -0400
Make IP custom field link to Lookup page
---
etc/initialdata | 1 +
etc/upgrade/3.0.0rc2/content | 25 +++++++++++++++++++++++++
2 files changed, 26 insertions(+)
diff --git a/etc/initialdata b/etc/initialdata
index 9589984..e0db8b0 100644
--- a/etc/initialdata
+++ b/etc/initialdata
@@ -132,6 +132,7 @@
Queue => ['Incidents', 'Incident Reports', 'Investigations', 'Blocks'],
Disabled => 0,
Description => 'IP address for RTIR queues',
+ LinkValueTo => '__WebPath__/RTIR/Tools/Lookup.html?type=ip&q=__CustomField__&ticket=__id__'
},
{
Name => 'Netmask',
diff --git a/etc/upgrade/3.0.0rc2/content b/etc/upgrade/3.0.0rc2/content
new file mode 100644
index 0000000..573aa4d
--- /dev/null
+++ b/etc/upgrade/3.0.0rc2/content
@@ -0,0 +1,25 @@
+use strict;
+use warnings;
+
+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");
+ }
+ },
+
+);
+
+1;
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Rt-commit
mailing list