Introduction

As Jira Administrator you know you can check the users that have license of Jira Applications assigned. For it, can be checked inside Setup > Applications > Versions & licenses.

Clicking in 243 Jira will go to User Management and show the list of users. But this list it’s not easy to be checked globally.

When you have for example 243 licenses assigned, sometimes you will need to check some condition or relation between all of them.

The following code let you export a JSON file with the list of users.

This script is prepared for checking licenses of Jira Service Desk but can be modified for a list of other Jira application.

Therefore, this script is a good template for giving a list of users with some “customField” if you need also.

Script Editor and Script Console

My recommendation is save the following code in Script Editor and run in Console when you need.

The Code

The following link shows the code of scriptrunner.

https://github.com/MrAddon/Blog_Examples/blob/master/LicenseCode.groovy

Summary

This script shows how to:

  1. How to read and manage information out of IssueManager class. There are other world different as get issue object.
  2. How to create a simple JSON that can be used in other applications (REST API, PowerBI, Excel…)
  3. How to save files in server of Jira to be exported.

I hope it simple code helps.

Best regards.

Posted by:juanjomarchal

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s