summaryrefslogtreecommitdiffstats
path: root/scripts/addcustomfield.pl
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/addcustomfield.pl')
-rwxr-xr-xscripts/addcustomfield.pl44
1 files changed, 23 insertions, 21 deletions
diff --git a/scripts/addcustomfield.pl b/scripts/addcustomfield.pl
index b5ee0cd43..ff707b01c 100755
--- a/scripts/addcustomfield.pl
+++ b/scripts/addcustomfield.pl
@@ -29,21 +29,22 @@ use Bugzilla::Field;
Bugzilla->usage_mode(USAGE_MODE_CMDLINE);
my %types = (
- 'freetext' => FIELD_TYPE_FREETEXT,
+ 'freetext' => FIELD_TYPE_FREETEXT,
'single_select' => FIELD_TYPE_SINGLE_SELECT,
- 'multi_select' => FIELD_TYPE_MULTI_SELECT,
- 'textarea' => FIELD_TYPE_TEXTAREA,
- 'datetime' => FIELD_TYPE_DATETIME,
- 'date' => FIELD_TYPE_DATE,
- 'bug_id' => FIELD_TYPE_BUG_ID,
- 'bug_urls' => FIELD_TYPE_BUG_URLS,
- 'keywords' => FIELD_TYPE_KEYWORDS,
+ 'multi_select' => FIELD_TYPE_MULTI_SELECT,
+ 'textarea' => FIELD_TYPE_TEXTAREA,
+ 'datetime' => FIELD_TYPE_DATETIME,
+ 'date' => FIELD_TYPE_DATE,
+ 'bug_id' => FIELD_TYPE_BUG_ID,
+ 'bug_urls' => FIELD_TYPE_BUG_URLS,
+ 'keywords' => FIELD_TYPE_KEYWORDS,
);
-my $syntax =
- "syntax: addcustomfield.pl <field name> [field type]\n\n" .
- "valid field types:\n " . join("\n ", sort keys %types) . "\n\n" .
- "the default field type is single_select\n";
+my $syntax
+ = "syntax: addcustomfield.pl <field name> [field type]\n\n"
+ . "valid field types:\n "
+ . join("\n ", sort keys %types) . "\n\n"
+ . "the default field type is single_select\n";
my $name = shift || die $syntax;
my $type = lc(shift || 'single_select');
@@ -51,16 +52,17 @@ exists $types{$type} || die "Invalid field type '$type'.\n\n$syntax";
$type = $types{$type};
Bugzilla::Field->create({
- name => $name,
- description => 'Please give me a description!',
- type => $type,
- mailhead => 0,
- enter_bug => 0,
- obsolete => 1,
- custom => 1,
- buglist => 1,
+ name => $name,
+ description => 'Please give me a description!',
+ type => $type,
+ mailhead => 0,
+ enter_bug => 0,
+ obsolete => 1,
+ custom => 1,
+ buglist => 1,
});
print "Done!\n";
my $urlbase = Bugzilla->localconfig->{urlbase};
-print "Please visit ${urlbase}editfields.cgi?action=edit&name=$name to finish setting up this field.\n";
+print
+ "Please visit ${urlbase}editfields.cgi?action=edit&name=$name to finish setting up this field.\n";