Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 15 additions & 14 deletions docs/integrations-jira.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,17 @@ Prerequisites
-------------

- A **Jira Cloud project** that you want to integrate with DejaCode.

.. note::

**The Jira project must have an editable workflow**, it is recommended to choose
**Jira** > **Blank project** template during project creation.

- A **Jira user account** with sufficient permissions
(at least *Create Issues* and *Edit Issues*) in that project.
(at least **Create Issues** and **Edit Issues**) in that project.

Create Custom "DejaCode Request" Work Type
------------------------------------------
Create "DejaCode Request" Work Type
-----------------------------------

.. warning::

Expand All @@ -28,26 +34,21 @@ To create the custom work type in Jira:
3. Set the name to: ``DejaCode Request``
4. Click **Create**

Create "Closed" Status
----------------------
Define Open/Closed Statuses
---------------------------

.. warning::

This is required for the integration to function properly.

This status will be set on the Jira issue when the DejaCode Request is closed.

To create the **Closed** status in Jira:
To edit the workflow statuses in Jira:

1. Navigate to **Project settings** → **Work types**
2. Select the ``DejaCode Request`` work type
3. Click **Edit workflow**
4. Click **Add status**
5. Click **Create new status** tab
6. Enter the name: ``Closed``
7. Choose a category: ``Done``
8. Click **Add**
9. Click **Update workflow**
4. Rename the ``TO DO`` status to ``OPEN``, keep the ``To do`` status category
5. Rename the ``DONE`` status to ``CLOSED``, keep the ``Done`` status category
6. Click **Update workflow** > **Save**

Jira API Token
--------------
Expand Down
2 changes: 0 additions & 2 deletions workflow/integrations/jira.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ class JiraIntegration(BaseIntegration):
"""

issuetype = "DejaCode Request"
open_status = None
closed_status = "Closed"

def get_headers(self):
jira_user = self.dataspace.get_configuration("jira_user")
Expand Down
2 changes: 1 addition & 1 deletion workflow/integrations/sourcehut.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def create_issue(self, repo_id, title, body=""):
)
return response.get("data", {}).get("submitTicket")

def update_issue(self, repo_id, issue_id, title=None, body=None, state=None, labels=None):
def update_issue(self, repo_id, issue_id, title=None, body=None, state=None):
"""Update an existing SourceHut ticket via GraphQL."""
mutation = """
mutation UpdateTicket($trackerId: Int!, $ticketId: Int!, $input: UpdateTicketInput!) {
Expand Down