Salto for
Jira
Articles
SHARE
Gal Fatal
October 31, 2023
10
min read
A Command Line Interface (CLI) provides a method for interacting with a computer program or operating system through text-based commands entered into a terminal or command prompt window.
In a CLI, users input commands using a specific syntax, and the program provides text-based feedback in response. This method can be an efficient way for users comfortable with text-based interfaces to perform tasks, especially for system administrators, developers, and advanced users.
Popular CLI interfaces include the Windows Command Prompt, PowerShell, and the Linux/Unix terminal. Many software development tools, databases, and networking devices also offer their own command-line interfaces for advanced configuration and automation.
Atlassian does not provide an out-of-the-box CLI. However, there is an app available in the Atlassian marketplace that supports CLI for Jira, as well as other Atlassian tools like Confluence and Bitbucket.
The most popular app in the Atlassian marketplace for a command-line interface is the Jira Command Line Interface (CLI) by Appfire. This app provides a user-friendly CLI with about 1000 actions you can perform, supporting both Data Center and Cloud versions of Jira, Confluence, Bitbucket, and Bamboo.
The app enables Jira admins and users to interact with Jira via a command-line interface, allowing for tasks such as creating and updating issues, performing searches, generating reports, and managing workflows, attachments, comments, and more—all from the command line.
It is particularly beneficial for automating repetitive tasks, integrating with other tools, and for users who prefer working in a command-line environment.
Command Line Interface (CLI) is a way to interact with a computer program or operating system through text-based commands entered into a terminal or command prompt window.
One way to automate tasks in Jira is through the Command Line Interface (CLI). However, other methods are available, such as Automation Rules and Scripts.
Jira automation is a powerful tool streamlining your workflow by automating everyday tasks. With Jira automation, you can set up custom rules and triggers to perform actions such as assigning issues, updating fields, and sending notifications. This feature is included with both Jira Cloud and Data Center at no additional cost.
Using Jira automation saves time, reduces errors, and improves team efficiency. By automating routine tasks, your team can focus on more complex work. For strategies on building, testing, and maintaining Jira Automation Rules, see "10 Strategies for Building, Testing, and Maintaining Jira Automation Rules."
Why Consider Using CLI Instead or in Parallel with Jira Automation Rules?
When creating complex automations, Jira automation rules may not suffice. In these cases, apps that support scripting, such as ScriptRunner for Jira, can be considered.
ScriptRunner for Jira is a comprehensive tool that allows users to tailor Jira to their specific needs, automate workflows, and perform complex operations that might not be achievable through Jira's native features alone. It is widely used by Jira administrators, developers, and power users to enhance the capabilities of their Jira instances.
Why Consider Using CLI Instead or in Parallel with Using Scripts?
For a comprehensive review of Jira automation options—including automation rules, scripts, and CLI—see "Simplifying Jira Tasks: Review of Automation Apps and Tools."
To start using the Jira Command Line Interface (CLI) as an administrator, install the app from the Atlassian marketplace. Like many other applications, it’s free for up to ten users.
Note that you can use CLI to automate other Atlassian products as well. See the Confluence Command Line Interface (CLI), Bitbucket Command Line Interface (CLI), and Bamboo Command Line Interface (CLI) (available for the Data Center version only).
Refer to the Installation Guide for complete installation and configuration instructions.
Please note that you need to install a client on your local machine, and it’s recommended to share the Jira user accounts with this client installation so they will be able to use the CLI as well.
For a step-by-step guide on getting started, including numerous examples, see the User Guide.
Imagine you have two Jira issues, PROJ-1 and PROJ-2, and you want to copy all ten attachments from PROJ-1 to PROJ-2. This task is cumbersome to perform manually through the Jira UI, but with CLI, you can accomplish it quickly using a single command:
-a copyAttachments –issue <source issue key> –toIssue <target issue key>
The command prompt assists in building your action quickly, providing all the options and a short description as you type and specifying in which Atlassian project the action can be used.
The complete prompt and the result:
There are times when you need to run an action on multiple issues, a task typically performed by Jira administrators.
You can do this by performing a Bulk Change operation. It gives you the ability to edit issues, move issues, transition issues, delete issues, watch, and stop watching issues. While Bulk Change operations provide the ability to edit, move, transition, and delete issues, as well as manage watch status on issues, they may not cover all needs.
For instance, if you need to add an attachment, such as a Word file with instructions, to all issues in a specific project, Bulk Operations can't help. Manually adding the file to each issue is not feasible at scale.
With CLI, you can perform this task in a single line of action using the runFromIssueList action.
Let’s see the complete prompt and the results:
If you are using the Jira Data Center platform, it is recommended also to install the "Run CLI Actions" app. This app adds an Administrator UI and provides a simple way to run CLI actions from within Jira, adding the option to create conditions and workflow post functions that include CLI actions.
It's crucial to use a test server or sandbox to test changes before implementing them in a live environment. For more information on sandboxes and how to use them for testing, see "Navigating the Atlassian Cloud Sandbox."
When making changes to Jira configuration using CLI, such as DeleteFilter, it's critical to use tools that help you merge those changes and create DevOps processes.
For example, Salto is a configuration tool that allows you to merge all your configuration changes on a test environment in one go. Salto helps you check dependencies, provides the option to roll back changes, and tracks all the modifications that you've made. By using Salto, you can easily manage your configuration changes, ensuring they are safe and efficient.
The Command Line Interface is a powerful tool for automating tasks in Jira. In certain situations, it provides a quick and efficient solution that cannot be achieved through other means. The best part about using CLI is that it doesn't require development skills, making it accessible to everyone.
With over 1000 available actions, CLI offers practically limitless potential for automating tasks in Jira. Explore CLI examples to discover all available actions.
If you're looking for CLI video training, check out this excellent CLI Master Class, which includes step-by-step training across nine sessions.
Salto for
Jira
Jira
SHARE
Gal Fatal
October 31, 2023
10
min read
A Command Line Interface (CLI) provides a method for interacting with a computer program or operating system through text-based commands entered into a terminal or command prompt window.
In a CLI, users input commands using a specific syntax, and the program provides text-based feedback in response. This method can be an efficient way for users comfortable with text-based interfaces to perform tasks, especially for system administrators, developers, and advanced users.
Popular CLI interfaces include the Windows Command Prompt, PowerShell, and the Linux/Unix terminal. Many software development tools, databases, and networking devices also offer their own command-line interfaces for advanced configuration and automation.
Atlassian does not provide an out-of-the-box CLI. However, there is an app available in the Atlassian marketplace that supports CLI for Jira, as well as other Atlassian tools like Confluence and Bitbucket.
The most popular app in the Atlassian marketplace for a command-line interface is the Jira Command Line Interface (CLI) by Appfire. This app provides a user-friendly CLI with about 1000 actions you can perform, supporting both Data Center and Cloud versions of Jira, Confluence, Bitbucket, and Bamboo.
The app enables Jira admins and users to interact with Jira via a command-line interface, allowing for tasks such as creating and updating issues, performing searches, generating reports, and managing workflows, attachments, comments, and more—all from the command line.
It is particularly beneficial for automating repetitive tasks, integrating with other tools, and for users who prefer working in a command-line environment.
Command Line Interface (CLI) is a way to interact with a computer program or operating system through text-based commands entered into a terminal or command prompt window.
One way to automate tasks in Jira is through the Command Line Interface (CLI). However, other methods are available, such as Automation Rules and Scripts.
Jira automation is a powerful tool streamlining your workflow by automating everyday tasks. With Jira automation, you can set up custom rules and triggers to perform actions such as assigning issues, updating fields, and sending notifications. This feature is included with both Jira Cloud and Data Center at no additional cost.
Using Jira automation saves time, reduces errors, and improves team efficiency. By automating routine tasks, your team can focus on more complex work. For strategies on building, testing, and maintaining Jira Automation Rules, see "10 Strategies for Building, Testing, and Maintaining Jira Automation Rules."
Why Consider Using CLI Instead or in Parallel with Jira Automation Rules?
When creating complex automations, Jira automation rules may not suffice. In these cases, apps that support scripting, such as ScriptRunner for Jira, can be considered.
ScriptRunner for Jira is a comprehensive tool that allows users to tailor Jira to their specific needs, automate workflows, and perform complex operations that might not be achievable through Jira's native features alone. It is widely used by Jira administrators, developers, and power users to enhance the capabilities of their Jira instances.
Why Consider Using CLI Instead or in Parallel with Using Scripts?
For a comprehensive review of Jira automation options—including automation rules, scripts, and CLI—see "Simplifying Jira Tasks: Review of Automation Apps and Tools."
To start using the Jira Command Line Interface (CLI) as an administrator, install the app from the Atlassian marketplace. Like many other applications, it’s free for up to ten users.
Note that you can use CLI to automate other Atlassian products as well. See the Confluence Command Line Interface (CLI), Bitbucket Command Line Interface (CLI), and Bamboo Command Line Interface (CLI) (available for the Data Center version only).
Refer to the Installation Guide for complete installation and configuration instructions.
Please note that you need to install a client on your local machine, and it’s recommended to share the Jira user accounts with this client installation so they will be able to use the CLI as well.
For a step-by-step guide on getting started, including numerous examples, see the User Guide.
Imagine you have two Jira issues, PROJ-1 and PROJ-2, and you want to copy all ten attachments from PROJ-1 to PROJ-2. This task is cumbersome to perform manually through the Jira UI, but with CLI, you can accomplish it quickly using a single command:
-a copyAttachments –issue <source issue key> –toIssue <target issue key>
The command prompt assists in building your action quickly, providing all the options and a short description as you type and specifying in which Atlassian project the action can be used.
The complete prompt and the result:
There are times when you need to run an action on multiple issues, a task typically performed by Jira administrators.
You can do this by performing a Bulk Change operation. It gives you the ability to edit issues, move issues, transition issues, delete issues, watch, and stop watching issues. While Bulk Change operations provide the ability to edit, move, transition, and delete issues, as well as manage watch status on issues, they may not cover all needs.
For instance, if you need to add an attachment, such as a Word file with instructions, to all issues in a specific project, Bulk Operations can't help. Manually adding the file to each issue is not feasible at scale.
With CLI, you can perform this task in a single line of action using the runFromIssueList action.
Let’s see the complete prompt and the results:
If you are using the Jira Data Center platform, it is recommended also to install the "Run CLI Actions" app. This app adds an Administrator UI and provides a simple way to run CLI actions from within Jira, adding the option to create conditions and workflow post functions that include CLI actions.
It's crucial to use a test server or sandbox to test changes before implementing them in a live environment. For more information on sandboxes and how to use them for testing, see "Navigating the Atlassian Cloud Sandbox."
When making changes to Jira configuration using CLI, such as DeleteFilter, it's critical to use tools that help you merge those changes and create DevOps processes.
For example, Salto is a configuration tool that allows you to merge all your configuration changes on a test environment in one go. Salto helps you check dependencies, provides the option to roll back changes, and tracks all the modifications that you've made. By using Salto, you can easily manage your configuration changes, ensuring they are safe and efficient.
The Command Line Interface is a powerful tool for automating tasks in Jira. In certain situations, it provides a quick and efficient solution that cannot be achieved through other means. The best part about using CLI is that it doesn't require development skills, making it accessible to everyone.
With over 1000 available actions, CLI offers practically limitless potential for automating tasks in Jira. Explore CLI examples to discover all available actions.
If you're looking for CLI video training, check out this excellent CLI Master Class, which includes step-by-step training across nine sessions.