summaryrefslogtreecommitdiffstats
path: root/scripts/addcustomfield.pl
diff options
context:
space:
mode:
authorPerl Tidy <perltidy@bugzilla.org>2018-12-05 21:38:52 +0100
committerDylan William Hardison <dylan@hardison.net>2018-12-05 23:49:08 +0100
commit8ec8da0491ad89604700b3e29a227966f6d84ba1 (patch)
tree9d270f173330ca19700e0ba9f2ee931300646de1 /scripts/addcustomfield.pl
parenta7bb5a65b71644d9efce5fed783ed545b9336548 (diff)
downloadbugzilla-8ec8da0491ad89604700b3e29a227966f6d84ba1.tar.gz
bugzilla-8ec8da0491ad89604700b3e29a227966f6d84ba1.tar.xz
no bug - reformat all the code using the new perltidy rules
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";