Dev Space

Customize and extend the power of Alteryx with SDKs, APIs, custom tools, and more.
SOLVED

JIRA Connector

Coxta45
11 - Bolide

JIRA Connector (Macro)

 

jira.png   

 

 

 

 

 

Public Gallery Link:  https://gallery.alteryx.com/#!app/JIRA-Connector/58d87c2feffc2a0dd0b5ed8f

 

I've published a JIRA Connector to the public gallery and hope it will be useful for those using JIRA that are looking for a way to quickly download issues for their JIRA projects.  It's pretty straightforward, but here's a preview and quick guide:

 

30 Second Preview:

 

 

Installation & Configuration

 

Download and import to your Macros folder

 

import.png

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

As long as your macro folder has been mapped (Options -> User Settings -> Edit User Settings -> Macros), you should find the JIRA Connector tool in the Connectors category on the tool palette the next time you open Alteryx.

 

pallete.png

 

 

 

 

 

 

 

Tool Configuration

 

3 Tabs:  Site & Login, Project & Issues, Fields

 

Site & Login

 

Enter the URL for your JIRA site along with your username and password.  Email logins will work, but your actual username is preferable because it enables the "Only My Issues" option to work (next tab).

 

login.png

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Project & Issues

 

You'll need to run the workflow at least once with the "Refresh Project List" option selected before being able to use the "Download Issues" option.  This loads a list of available JIRA projects that will show in the dropdown under the Download Issues option on subsequent runs.

 

refresh_projects.png

 

 

 

 

 

 

 

 

 

 

 

 

 

Once an available project list has loaded, you can select a project to download issues from.  You'll also notice some options for filtering issues that belong to yourself or another specific assignee.  You can also paginate through large result sets in 1,000 record increments.

 

download_issues.png

 

Fields

 

Lastly, select one of three options for returned fields and parsing methods.

 

  1. Standard - Formatted
    •  Includes the commonly used JIRA system fields and utilizes more practical parsing and formatting methods
  2. Standard - Raw
    • Includes all JIRA system fields and transposes/flattens multi-dimensional arrays (to a certain extent/depth)
    • Can yield wide results
  3. The Kitchen Sink
    • Includes all system fields, as well as custom fields
    • Parsed results for this option will likely be very wide and cumbersome

 

fields.png

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Output

 

Summary (S) - a brief summary of the results (record counts, etc.)

Raw JSON (J)  - direct JSON response from the JIRA REST API

Parsed Results (P) - the parsed results

canvas.png

 

That's it!  Once again, I hope this will be useful and look forward to getting some decent feedback.  I've only been able to test this on our company's [cloud hosted] JIRA projects and honestly have no idea if it will work for private server hosted JIRA environments.  

 

Please feel free to leave feedback and/or report any runtime errors below.  I'll do my best to publish new versions to the gallery with essential fixes.

 

Taylor Cox

87 REPLIES 87
zdavis
7 - Meteor

Hello,

 

I love this macro - thank you for creating and posting it!

 

I do have a question. Is there a way to boost the results past 1000, or is this a function of the API? My company is using JIRA heavily to manage large projects and single projects have over 1k tickets presently, so I'm limited in my output. Is this adjustable?

 

One piece of possible feedback for the future: under Project Issues, "Only My Issues" returns just those assigned to me. It would be helpful if this could also return those that I created, or am watching.

 

Thank you! I really appreciate it.

Coxta45
11 - Bolide

@zdavis,

 

Thanks for the kudos, I'm glad you like the connector!  Also, the feedback is much appreciated as I was hoping for ideas for improvement, etc.

 

I've published Version 3, which features a couple of minor enhancements that address the question and suggestion that you made.

 

"Is there a way to boost the results past 1000, or is this a function of the API?"

 

- The JIRA API record limits will vary based on an installation's config property setting.  For cloud instances, I don't believe this can be changed without opening a JIRA service ticket.  Our company's cloud instance, for example, limits # of results to 1,000 for the API endpoint being used in the connector (/rest/api/latest/search).  However, I upped the limit in the connector to 5,000 in the chance that an install allows more.  Lastly, check out the example for pagination (bottom) - this will help in understanding how you can pull the remaining issues if you have more than 1,000 (or whatever your limit may be).

 

"One piece of possible feedback for the future: under Project Issues, "Only My Issues" returns just those assigned to me. It would be helpful if this could also return those that I created, or am watching."

-  I added 2 options under "Only My Issues".  One which returns those assigned to you, and one which returns those reported by you.  I'm not sure yet how to query those that you're watching...

 

Updated Config

 

Config.png

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

I'm not yet sure how to execute "OR" statements in a POST array via JQL - so here's how you could get a list of any issues that are either assigned to you OR reported by you.

 

Canvas.png

 

Pagination Example

 

Pages.png

 

Hope this helps!

zdavis
7 - Meteor

Wow- that's awesome. Thank you so much for taking the time to make an update, add notations, and enlist my comments in the update. Fantastic tool, and thanks for the great support also!!

Coxta45
11 - Bolide

@zdavis,  No problem!  Always glad to help :-)

jyeh
7 - Meteor

Thanks Taylor for sharing the connector.

 

I am currently implementing a worfklow to extract JIRA data. In our current environment, the workflow will return a 302 code, so the project list will not refresh and error out. One possible solution is to open the Jira Connector macro and change the Message tool (the one after the download tool) within the Get Projects, Standard - Formatted, and Kitchen Sink or Standard Raw containers (after enabling it) from:

 

Message Type: Error - And Stop Passing Records Through This Tool

 

to

 

Message Type: Warning

 

This will allow the workflow to continue processing and ignore the 302 error code and refresh the project list.

 

Thanks again for the connector!

Coxta45
11 - Bolide

@jyeh,

 

Thanks for the feedback, this is definitely useful information.  I'm currently using the new HTML/JavaScript SDK to develop a new version of this tool that should be a bit easier to use.   I'll be sure to incorporate some more solid error handling - again, thanks for the feedback!

jyeh
7 - Meteor

Another pagination solution would be something like the following:

 

Use the JIRA Connector to get the limit and total issues --> Auto Field --> Generate Rows (see settings on screenshot) --> formula to fix initialization row --> Next JIRA Macro to overwrite the "Limit" and "Starting With" values. Add the Unique ID tool as a safety measure (Pending).

 

 Parent WorkflowParent WorkflowMacroMacro

 

Thanks

Coxta45
11 - Bolide

Very cool!

 

I'm actually thinking about integrating this within the Jira Connector itself....

 

For instance, using similar logic, I would add an optional input to the JIRA Connector that would take a "Next Call" field.   The "Summary" output from the connector would include this "Next Call" field with a pre-compiled call (JSON array) that would be used for the next call to the JIRA API.  This would allow the user to simply chain the JIRA Connectors together using the summary outputs to (optional) inputs and union each of the  "Parsed" outputs.

 

Another idea would include doing this within a JIRA "Paginator" Macro - which would simply be an iterative macro that executes the aforementioned logic until all calls have been made - or even let the user specify the number of subsequent pages to load.   The beauty of this is limiting the number of tools required to pull data to 2...

 

However, in the spirit of minimizing work and canvas space utilization, I'll probably move the Paginator macro into the connector itself also, while providing the options in the macro interface for the number of pages (or all) to return.  And viola! One tool, all results!

jyeh
7 - Meteor

Thanks for the insight. I am not sure that I followed the chained approach implementation. It would be nice to have the one tool / all results solution though.

 

The all results would be good to have to provide an initial load. To keep things in sync, it would be useful to include date filters, so the user can specify the date range and provide change data capture capabilities. For example, similar to the assignee comment above include "updated >%3D -1d" to the filter URL, so only updated issues for the last day would be part of the result set. This would reduce the volume of data and allow the user to process the updates/new issues.