Skip to content

Commit

Permalink
jipdate: Ignore tasks marked as 'Completed"
Browse files Browse the repository at this point in the history
JIRA cards can now be marked as "Completed" as well, instead of "Closed"
or "Resolved". Ignore them too while listing active tasks.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
  • Loading branch information
vireshk committed Nov 18, 2024
1 parent 6d8c602 commit 48d93b4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions jipdate/jipdate.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ def get_jira_issues(jira, username):

status = 'status in ("In Progress")'
if all_status:
status = "status not in (Resolved, Closed)"
status = "status not in (Resolved, Closed, Completed)"

if user is None:
user = "currentUser()"
Expand Down Expand Up @@ -453,7 +453,7 @@ def parse_status_file(jira, filename, issues):
# An optional 'resolution' attribute can be set when doing a transition
# to Resolved, using the following pattern: Resolved / <resolution>
if (
transition.startswith("Resolved") or transition.startswith("Closed")
transition.startswith("Resolved") or transition.startswith("Closed") or transition.startswith("Completed")
) and "/" in transition:
(transition, resolution) = map(str.strip, transition.split("/"))
if not resolution in resolution_map:
Expand Down
8 changes: 4 additions & 4 deletions jipdate/jipfp.py
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ def test():
################################################################################
def build_story_node(jira, story_key, d_handled=None, epic_node=None):
si = jira.issue(story_key)
if si.fields.status.name in ["Closed", "Resolved"]:
if si.fields.status.name in ["Closed", "Resolved", "Completed"]:
d_handled[str(si.key)] = [None, si]
return None

Expand Down Expand Up @@ -444,7 +444,7 @@ def build_story_node(jira, story_key, d_handled=None, epic_node=None):
def build_epics_node(jira, epic_key, d_handled=None, initiative_node=None):
ei = jira.issue(epic_key)

if ei.fields.status.name in ["Closed", "Resolved"]:
if ei.fields.status.name in ["Closed", "Resolved", "Completed"]:
d_handled[str(ei.key)] = [None, ei]
return None

Expand Down Expand Up @@ -502,7 +502,7 @@ def build_epics_node(jira, epic_key, d_handled=None, initiative_node=None):
# Initiatives
################################################################################
def build_initiatives_node(jira, issue, d_handled):
if issue.fields.status.name in ["Closed", "Resolved"]:
if issue.fields.status.name in ["Closed", "Resolved"], "Completed":
d_handled[str(issue.key)] = [None, issue]
return None

Expand Down Expand Up @@ -561,7 +561,7 @@ def build_orphans_tree(jira, key, d_handled):
orphans_stories = []
for i in all_issues:
if str(i.key) not in d_handled:
if i.fields.status.name in ["Closed", "Resolved"]:
if i.fields.status.name in ["Closed", "Resolved", "Completed"]:
continue
else:
if i.fields.issuetype.name == "Initiative":
Expand Down

0 comments on commit 48d93b4

Please sign in to comment.