Re-rank Jira's backlog to match an epic's ranking, moving only the issues the loop filed

This commit is contained in:
2026-11-18 18:51:50 +01:00
parent 92bc84ba80
commit 49fe132be2
8 changed files with 186 additions and 13 deletions
+9
View File
@@ -150,3 +150,12 @@ class EpicStoreContract:
task = self.filed(store, ours, "Count them in the api.")
read = {issue.key: issue for issue in self.issues(store)}
self.assertEqual([read[key].by_loop for key in (ours, theirs, task)], [True, False, True])
def test_ranks_a_child_issue_just_before_or_just_after_another_and_its_sub_tasks_follow_it(self) -> None:
store = self.new_store()
first, second, third = (self.filed(store, store.epic_key, f"Item {n}.") for n in range(3))
task = self.filed(store, third, "A task.")
self.assertEqual(store.rank(third, first), None)
self.assertEqual([issue.key for issue in self.issues(store)], [third, task, first, second])
self.assertEqual(store.rank(third, second, after=True), None)
self.assertEqual([issue.key for issue in self.issues(store)], [first, second, third, task])