Summary
The Jira provider maps issue-link direction backwards relative to Atlassian's issue-linking model, in which the inwardIssue of a link performs the link type's outward verb (e.g. for "Blocks": inwardIssue blocks, outwardIssue is blocked by).
Impact
- Write (
create_issue_link, scripts/issue/jira/provider.py): a mapping direction == "outward" placed the source issue in outwardIssue instead of inwardIssue, so links were created with their direction inverted (e.g. marking A as blocking B recorded A as blocked by B).
- Read (
_issue_link_target_and_label, scripts/issue/jira/relationships.py): the populated-side direction was inverted on read-back, so relationships rendered with the wrong verb (e.g. "Blocks: TEST-2000 (inward)" instead of "(outward)").
Fix
- In
create_issue_link, put the source in inwardIssue for direction == "outward" and in outwardIssue for direction == "inward".
- In
_issue_link_target_and_label, return the populated field's own direction (outward_issue → "outward", inward_issue → "inward").
- Update Jira fixture/assertion shapes in
tests/test_jira_issue_provider.py and tests/test_jira_issue_cache.py to match real Atlassian GET/POST payloads.
Summary
The Jira provider maps issue-link direction backwards relative to Atlassian's issue-linking model, in which the
inwardIssueof a link performs the link type's outward verb (e.g. for "Blocks":inwardIssueblocks,outwardIssueis blocked by).Impact
create_issue_link,scripts/issue/jira/provider.py): a mappingdirection == "outward"placed the source issue inoutwardIssueinstead ofinwardIssue, so links were created with their direction inverted (e.g. marking A as blocking B recorded A as blocked by B)._issue_link_target_and_label,scripts/issue/jira/relationships.py): the populated-side direction was inverted on read-back, so relationships rendered with the wrong verb (e.g. "Blocks: TEST-2000 (inward)" instead of "(outward)").Fix
create_issue_link, put the source ininwardIssuefordirection == "outward"and inoutwardIssuefordirection == "inward"._issue_link_target_and_label, return the populated field's own direction (outward_issue→"outward",inward_issue→"inward").tests/test_jira_issue_provider.pyandtests/test_jira_issue_cache.pyto match real Atlassian GET/POST payloads.