]> git.mjollnir.org Git - cil.git/commitdiff
cil-52d702df: Removed StatusAllowedList
authorAndrew Chilton <andychilton@gmail.com>
Sun, 24 Jan 2010 10:57:10 +0000 (23:57 +1300)
committerAndrew Chilton <andychilton@gmail.com>
Sun, 24 Jan 2010 10:57:10 +0000 (23:57 +1300)
.cil
bin/cil
issues/c_d49a551f.cil [new file with mode: 0644]
issues/i_52d702df.cil
lib/CIL.pm
lib/CIL/Command/Init.pm

diff --git a/.cil b/.cil
index ee6c79ad1fa920f086239979d3e34f4af44c5e2b..cfe5edb22388e3b52470ec4e12dcd6e25333fc9b 100644 (file)
--- a/.cil
+++ b/.cil
@@ -1,13 +1,5 @@
 VCS: Git
 StatusStrict: 1
-StatusAllowedList: New
-StatusAllowedList: InProgress
-StatusAllowedList: Ongoing
-StatusAllowedList: Fixed
-StatusAllowedList: OnHold
-StatusAllowedList: Duplicate
-StatusAllowedList: Finished
-StatusAllowedList: Cancelled
 StatusOpenList: New
 StatusOpenList: InProgress
 StatusOpenList: Ongoing
diff --git a/bin/cil b/bin/cil
index 5a206ceb9f6288ec2df996dcf00d741e7f655fbd..baacfa3403f2a371b840bbc35979ce9f19ac2fb0 100755 (executable)
--- a/bin/cil
+++ b/bin/cil
@@ -385,9 +385,6 @@ The C<.cil> file is fairly simple and an example can be seen here:
 
     VCS: Git
     StatusStrict: 1
-    StatusAllowedList: New
-    StatusAllowedList: InProgress
-    StatusAllowedList: Finished
     StatusOpenList: New
     StatusOpenList: InProgress
     StatusClosedList: Finished
@@ -415,13 +412,6 @@ If this is set to a true value then cil checks that the status you enter into
 an issue (after adding or editing) is also in the allowed list (see
 StatusAllowedList).
 
-=item StatusAllowedList
-
-Default: empty, Type: List
-
-This list is checked against when adding or editing issues but only if you have
-StatusStrict on.
-
 =item StatusOpenList
 
 Default: empty, Type: List
@@ -434,6 +424,11 @@ Default: empty, Type: List
 
 This list is checked against when filtering with --is-closed.
 
+=item StatusAllowedList
+
+This list is automatically generated from the StatusOpenList and the
+StatusClosedList. It does not have to appear in the config file.
+
 =item LabelStrict
 
 Default: 0, Type: Boolean (0/1)
diff --git a/issues/c_d49a551f.cil b/issues/c_d49a551f.cil
new file mode 100644 (file)
index 0000000..35f2232
--- /dev/null
@@ -0,0 +1,7 @@
+Issue: 52d702df
+CreatedBy: Andrew Chilton <andychilton@gmail.com>
+Inserted: 2010-01-24T10:55:41
+Updated: 2010-01-24T10:56:09
+
+Hopefully I got everything. Removed from a number of places and changed in the
+main cil manpage.
index a5f9150b61ce10eb72bb346f93fbe59e60013e3f..2a1119d6d79102e476fda6d1229ec5019986fc8c 100644 (file)
@@ -1,10 +1,11 @@
 Summary: The StatusOpenList and StatusClosedList should fully describe what is allowed
-Status: New
+Status: Finished
 CreatedBy: Andrew Chilton <andychilton@gmail.com>
 AssignedTo: Andrew Chilton <andychilton@gmail.com>
 Label: Milestone-v0.07
+Comment: d49a551f
 Inserted: 2010-01-23T13:14:45
-Updated: 2010-01-24T10:39:29
+Updated: 2010-01-24T10:56:40
 
 If we make those two lists fully describe what status can be had, then we can
 remove the StatusAllowedList from the .cil config file.
index b1274eb70a8c8beb2385362e0a4803eb247d129a..3a86f75b1321b2071ffba2cabab94f9b15536372 100644 (file)
@@ -59,7 +59,7 @@ my $defaults = {
     VCS              => 'Null',   # don't do anything for VCS hooks
 };
 
-my @config_hashes = qw(StatusAllowed StatusOpen StatusClosed LabelAllowed);
+my @config_hashes = qw(StatusOpen StatusClosed LabelAllowed);
 
 my $defaults_user = {
     UserName       => eval { Git->repository->config( 'user.name' ) } || 'UserName',
@@ -294,11 +294,15 @@ sub read_config_file {
     # set each config item
     $self->IssueDir( $cfg->{IssueDir} );
 
+    # Status info
     $self->StatusStrict( $cfg->{StatusStrict} );
-    $self->StatusAllowed( $cfg->{StatusAllowed} );
     $self->StatusOpen( $cfg->{StatusOpen} );
     $self->StatusClosed( $cfg->{StatusClosed} );
 
+    # make the StatusAllowed list the sum of StatusOpen and StatusClosed
+    $self->StatusAllowed( { %{$cfg->{StatusOpen}}, %{$cfg->{StatusClosed}} } );
+
+    # Label Info
     $self->LabelStrict( $cfg->{LabelStrict} );
     $self->LabelAllowed( $cfg->{LabelAllowed} );
 
index c78bc02abcc90363c9cbf8ff993b2566c24e5461..2823ab679b0c87831c22c7fb04eda6a0e168baf3 100644 (file)
@@ -78,9 +78,6 @@ sub run {
         write_file($config, <<"CONFIG");
 $VCSconfig
 StatusStrict: 1
-StatusAllowedList: New
-StatusAllowedList: InProgress
-StatusAllowedList: Finished
 StatusOpenList: New
 StatusOpenList: InProgress
 StatusClosedList: Finished