blog

Export Your Jira Tickets as Plaintext with House of YAML

Power up and leave the crowd behind.

“The increase of this efficiency is essentially the problem of the manager, and the amount to which it can be increased by proper study is, in most cases, so great as to be almost incredible.”

So said Henry Gantt.

He wasn’t wrong.

In 1910, he developed the Gantt chart - a revolutionary way to visualize project schedules. His work helped oversee massive projects, including the construction of the Hoover Dam and the Interstate Highway System. Eventually, it lead to modern project management.

In time, things change. Over a century later, we’ve traded in paper charts for powerful digital tools… but one advantage that paper charts have is distinct lack of lock-in. If you learn to work using paper, you can work with any brand - you don’t need to retrain to switch brands of notebook.

Indeed, can you imagine a world where changing paper vendors required reformatting all your paper records?

That’s a silly thought, of course - but that’s the situation we find ourselves with project management software today.

That’s where House of YAML comes in.

For many teams, project management tools have become essential - they help you keeping teams organized and on track. Take JIRA, for example; for software teams, you can use it track tasks, bugs, and features. You can use it to manage many other types of projects as well.

However, relying on a single tool or a single vendor for all your project data can be risky. What happens if you need to move your data out of Jira? Maybe your team is switching to a different tool, or perhaps you simply want a backup of your data in a more portable format. That’s where House of YAML comes in.

The Problem with Proprietary Data Formats

Many productivity tools, including Jira, store your data in their own proprietary formats. You can often export a slice of the data easily, but there isn’t much incentive for vendors to create easy transition paths - which can effectively create a “data silo” that makes it difficult to use your data outside of that specific tool. This is a serious problem for many reasons:

  1. Vendor lock-in: If your data is trapped in a proprietary format, you may be forced to continue using that tool even if it no longer meets your needs, simply because migrating your data would be too difficult.

  2. Limited data portability: Proprietary formats often make it hard to move your data to other tools or integrate it with other systems. This can limit your flexibility and hinder automation efforts.

  3. Reduced data longevity: If the tool you’re using becomes obsolete or the company goes out of business, your data may become inaccessible if it’s in a proprietary format that is no longer supported.

Even if the tool provides an export function, the format may not be ideal for long-term storage or for importing into other systems. CSV exports, for example, can lose important structural information about your data.

The Power of Plain Text

In contrast to proprietary formats, plain text is a universal and timeless data format. It has several key advantages:

  1. Human-readable: Plain text can be read and understood by humans without the need for specialized software. This makes it accessible to anyone, regardless of their technical expertise.

  2. Universal compatibility: Virtually every computer system can process plain text. It doesn’t require special software or libraries to parse.

  3. Longevity: Plain text has been around since the dawn of computing and is likely to remain relevant for the foreseeable future. By storing your data in plain text, you ensure that it will remain accessible and usable for years to come, regardless of changes in technology.

  4. Version control-friendly: Plain text works well with version control systems like Git, which allow you to track changes to your data over time.

By exporting your Jira data to a plain text format like YAML, you can break free from proprietary data silos and ensure the long-term accessibility and portability of your project information.

Enter House of YAML

House of YAML is a powerful Ruby gem that simplifies the process of exporting your Jira tickets (and data from other tools like Asana) as YAML files and storing them in a Git repository.

YAML (YAML Ain’t Markup Language) is a human-friendly data serialization standard that is widely supported across programming languages. It uses indentation and simple punctuation to represent structured data in a way that is easy for humans to read and write.

Here’s a simple example of what a Jira ticket might look like when exported to YAML:

---
id: '1033'
path: '10001'
summary: when you create a duplicate camp shipping rate then you get this error
description: |-
  As a user, I want to be able to search for articles by keyword,
  so that I can find the information I need quickly.

  Acceptance Criteria:
  - Search bar is prominently displayed on article listing page
  - Search returns relevant articles based on title and body content
  - Search results are paginated with 20 results per page  

status: Complete and Tested
assignee:

As you can see, the YAML format allows for a clear, structured representation of the ticket’s fields and values. This format is not only easy for humans to read and understand, but also easy for scripts and programs to parse and process.

Using House of YAML to export your Jira data is straightforward:

  1. Install the house_of_yaml gem in your Ruby project.

    gem install house_of_yaml
    
  2. Configure the gem with your Jira API credentials. You’ll need to generate an API token in your Jira account settings.

    require 'house_of_yaml'
    
    HouseOfYaml::Services::Base.add 'jira',
      base_uri: 'https://your-jira-domain.atlassian.net',
      email: '[email protected]',
      api_key: 'your_jira_api_key'
    
  3. Specify the path where you want to store the exported YAML files. This should be a directory managed by Git.

    repo_path = '/path/to/your/repo'
    
  4. Run HouseOfYaml.sync to fetch your Jira tickets and store them as YAML files in the specified Git repository.

    HouseOfYaml.sync(repo_path)  
    
  5. Optionally, push the changes to a remote Git repository for backup and sharing.

    git add .
    git commit -m "Export Jira tickets to YAML"
    git push origin main
    

After running this script, you’ll have a directory full of YAML files, each representing a Jira ticket. The files are organized by project and issue ID, making it easy to locate specific tickets.

your_repo/
  PROJECT-A-ID/
    1000.yml
    1001.yml
    ...
  PROJECT-B-ID/
    1001.yml
    1002.yml
    ...  

House of YAML handles all the complexity of interacting with the Jira API, pagination, and error handling, making the export process simple and reliable.

Benefits of Storing Your Data in Git

Storing your exported Jira data in a Git repository amplifies the benefits of using a plain text format like YAML. Git is a distributed version control system that is widely used for managing changes to source code, but it’s equally effective for managing changes to any plain text data.

Here are some of the key benefits of storing your Jira exports in Git:

  1. Version control: Git keeps a complete history of changes to your files over time. Every time you export your Jira data, you can commit those changes to Git. This allows you to see exactly what changed between exports, revert to previous versions if needed, and track the evolution of your project data over time.

  2. Backup and redundancy: Git repositories can be easily cloned and synchronized across multiple computers and servers. This means you can maintain copies of your exported Jira data in multiple locations (e.g., your local machine, a company server, a cloud hosting service like GitHub). This distributed approach provides a robust backup system for your data. Even if one copy is lost, you can easily restore from another clone of the repository.

  3. Collaboration and review: Git is designed for collaboration. Multiple people can work on the same repository of exported data, and changes can be reviewed and merged using Pull Requests. This can be useful if multiple team members need to access and update the exported data, or if you want to have a review process for data changes.

  4. Integration with other tools: Because your exported Jira data is in a Git repository, you can easily integrate it with other tools and workflows that support Git. For example, you could set up a continuous integration pipeline that runs automated tests or transformations on your exported data whenever changes are pushed to the repository.

  5. Data portability: With your Jira data in a Git repository, you can easily move it to other systems or share it with others. You can push the repository to a remote hosting service like GitHub, or package it as a tarball for distribution. The plain text YAML format ensures that your data will be readable and usable in a wide variety of contexts.

Conclusion

Regularly exporting your Jira tickets (and other project data) as plain text YAML files using House of YAML is a powerful strategy for ensuring the longevity, portability, and accessibility of your data. By storing the exported files in a Git repository, you gain the added benefits of version control, distributed backup, collaboration, and integration with other tools.

At the outset, we spoke of Gantt and his words regarding “increase of this efficiency” - and, as noted, that’s something a vendor can help you with.

But what if the vendor isn’t working for you anymore - instead of increasing your efficiency, they are decreasing it?

Whether you’re looking to switch project management tools, integrate your data with other systems, or simply ensure that your project history remains accessible, House of YAML and Git provide a robust and straightforward solution. Give it a try - and while you are it, submit a PR or three.