{"id":22973917,"url":"https://github.com/frieder/jira-issue-transition","last_synced_at":"2025-08-13T14:33:32.091Z","repository":{"id":143303400,"uuid":"609358567","full_name":"frieder/jira-issue-transition","owner":"frieder","description":"Transition a Jira issue to a target state.","archived":false,"fork":false,"pushed_at":"2024-12-04T14:39:09.000Z","size":459,"stargazers_count":3,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-04T15:34:55.984Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/frieder.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-03-04T00:15:58.000Z","updated_at":"2024-12-04T14:41:52.000Z","dependencies_parsed_at":"2024-05-01T16:17:50.333Z","dependency_job_id":"154aa80f-3a2b-4975-91d8-0e832e8df40a","html_url":"https://github.com/frieder/jira-issue-transition","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frieder%2Fjira-issue-transition","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frieder%2Fjira-issue-transition/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frieder%2Fjira-issue-transition/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frieder%2Fjira-issue-transition/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/frieder","download_url":"https://codeload.github.com/frieder/jira-issue-transition/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":229767231,"owners_count":18121043,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-14T23:59:33.753Z","updated_at":"2024-12-14T23:59:34.288Z","avatar_url":"https://github.com/frieder.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Jira Issue Transition - Github Action\n\n[![Build Status](https://img.shields.io/github/actions/workflow/status/frieder/jira-issue-transition/pr.yml?label=Build%20Status)](https://github.com/frieder/jira-issue-transition/actions/workflows/pr.yml)\n[![Open Issues](https://img.shields.io/github/issues-raw/frieder/jira-issue-transition?label=Open%20Issues)](https://github.com/frieder/jira-issue-transition/issues?q=is%3Aopen+is%3Aissue)\n[![Sonar Issues](https://img.shields.io/sonar/violations/frieder_jira-issue-transition/main?format=long\u0026server=https%3A%2F%2Fsonarcloud.io\u0026label=Sonar%20Violations)](https://sonarcloud.io/project/overview?id=frieder_jira-issue-transition)\n[![Known Vulnerabilities](https://snyk.io/test/github/frieder/jira-issue-transition/badge.svg)](https://snyk.io/test/github/frieder/jira-issue-transition)\n\nA GitHub action to update properties of an existing Jira issue.\n\n\u003e -   Only supports Jira Cloud.\n\u003e -   Requires [Jira Login Action](https://github.com/marketplace/actions/atlassian-jira-login).\n\n\n## Usage\n\n```yaml\nname: Jira Issue Transition\n\non: [..]\n\njobs:\n  jira-issue-transition:\n    name: Transition Jira issue\n    runs-on: ubuntu-latest\n    steps:\n      - name: Jira Login\n        uses: frieder/gha-jira-login@v1\n        env:\n          JIRA_BASE_URL: ${{ vars.JIRA_BASE_URL }}\n          JIRA_USER_EMAIL: ${{ vars.JIRA_USER_EMAIL }}\n          JIRA_API_TOKEN: ${{ secrets.JIRA_API_TOKEN }}\n\n      - name: Transition Issue\n        uses: frieder/jira-issue-transition@v1\n        with:\n          retries: 1\n          retryDelay: 10\n          timeout: 2000\n          failOnError: true\n          # Either one of the following three formats for 'issue' is valid (spaces are trimmed)\n          issue: XYZ-123\n          issue: XYZ-1, XYZ-2\n          issue: |\n            XYZ-1\n            XYZ-2\n          # Either one of the following two formats for 'transition' is valid \n          transition: In Progress\n          transition: 21\n          # following are properties that can be set if defined in the transition screen \u0026 required by validator\n          assignee: 123456:12345678-abcd-abcd-abcd-1234567890ab\n          comment: Plaintext only\n          components: |\n            = component1\n            = component2\n            + component3\n            - component2\n          customfields: |\n            10050: some value\n            10051: 2023-01-01\n            10052: https://github.com/marketplace?type=action\n          description: Plaintext only\n          duedate: 2023-02-01\n          fixversions: |\n            = 1.0\n            = 1.1\n            + 2.0\n            - 1.1\n          labels: |\n            = foo\n            = foo2\n            = bar2\n            + bar\n            - foo2\n            - bar2\n          priority: Lowest\n          resolution: Won't Do\n          summary: Some new fancy title\n```\n\n## Conditional Transition\n\nThe action is always executed regardless of whether the issue is already in the target state. It is however possible\nto prevent a transition from being applied based on the current state of the ticket. To do this you can use the\n[jira-issue-info](https://github.com/marketplace/actions/jira-issue-info) action to pull the information from the\nticket and then apply conditions on the transition steps. Following is an example how this can be done.\n\n```yaml\nsteps:\n  - name: Jira Login\n    uses: frieder/gha-jira-login@v1\n    env:\n      JIRA_BASE_URL: ${{ vars.JIRA_BASE_URL }}\n      JIRA_USER_EMAIL: ${{ vars.JIRA_USER_EMAIL }}\n      JIRA_API_TOKEN: ${{ secrets.JIRA_API_TOKEN }}\n\n  - name: Get Issue Properties\n    uses: frieder/jira-issue-info@v1\n    with:\n      issue: XYZ-123\n    id: issue\n\n  # Dummy Workflow: To Do --\u003e Start Work (transition id = 42) --\u003e In Progress\n\n  - name: Transition Issue To 'In Progress'\n    # is only executed when the ticket is not in 'In Progress' state already\n    if: fromJSON(steps.issue.outputs.json).fields.status.name != 'In Progress'\n    # or\n    if: steps.issue.outputs.status != 'In Progress'\n    uses: frieder/jira-issue-transition@v1\n    with:\n      issue: XYZ-123\n      transition: Start Work | 42\n```\n\n\n## Configuration Options\n\n### Option: retries\n\n|          |     |\n| :------- | :-- |\n| Required | no  |\n| Default  | 1   |\n\nThis option allows to define a number of retries when the HTTP call to the Jira REST API fails (e.g. due to\nconnectivity issues). By default, the action will attempt one retry and after that report the action as failed.\n\n### Option: retryDelay\n\n|          |     |\n| :------- | :-- |\n| Required | no  |\n| Default  | 10  |\n\nIn case the `retries` option is \u003e 0, this option defines the time (in seconds) the action will wait in\nbetween the requests.\n\n### Option: timeout\n\n|          |      |\n| :------- | :--- |\n| Required | no   |\n| Default  | 2000 |\n\nThe time (in milliseconds) the action will wait for a request to finish. If the request does not finish in\ntime it will be considered failed.\n\n### Option: failOnError\n\n|          |      |\n| :------- |:-----|\n| Required | no   |\n| Default  | true |\n\nWhen set to true (default) the action will report back as failed whenever at least one issue could not be\ntransitioned. When set to false it means the action will never fail regardless of whether there are failed\nissue transitions. For the latter case the action will register outputs with additional information about\nwhich issues failed and which were transitioned successfully. Also see the output section at the end of this\nreadme.\n\n\u003e The option failOnError is only covering the actual API requests to transition the defined tickets. If it\n\u003e is set to false and an error occurs outside the requests (e.g. when reading the inputs from the workflow\n\u003e file), the action will still fail.\n\n### Option: issue\n\n|          |     |\n| :------- | :-- |\n| Required | yes |\n| Default  |     |\n\nThe ID of the Jira ticket (e.g. XYZ-123).\n\n### Option: transition\n\n|          |     |\n| :------- | :-- |\n| Required | yes |\n| Default  |     |\n\nThe ID or the name of the transition that should be applied to the Jira issue.\n\n\u003e The benefit of using the name of a transition over its ID is that different workflows are supported.\n\u003e However the action will then query the transition ID for each issue separately which results in\n\u003e additional requests that slow down the execution time and increase the chances for the action to\n\u003e fail. When the transition ID is immutable (same workflow for all issues) consider using the\n\u003e transition ID directly over the name (speed and robustness over convenience).\n\n\u003e To get the ID of a transition check the workflow in text mode or check the [REST API](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issues/#api-rest-api-3-issue-issueidorkey-transitions-get).\n\n### Option: summary\n\n|          |     |\n| :------- | :-- |\n| Required | no  |\n| Default  |     |\n\nUpdates the summary (title) of the ticket. \u003cbr\u003e\nThe option is ignored when blank.\n\n### Option: description\n\n|          |     |\n| :------- | :-- |\n| Required | no  |\n| Default  |     |\n\nUpdates the description of the ticket. \u003cbr\u003e\nThe option is ignored when blank.\n\n\u003e This option only allows for a simple plaintext to be set. If some rich description with links,\n\u003e paragraphs, bullet points, images is required a custom logic must be used which is not covered\n\u003e (nor planned!) by this action.\n\n### Option: assignee\n\n|          |     |\n| :------- | :-- |\n| Required | no  |\n| Default  |     |\n\nUpdates the assignee of the ticket. For this the ID of the respective user is required.\n\n\u003e To get the ID of yourself just open the profile page and check the URL for the ID.\n\u003e Another possibility is to use the [Jira REST API](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-user-search/#api-rest-api-3-user-assignable-search-get).\n\nThe option is ignored when blank. To remove the assignee set the value to `REMOVE`.\n\n### Option: priority\n\n|          |     |\n| :------- | :-- |\n| Required | no  |\n| Default  |     |\n\nUpdates the priority of the ticket. Possible values are the actual names of the priorities as defined in\n`https://ACCOUNT.atlassian.net/secure/admin/ViewPriorities.jspa`. By default, these names are:\n\n-   `Lowest`\n-   `Low`\n-   `Medium`\n-   `High`\n-   `Highest`\n\nThe option is ignored when blank.\n\n### Option: duedate\n\n|          |     |\n| :------- | :-- |\n| Required | no  |\n| Default  |     |\n\nUpdates the due date of the ticket. The format must be in ISO 8601 format - `yyyy-MM-dd`. \u003cbr\u003e\nThe option is ignored when blank. To remove the assignee set the value to `REMOVE`.\n\n### Option: components\n\n|          |     |\n| :------- | :-- |\n| Required | no  |\n| Default  |     |\n\n\u003e Make sure your project template supports components or this option will not work. Also make sure\n\u003e the components exist in Jira (check your project's settings) before using them in this action.\n\nAllows to `set|add|remove` components to a Jira ticket. A set of components must be provided with\none entry per line. Depending on the prefix different actions are performed.\n\n-   `=` When a line is prefixed with this character it will be treated like a `SET` action.\n-   `+` When a line is prefixed with this character it will be treated like an `ADD` action.\n-   `-` When a line is prefixed with this character it will be treated like a `REMOVE` action.\n-   `no prefix` - When a line does not have any prefix as described above it will be ignored.\n\nIn order for this to work all entries will first be grouped and assigned to one of the three groups.\nAfterwards it will create a body payload that includes the `SET` group first followed by the `ADD`\ngroup and then the `REMOVE` group. Check the [Jira REST API](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issues/#api-rest-api-3-issue-issueidorkey-put)\nfor more information.\n\n\u003e When a `SET` group is available it will basically replace whatever was available before. The `ADD`\n\u003e group will then add additional entries on top of the new values from the `SET` group. The `REMOVE`\n\u003e group will be applied last and will remove entries that were added by the two other groups. The\n\u003e usual use-case however is to either use `SET` or a combination of `ADD`and `REMOVE` groups. In most\n\u003e cases it does not make sense to mix all three groups in one step.\n\nThe option is ignored when blank.\n\n### Option: fixversions\n\n|          |     |\n| :------- | :-- |\n| Required | no  |\n| Default  |     |\n\n\u003e Make sure your project template supports versions or this option will not work. Also make sure\n\u003e the versions exist in Jira (check your project's releases) before using them in this action.\n\nAllows to `set|add|remove` fix versions for a Jira ticket. A set of versions must be provided with\none entry per line. Depending on the prefix different actions are performed.\n\n-   `=` When a line is prefixed with this character it will be treated like a `SET` action.\n-   `+` When a line is prefixed with this character it will be treated like an `ADD` action.\n-   `-` When a line is prefixed with this character it will be treated like a `REMOVE` action.\n-   `no prefix` - When a line does not have any prefix as described above it will be ignored.\n\nIn order for this to work all entries will first be grouped and assigned to one of the three groups.\nAfterwards it will create a body payload that includes the `SET` group first followed by the `ADD`\ngroup and then the `REMOVE` group. Check the [Jira REST API](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issues/#api-rest-api-3-issue-issueidorkey-put)\nfor more information.\n\n\u003e When a `SET` group is available it will basically replace whatever was available before. The `ADD`\n\u003e group will then add additional entries on top of the new values. The `REMOVE` group will then\n\u003e remove entries that were added by the two other groups. The usual use-case however is to either\n\u003e use `SET` or a combination of `ADD`and `REMOVE` groups. It does not make sense to mix all three groups\n\u003e in one step.\n\nThe option is ignored when blank.\n\n### Option: labels\n\n|          |     |\n| :------- | :-- |\n| Required | no  |\n| Default  |     |\n\nAllows to `set|add|remove` labels to a Jira ticket. A set of labels must be provided with\none entry per line. Depending on the prefix different actions are performed.\n\n-   `=` When a line is prefixed with this character it will be treated like a `SET` action.\n-   `+` When a line is prefixed with this character it will be treated like an `ADD` action.\n-   `-` When a line is prefixed with this character it will be treated like a `REMOVE` action.\n-   `no prefix` - When a line does not have any prefix as described above it will be ignored.\n\nIn order for this to work all entries will first be grouped and assigned to one of the three groups.\nAfterwards it will create a body payload that includes the `SET` group first followed by the `ADD`\ngroup and then the `REMOVE` group. Check the [Jira REST API](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issues/#api-rest-api-3-issue-issueidorkey-put)\nfor more information.\n\n\u003e When a `SET` group is available it will basically replace whatever was available before. The `ADD`\n\u003e group will then add additional entries on top of the new values. The `REMOVE` group will then\n\u003e remove entries that were added by the two other groups. The usual use-case however is to either\n\u003e use `SET` or a combination of `ADD`and `REMOVE` groups. It does not make sense to mix all three groups\n\u003e in one step.\n\n\u003e When a value for a non-existing component is used the Jira REST API will create such a component.\n\nThe option is ignored when blank.\n\n### Option: customfields\n\n|          |     |\n| :------- | :-- |\n| Required | no  |\n| Default  |     |\n\nUpdates the value of custom fields in the Jira ticket. It expects a set of IDs for the custom fields along\nwith their associated value, separated by a colon (`:`). One entry per line.\n\n\u003e The value of a custom field can contain colons (`:`) as only the first occurance of a colon per line is\n\u003e interpreted as a delimiter.\n\nThe option is ignored when blank.\n\n## Outputs\n\nThis action provides some information via outputs for post-processing. Following is an overview of the keys\nregistered with the action's output.\n\n1. `hasErrors` - A boolean value indicating whether there are issues that have not been updated successfully.\n   This is useful when the failOnError option is set to false and one still wants to check if there\n   have been failed transition attempts (e.g. for reporting back to MSTeams or Slack).\n2. `successful` - A list of IDs of issues that have successfully been updated. The format is the same as used\n   with the issues option (either comma or line separated).\n3. `failed` - A list of IDs of issues that failed to get updated. This may be useful to add comments to the tickets\n   in question or to report those tickets to a Slack or MSTeams channel. The format is again the same as\n   with the issues option.\n\n## Test Action\n\nThis action can be tested during development with the use of https://github.com/nektos/act.\n\nPlease adapt the values accordingly both in the workflow file and in the CLI command.\n\n```\nact -W .github/workflows/pr.yml \\\n    -j check \\\n    -s JIRA_URL=*** \\\n    -s JIRA_EMAIL=*** \\\n    -s JIRA_TOKEN=***\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrieder%2Fjira-issue-transition","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffrieder%2Fjira-issue-transition","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrieder%2Fjira-issue-transition/lists"}