summaryrefslogtreecommitdiff
path: root/fml/lib/FML/Process/TicketSystem.pm
diff options
context:
space:
mode:
authorfukachan <fukachan>2001-02-16 11:49:07 +0000
committerfukachan <fukachan>2001-02-16 11:49:07 +0000
commite145f1c89677145048ee78cc47ef83a90f80b69d (patch)
treeeaad9e47bbc487ff709c8e8e49499f2c57d0e057 /fml/lib/FML/Process/TicketSystem.pm
parent9b5bc9ab945125b8a403a69386c8b7d4732b31b1 (diff)
downloadfml8-e145f1c89677145048ee78cc47ef83a90f80b69d.tar.gz
fml8-e145f1c89677145048ee78cc47ef83a90f80b69d.tar.bz2
fml8-e145f1c89677145048ee78cc47ef83a90f80b69d.zip
add $command default value, diagnostic check more
Diffstat (limited to 'fml/lib/FML/Process/TicketSystem.pm')
-rw-r--r--fml/lib/FML/Process/TicketSystem.pm9
1 files changed, 7 insertions, 2 deletions
diff --git a/fml/lib/FML/Process/TicketSystem.pm b/fml/lib/FML/Process/TicketSystem.pm
index cd298989..4b4130d9 100644
--- a/fml/lib/FML/Process/TicketSystem.pm
+++ b/fml/lib/FML/Process/TicketSystem.pm
@@ -44,7 +44,7 @@ sub run
my $model = $config->{ ticket_model };
my $pkg = "FML::Ticket::Model::". $model;
my $argv = $args->{ ARGV };
- my $command = $argv->[ 0 ];
+ my $command = $argv->[ 0 ] || 'list';
# fake use() to do "use FML::Ticket::$model;"
eval qq{ require $pkg; $pkg->import();};
@@ -62,7 +62,12 @@ sub run
ticket_id => $ticket_id,
status => 'close',
};
- $ticket->set_status($curproc, $args);
+ if ($ticket_id) {
+ $ticket->set_status($curproc, $args);
+ }
+ else {
+ croak("specify \$ticket_id");
+ }
$curproc->unlock();
}