How to Schedule an Export of Assets from Jira Service Management
Streamlined guide for automating and exporting asset data in Jira effectively
Highlights
- Automation Rules: Leverage Jira’s automation settings or external scheduling for recurring exports.
- API & Scripting: Utilize the Atlassian REST API in combination with Python or similar languages to schedule exports.
- Marketplace Apps: Consider using specialized export plugins from the Atlassian Marketplace for enhanced functionality.
Understanding the Basic Export Process
Jira Service Management provides rich asset management features suited for Premium and Enterprise subscriptions. Although the interface allows you to manually export objects from your asset schema, it does not directly support built-in scheduling of exports. This guide will explain several methods—including manual exports, automation rules, scripting, and the use of Marketplace apps—to schedule and automate asset data export processes.
Manual Export Process
The most straightforward approach involves manually exporting your assets from Jira’s user interface. To do this, you will typically:
Steps to Perform a Manual Export
1. Navigate to the Assets section and select the relevant object schema.
2. Choose the specific object type that you wish to export.
3. Apply filters, either using basic filter or advanced search, to narrow the exported results.
4. Switch to the List view for a more detailed display.
5. Click on Bulk actions, and then select Edit objects from the dropdown menu.
6. Configure export options and click Export to generate a CSV file.
This process produces the file instantly; however, it does not offer scheduling. To maintain regular exports without manual intervention, you need additional tools.
Approaches to Scheduling Asset Exports
Since native scheduling is not provided by Jira Service Management, you have to rely on a combination of automation rules, scripting languages, and third-party apps. The following sections detail the various methods to schedule your asset exports.
Using Jira Automation Rules
One of the most accessible methods to schedule an export is by using automation rules within Jira. Although direct CSV scheduling is not available, automation can trigger tasks that indirectly result in scheduled exports. Here’s how you can do it:
Step-by-Step Guide for Automation Rules
Create an Automation Rule:
- Access the project settings and navigate to the Automation section.
- Click on "Create rule" to begin configuring your new process.
Select a Trigger:
- Choose a trigger such as "Scheduled" to determine the frequency (e.g., daily, weekly) the export should be performed.
Adding Actions:
- Use an action that best suits your requirements, such as sending an email alert, initiating a custom script, or even triggering webhooks that call external services. This indirect approach allows you to integrate API calls or run scripts that perform the export.
Testing and Saving:
- Save your rule and run a test to ensure data is being successfully processed. While this method might not directly output a CSV file, it sets the groundwork for integrating more advanced solutions.
Integrating Scripting and API Methods
For users comfortable with scripting, leveraging the Atlassian REST API provides a powerful way to automate exports. This method involves writing scripts (using languages like Python) that call the API at scheduled intervals, extract asset information, and format the data into CSV or other export formats.
How to Use the REST API for Exports
The following steps outline how to develop a script for exporting assets:
- Authentication: Set up your API credentials for accessing Jira. This typically involves using basic auth or OAuth as per your instance’s security settings.
- Constructing the API Call:
Form a GET request that targets the API endpoint responsible for asset data. Ensure you include parameters such as object schema and object type for precise data retrieval.
- Data Extraction and Format:
Process the returned JSON data and extract necessary fields like asset ID, name, description, and other relevant metadata. Use a CSV library to write this information into a CSV file.
- Scheduling the Script:
Use scheduling solutions like
cronon Linux/macOS or Task Scheduler on Windows to run the script at your desired intervals.
Example Python Script for API Export
The following Python script outlines a basic approach:
# Import necessary libraries
import requests
import csv
import datetime
# Jira API configuration
jira_url = "https://your-jira-instance.atlassian.net"
username = "your-username"
password = "your-password" # Use secure credential management
# Configure the object schema and type
schema_name = "YourSchemaName"
object_type = "YourObjectType"
def export_objects():
# Prepare for HTTP basic authentication
auth = (username, password)
session = requests.Session()
session.auth = auth
# Construct the API endpoint URL
response = session.get(f"{jira_url}/rest/api/3/asset/{schema_name}/{object_type}")
if response.status_code == 200:
data = response.json()
filename = f"export_{datetime.datetime.now().strftime('%Y-%m-%d_%H-%M')}.csv"
# Define field names for CSV as required
fieldnames = ['id', 'name', 'description']
with open(filename, 'w', newline='') as csvfile:
writer = csv.DictWriter(csvfile, fieldnames=fieldnames)
writer.writeheader()
for obj in data:
writer.writerow({
'id': obj.get('id', ''),
'name': obj.get('name', ''),
'description': obj.get('description', '')
})
print("Export successful: ", filename)
else:
print("Failed to fetch data. Status Code:", response.status_code)
if __name__ == "__main__":
export_objects()
This script can be scheduled with your system's task scheduler. By tying the scheduled script execution to the task scheduler, you effectively automate the exportation of asset data.
Utilizing Marketplace Apps
Another viable strategy is to use Marketplace apps designed to enhance Jira’s export capabilities. These apps offer additional features like live previews, advanced scheduling options, and support for multiple file formats, including CSV, Excel, and JSON.
Advanced Export Options
Products such as the Exporter for Jira Cloud offer a more user-friendly and automated approach for recurring exports. When using a marketplace app, you typically:
- Install the app from the Atlassian Marketplace.
- Configure the app settings, choosing the desired object schema and customizing the fields you want to export.
- Set up a schedule through the app’s interface for exporting data. Many apps provide an option to choose the file format and frequency (daily, weekly, monthly).
- Monitor and manage your exports directly within the app dashboard.
For instances that require customization or handling large-scale asset data, integrating marketplace solutions might be the optimal strategy.
Comparing Different Scheduling Approaches
The table below provides a concise overview of the three primary approaches to scheduling asset exports:
| Method | Advantages | Considerations |
|---|---|---|
| Jira Automation Rules |
|
|
| Scripting and REST API |
|
|
| Marketplace Apps |
|
|
Integrating the Approaches into Your Workflow
The optimal solution depends on your organizational needs, technical skill set, and budget:
For Non-Technical Users
Users who prefer a graphical interface and have limited scripting knowledge should explore Marketplace apps. These apps not only simplify the process but also offer premium features including detailed previews and scheduling options. However, they might involve additional costs.
For Technical and Custom Needs
Developers with programming experience may find that leveraging the Atlassian REST API with a scripted solution offers the most flexibility. Setting up scripts, scheduling with cron or Task Scheduler, and integrating with Jira automation allows for completely customized exporting procedures.
Combining Automation with Scripting
Organizations can also benefit from a hybrid approach. Initially, use Jira Automation to trigger external API calls. Then, let your custom script handle the data processing and file generation. This combination preserves the ease-of-use provided by automation rules while ensuring fidelity and control offered by custom scripting.
By planning the proper workflow, you can ensure that asset exports occur seamlessly with minimal manual intervention. Additionally, automated email notifications or integration with cloud storage solutions can keep you informed, reducing manual tracking requirements.
Enhancing Your Setup
Beyond scheduling exports, consider integrating additional tools like data visualization platforms or data storage solutions (cloud databases or file storage services). Doing so can help turn raw asset data into actionable insights, supporting operational efficiency and informed decision-making.
For example, exporting asset data to a CSV file on a scheduled basis can easily be paired with Microsoft Excel, Google Sheets, or business intelligence tools. These tools can take the exported data further—helping you create reports, dashboards, and visual representations that will guide management decisions.
It is important to periodically review and adjust your scheduled exports based on changing project requirements or the evolving structure of your asset data. Proper maintenance of your automation scripts and keeping your Jira instance up-to-date with any API changes are crucial steps for long-term success.
References
- How to automate exports/imports of Assets - Atlassian Community
- Export Objects - Jira Service Management Cloud - Atlassian Support
- How to export assets data - Atlassian Community
- Jira Cloud Export Issue - Jira
- Advanced Export App - Atlassian Marketplace
Recommended Related Queries
Last updated March 11, 2025