$ cil list
+When listing the issues, they can also be filtered:
+
+ $ cil list --status=New
+ $ cil list --label=Type-Enhancement
+ $ cil list --is-open
+ $ cil list --label=Milestone-v0.3 --is-open
+
You can see what the issue name is by looking at the 'Issue' title. Imagine it
is 'cafebabe' (which by default is the time from epoch). To see your issue
again, use the 'show' command:
$ cil show cafebabe
-Another reporting command is 'summary':
+Another reporting command is 'summary' for which all the filter options also
+apply:
$ cil summary
+ $ cil summary --status=New
+ $ cil summary --label=Type-Enhancement
+ $ cil summary --is-open
+ $ cil summary --label=Milestone-v0.3 --is-open
The columns show 'Name', 'Status', 'CreatedBy' and 'Summary'.
use constant VERSION => '0.2.1';
my @IN_OPTS = (
+ # strings
'p=s', # p = path
'path>p', # for 'add'
'f=s', # f = filename
'l=s', # l = label
'label>l', # for 'summary, 'list'
+ # booleans
+ 'is-open',
+ 'is-closed',
'help',
'version',
);
my %BOOLEAN_ARGS = (
- help => 1,
- version => 1,
+ 'help' => 1,
+ 'version' => 1,
+ 'is-open' => 1,
+ 'is-closed' => 1,
);
my $gan = $ENV{GIT_AUTHOR_NAME} || 'Your Name';
# find all the issues
my $issues = $cil->get_issues();
- $issues = filter_issues( $issues, $args );
+ $issues = filter_issues( $cil, $issues, $args );
if ( @$issues ) {
foreach my $issue ( sort { $a->Inserted cmp $b->Inserted } @$issues ) {
separator();
# find all the issues
my $issues = $cil->get_issues();
- $issues = filter_issues( $issues, $args );
+ $issues = filter_issues( $cil, $issues, $args );
if ( @$issues ) {
separator();
foreach my $issue ( @$issues ) {
}
sub filter_issues {
- my ($issues, $args) = @_;
+ my ($cil, $issues, $args) = @_;
# don't filter if we haven't been given anything
return $issues unless %$args;
@new_issues = @tmp;
}
+ # filter out dependent on open/closed
+ if ( defined $args->{'is-open'} ) {
+ # just get the open issues
+ @new_issues = grep { $_->is_open($cil) } @new_issues;
+ }
+ if ( defined $args->{'is-closed'} ) {
+ # just get the closed issues
+ @new_issues = grep { $_->is_closed($cil) } @new_issues;
+ }
+
return \@new_issues;
}
Creates a local '.cil' file and an 'issues' directory. If PATH is specified,
the config file and directory will be created in the destination directory.
-=item summary [--status=STATUS] [--label=LABEL]
+=item summary [--status=STATUS] [--label=LABEL] [--is-open] [--is-closed]
Displays a one line summary for each issue. You may filter on both the Status
and Label fields.
-=item list [--status=STATUS] [--label=LABEL]
+=item list [--status=STATUS] [--label=LABEL] [--is-open] [--is-closed]
Shows each issue with more information. You may filter on both the Status and
Label fields.
=back
+=head1 .cil
+
+The C<.cil> file is used to configure bits and pieces within cil for this
+particular issue list. The following options are available and where stated,
+may be declared multiple times:
+
+The C<.cil> file is fairly simple and an example can be seen here:
+
+ StatusStrict: 1
+ StatusAllowedList: New
+ StatusAllowedList: InProgress
+ StatusAllowedList: Finished
+ StatusOpenList: New
+ StatusOpenList: InProgress
+ StatusClosedList: Finished
+ LabelStrict: 1
+ LabelAllowedList: Type-Enhancement
+ LabelAllowedList: Type-Defect
+ LabelAllowedList: Priority-High
+ LabelAllowedList: Priority-Medium
+ LabelAllowedList: Priority-Low
+
+=over
+
+=item StatusStrict
+
+Default: 0, Type: Boolean (0/1)
+
+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
+
+This list is checked against when filtering with --is-open.
+
+=item StatusClosedList
+
+Default: empty, Type: List
+
+This list is checked against when filtering with --is-closed.
+
+=item LabelStrict
+
+Default: 0, Type: Boolean (0/1)
+
+This determines that labels you enter are checked against LabelAllowedList. Set
+to 1 if you require this feature.
+
+=item LabelAllowedList
+
+Default: empty, Type: List
+
+This determines which labels are allowed if you have turned on LabelStrict.
+
+=back
+
=head1 BUGS
Probably. Let me know :-)
=head1 TODO
-There is a number of things to do. High on the list are:
-
-* the ability to set Statuses from the command line
+To get a ToDo list for cil, clone the repo, find the issues/ dir and type:
-* set where you want your issues (from a .cil file)
+ $ cil --is-open
-* simple search first, proper search and indexing second
+This gives the current outstanding issues in cil.
=head1 AUTHOR