From: Andrew Chilton Date: Sun, 22 Jun 2008 04:04:51 +0000 (+1200) Subject: Closes issue fb79b2e8. X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=cc4ec49a40bdb7dbbd7d042b99fb7f7e0f4295fe;p=cil.git Closes issue fb79b2e8. --- diff --git a/bin/cil b/bin/cil index eed01ca..7e14dec 100755 --- a/bin/cil +++ b/bin/cil @@ -45,6 +45,7 @@ my $COMMANDS = { summary => 1, add => 1, show => 1, + status => 1, edit => 1, comment => 1, attach => 1, @@ -128,6 +129,11 @@ EOF my ($issue_name) = @ARGV; show($cil, $issue_name); + } + elsif ( $command eq 'status' ) { + my ($issue_name, $status) = @ARGV; + status($cil, $issue_name, $status); + } elsif ( $command eq 'add' ) { add($cil); @@ -249,6 +255,26 @@ sub show { display_issue_full($cil, $issue); } +sub status { + my ($cil, $issue_name, $status) = @_; + + unless ( defined $status ) { + fatal("provide a status to set this issue to"); + } + + # firstly, read the issue in + my $issue = CIL::Issue->new_from_name($cil, $issue_name); + unless ( defined $issue ) { + fatal("Couldn't load issue '$issue_name'"); + } + + # set the status for this issue + $issue->Status( $status ); + $issue->save($cil); + + display_issue($cil, $issue); +} + sub add { my ($cil, $issue_name) = @_; @@ -561,6 +587,7 @@ Commands: summary list show ISSUE + status ISSUE NEW_STATUS edit ISSUE comment ISSUE attach ISSUE FILENAME @@ -587,6 +614,7 @@ cil - the command-line issue list ... added issue 'cafebabe' ... $ cil show cafebabe $ cil edit cafebabe + $ cil status cafebabe InProgress $ cil comment cafebabe ... added comment 'deadbeef' ... @@ -625,6 +653,11 @@ Adds an issues after you have edited the input. Shows the issue name with more detail. +=item status ISSUE NEW_STATUS + +Shortcut so that you can set a new status on an issue without having to edit +it. + =item edit ISSUE Edits the issue. If it changes, set the updates time to now. diff --git a/issues/c_792a4acf.cil b/issues/c_792a4acf.cil new file mode 100644 index 0000000..c22f3f4 --- /dev/null +++ b/issues/c_792a4acf.cil @@ -0,0 +1,6 @@ +Issue: fb79b2e8 +CreatedBy: Andrew Chilton +Inserted: 2008-06-22T04:02:46 +Updated: 2008-06-22T04:02:46 + +This has been completed. diff --git a/issues/i_fb79b2e8.cil b/issues/i_fb79b2e8.cil index 97fecb7..b218517 100644 --- a/issues/i_fb79b2e8.cil +++ b/issues/i_fb79b2e8.cil @@ -1,12 +1,13 @@ Summary: Ability to set Issue Status' from the command line -Status: New +Status: Finished CreatedBy: Andrew Chilton AssignedTo: Andrew Chilton Label: Mileston-v0.2 Label: Release-v0.1 Label: Type-Enhancement +Comment: 792a4acf Inserted: 2008-06-22T04:00:20 -Updated: 2008-06-22T04:00:20 +Updated: 2008-06-22T04:02:46 The ability to do something like the following would be good.