diff --git a/docs/integrations-jira.rst b/docs/integrations-jira.rst index 4cc74582..93f72efd 100644 --- a/docs/integrations-jira.rst +++ b/docs/integrations-jira.rst @@ -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:: @@ -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 -------------- diff --git a/workflow/integrations/jira.py b/workflow/integrations/jira.py index 2d0fba10..0d3d3156 100644 --- a/workflow/integrations/jira.py +++ b/workflow/integrations/jira.py @@ -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") diff --git a/workflow/integrations/sourcehut.py b/workflow/integrations/sourcehut.py index 52edb187..deb87583 100644 --- a/workflow/integrations/sourcehut.py +++ b/workflow/integrations/sourcehut.py @@ -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!) {