dspinellis / git-issue

Git-based decentralized issue management

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

git-issue list tag command displays all tickets (both closed and open)

vishnu350 opened this issue · comments

Issue: The git-issue list <tag> command displays all tickets (both closed and open), making it confusing to discern which tickets require work.

The open/close state of the ticket is an important info in bug management. Hence the git-issue list command should include this info, and the open/close states should be sorted.

Eg displaying a list of tickets tagged with urgent:

git-issue list urgent
c390c48 [open] Bug ticket 1
955bc40 [open] Bug ticket 2
d8cb828 [open] Bug ticket 3
3062f21 [closed] Bug ticket 4
db115a1 [closed] Bug ticket 5

This can be easily be done with this modification to git-issue.sh sub_list function (tested locally):

 896  while read path id ; do
 897     # vishnu: Expanded printf to include open/close state in 2nd col of listing
 898     if [ -z $(grep closed $path/tags) ] ; then
 899       printf '%s[open] ' "$id "
 900     else
 901       printf '%s[closed] ' "$id "
 902     fi
 903     head -1 $path/description
 904   done |
 905   # vishnu: Modified sort command(s) to place closed tickets at the bottom
 906   sort -k 3 |
 907   sort -s -k 2,2r |

Thank you for pointing this out. Would it perhaps be even better to list only open issues by default and add a -a flag to also include closed issues?

I am moving this to issues #37 and #42.

Thank you for pointing this out. Would it perhaps be even better to list only open issues by default and add a -a flag to also include closed issues?

Yes, a long listing or extendable options would definitely solve the issue. My suggestion is actually based on what I recall from using a similar CLI based internal tool (in my previous company) for querying existing web-based issues/tickets. It behaved kinda like in the way I described.