Move an epic's issue to done in Jira when its chunk finishes
CI / tests (pull_request) Successful in 4m20s

This commit is contained in:
2026-11-18 23:04:34 +01:00
parent ea3da03468
commit 42cff3a8a7
9 changed files with 182 additions and 9 deletions
+17
View File
@@ -124,6 +124,23 @@ class EpicStoreContract:
self.assertIsInstance(store.add_label("ZZZ-1", "repo:log"), Failure)
self.assertEqual([issue.labels for issue in self.issues(store)], [(), ()])
def test_finishes_a_child_issue_so_it_reads_as_done_and_leaves_one_that_is_done_as_it_is(self) -> None:
store = self.new_store()
key = self.filed(store, store.epic_key, "Count the runs.")
other = self.filed(store, store.epic_key, "Ship the later thing.")
closed = self.filed(store, store.epic_key, "Close the old thing.")
self.close(store, closed, "Done")
self.assertEqual([store.finish(key), store.finish(closed)], [None, None])
self.assertEqual({issue.key: issue.done for issue in self.issues(store)}, {key: True, other: False, closed: True})
def test_refuses_to_finish_a_sub_task_or_an_issue_outside_the_epic(self) -> None:
store = self.new_store()
child = self.filed(store, store.epic_key, "Count the runs.")
task = self.filed(store, child, "Count them in the api.")
self.assertEqual(store.finish(task), Failure(f"{task} is not one of the child issues of the epic {store.epic_key}, so it cannot be finished"))
self.assertIsInstance(store.finish("ZZZ-1"), Failure)
self.assertEqual([issue.done for issue in self.issues(store)], [False, False])
def test_posts_comments_on_a_child_issue_in_order(self) -> None:
store = self.new_store()
key = self.filed(store, store.epic_key, "Count the runs.")