Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How to query your Jira Cloud REST API to set up a cost effective asset management solution

COCL CMDB.png

 

We keep hearing about the increasing importance of asset management and how managing assets efficiently is key to successful business operations. Companies are spoilt for choice with a vast array of CMDB (configuration management data base) and ITAM (IT Asset Management) solutions, ranging from big players which embark a comprehensive set of features to open source solutions which can incur significant implementation efforts. Atlassian also has its own asset management solution, Insight, which was acquired in 2020 from Mindville and is now available in Jira Cloud and Data Center Service Management offerings. 

These solutions are great and certainly generate a lot of business value, but they require a significant investment - be it financial, technical, or operational - that many small and medium-sized companies cannot afford or are simply not prepared to make.

A great deal of businesses have simple and basic needs when it comes to managing their help desk operations, so what options are on the table for them? 

An interesting solution for those businesses is to use… Jira!

Using Jira as an asset inventory

If you think of it, a Jira project can be used as a data source that stores asset records (issues) comprised of a number of attributes (fields), similarly to a “light-weight” CMDB. You can then use third-party apps to fetch asset information and display them on an incident form for your customers to enrich ticket context for service desk agents. It barely takes any technical skills to implement and delivers a lot of value to your business without breaking the bank!

We are going to illustrate how you can use Jira projects as asset repositories and leverage the power of Elements Connect to query asset information and display it in an incident form through a simple use case.

Use case: Use a Jira project as an “asset inventory” and link it to incidents

Meet CoralieSagara - Sad.png 

Meet Coralie, she is an IT Support specialist. As part of her role, she is responsible to manage IT support operations of her company.

Her company is quite small and operates on a tight budget for its IT operations, so it cannot afford a fancy CMDB solution to store and manage her company’s assets. They have been using Jira Service Management for managing their help desk operations, but help desk requests are not linking back to the actual asset inventory. When Coralie works on support tickets, she often struggles to know what asset is impacted by the incident. Besides, Coralie manually manages the asset inventory in a spreadsheet and tries to keep it updated as accurately as possible, relentlessly switching between tickets in Jira and asset inventory. It’s prone to errors, it takes a lot of time and keeps her from focusing on what really matters.

The tutorial below will help Coralie move away from her clunky spreadsheet and use a Jira project as an asset inventory that can be linked to her company’s support portal.

Prerequisites

  • Have Elements Connect installed on your Jira instance

  • Be global admin of your Jira instance

  • Create a Jira Software or Work Management project to hold your asset inventory

  • Create a Jira Service Management project for your service requests

1. Create an asset inventory in a Jira project

From a Jira Software project (here “my asset inventory”), you can create assets using the out-of-the-box issue type "Asset" by installing this free asset creation template offered by Atlassian. 

Asset-inventory-in-Jira.png

You can use custom fields to enrich your asset issues, e.g. Serial Number, Model Name, Manufacturer, Location, Owner, etc. Don't miss this post for tips on how to manage Jira custom fields effectively.

Now that your assets are created, you may want to design what their lifecycle will look like by configuring statuses and workflows that fit your business processes. Find out how to do this here. In this example, we are using a very simple workflow with a few statuses:

IN STOCK An asset is created as "In Stock" by default

CONFIGURATION ONGOING An asset will be set to “Configuration ongoing” after an asset provisioning request has been raised and the agent is ready to configure the asset.

IN USE An asset will be set to "In use" when it has been provisioned to a user or has been deployed to Production i.e. when it moves to "In Progress"

REPAIR ONGOING An asset will be set to “Repair ongoing” when a repair service request has been approved for it

RETURNED An asset is “Returned” when it is no longer used but can still be used

 

At this point, you should have a few assets in your “my asset inventory” project and a workflow that will help you track their lifecycle.

 

2. Configure Jira as a data source in Elements Connect

Now we need to go to Elements Connect and set up Jira REST API as a data source. This will enable Elements Connect to authenticate to the Jira REST API to access the asset inventory project in order to configure a field in an incident form that will display the list of assets from this project.

  • Simply go to “Datasources” and create a REST API datasource.

Datasource-create-REST-API.png

  • Configure it to use your Jira instance as base URL and select the “Basic” mode to authenticate providing your Jira login and generate an API token as a password.

3. Configure a connected field

What we want to do now is create a connected field that will fetch the list of asset issues held in the asset inventory project. Once that’s done, we will be able to add this connected field to a service request form from the customer portal.

First we will create a connected item of type “Select list”, name it, and select the Jira REST API we have created in the previous step.

Elements-Connect-connected-item.png

 

Our connected item has been created successfully, we now need to configure it to fetch the correct data.

We want it to fetch the name of issues that have an issue type “Asset” and are assigned to the current user so that the customer logged in to the portal can view and select only assets that belong to them. This filtering can be done directly from the REST endpoint of the connected item using JQL.

/search?jql=project = "my asset inventory" and issuetype = Asset AND Assignee = "$currentUser.accountId"

 

Let’s specify the location of the Connected item options in the JSON output, in our case the root element is “issues”. You can find more details about configuring REST API items in our documentation.

The last step is to configure what to display and how to display it in the Connected item. In this example, we want to display the names of the assets. This is how it would look like in FreeMarker, i.e. the language used for templating in Elements Connect:

${row.fields.summary}

FreeMarker allows you to insert HTML and therefore some styling to the content of your connected fields. It takes a bit of getting used to but will ultimately deliver a great experience for people using your portal.

 

4. Display the connected field to customers and agents

Our connected item is now configured, the last step is to add it to our target project where it should be displayed. Simply add the connected item to the relevant project when prompted, select the request type(s) where you would like the connected item to be displayed. That’s it!

From the customer portal, when a user picks the request type “Report broken hardware”, they will see an “Asset name” field containing the asset names currently assigned to them (the logged-in user). Thanks to FreeMarker, we were even able to enrich ticket display and add context by adding icons and the issue status.

CMDB-asset-example.png

 

Once the ticket has been submitted, the agent will be able to see which asset is impacted by the incident:

JSM-agent-view.png

 

Conclusion

For simple and basic incident management use cases, a Jira project can be used as an asset inventory. Using Elements Connect and the REST API data source, you can then pull your asset information in fields and display them to your customers and agents.

This use case has been implemented in our public demo playground: go see it in action!

If you are interested in implementing a similar use case or have questions about how to do it, feel free to reach out! Book time to talk to the Product team at Elements by clicking here.

1 comment

Comment

Log in or Sign up to comment
Juliette Lallement _Elements Apps_
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
March 9, 2022

Cool stuff!

TAGS
AUG Leaders

Atlassian Community Events