Skip to content

Commit 9c8b194

Browse files
committed
Add custom work type requirement #350
Signed-off-by: tdruez <[email protected]>
1 parent 46b3fdb commit 9c8b194

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

docs/integrations-jira.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,20 @@ Prerequisites
1414
- A **Jira user account** with sufficient permissions
1515
(at least *Create Issues* and *Edit Issues*) in that project.
1616

17+
Create Custom *DejaCode Request* Work Type
18+
------------------------------------------
19+
20+
.. warning::
21+
22+
This is required for the integration to function properly.
23+
24+
To create the custom work type in Jira:
25+
26+
1. Navigate to your **Project settings** → **Work types**
27+
2. Click **+ Add work type**
28+
3. Set the name to: ``DejaCode Request``
29+
4. Click **Create**
30+
1731
Jira API Token
1832
--------------
1933

workflow/integrations/jira.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ class JiraIntegration(BaseIntegration):
2121
from DejaCode requests.
2222
"""
2323

24+
default_issuetype = "DejaCode Request"
25+
2426
def get_headers(self):
2527
jira_user = self.dataspace.get_configuration("jira_user")
2628
jira_token = self.dataspace.get_configuration("jira_token")
@@ -74,7 +76,7 @@ def create_issue(self, project_key, title, body=""):
7476
"project": {"key": project_key},
7577
"summary": title,
7678
"description": markdown_to_adf(body),
77-
"issuetype": {"name": "Request"},
79+
"issuetype": {"name": self.default_issuetype},
7880
}
7981
}
8082
return self.post(url, data)

0 commit comments

Comments
 (0)