Dev Space

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

Jira Iterative Macro Connector

SDB40
7 - Meteor

Hello All,

 

Public Gallery Link: https://gallery.alteryx.com/#!app/Jira-Iterative-Macro-Connector/5cf81b8a0462d712c8e75001

 

After a few requests, I have finally decided to post some information on the Jira Iterative Macro Connector. Hopefully this short document helps to clarify.

 

Special Note and Thank you: This work was an "add-on" from @Coxta45 original "Jira Connector" and is an improvement (to me) based on some needs and limitations of a single API call.

 

Please refer here for detailed documentation to the Original Jira Connector:

https://community.alteryx.com/t5/Dev-Space/JIRA-Connector/td-p/51562

What is different from the original Jira Connector and the Jira Iterative Macro Connector?

Jira ConnectorJira Iterative Macro Connector
Single API CallMultiple (Iteartive) API Calling
Subject to server data limitsWill iterate beyond Server limits
Macro Dialogue InterfaceText Based Interface (file)

 

Why the need for Iterations?

 

We use Jira for Digital Manage for Daily Improvement (MDI) boards and Scrum boards, and the limitations of Canned Dashboards and complexity of EasyBI called for a need to extract all the data on a board and pull it into Tableau.

Due to Jira server limitations from local site admins, I was only able to pull 100 records from a given Jira Project at a time.  Having Jira projects that contained thousands of records, I had a need to iterate beyond the server limitations.  The iterations verify max records and iterate on a single API call until the max records for a project are received.

What input do I need to use the Macro?

The table below (also attached) outlines the following:

 

  1. First Row depicts the header row
  2. Second Row depicts the actual information you need to supply
  3. Third Row depicts an explanation of the information you need to supply

forQueryissuesmaxstart_withuserIteratorfieldsprojectapipassSite Base
all{"jql":"project = 16301","startAt":0,"maxResults":1000,"fields":[],"expand":["names"]}all1000example@domain.com0all<projectID>/rest/api/latest/search?jql&startAt&maxResults&validateQuery&fields&expand<API TOKEN>https://example.jira.com
(all issues, all issues assigned to me, etc. - just do all)(you can change this to reflect the other base parameters in the input file.  its just a base input set for the extraction, it will update as you iterate)(all issues, improvements, bugs, etc. - probably do all and filter later)(max number of results, will overwrite maxResults)(starting position, start at 0 to pull everything. Large numbers pull less data)(use your email, or rather the email that has an API token tied to it)(leave at 0, I think this is unused now with some changes but I don’t want to touch this)(same as before, probably leave at all unless you want a truncated data set)( id of desired project as is in data, e.g. 16301 which will be referenced in the JQL query)(this is the desired api the whole thing is built around)(must be a Jira Admin and generate this from your Jira site)

(your jira domain)

 

Initial Workflow Setup

 

Please refer to the screenshot and steps below to help with initial workflow setup when using the Iterative macro.

SDB40_0-1595013596502.png

 

  1. Step 1 - update the file in this post with the appropriate information or add a manual text based input containing the information
  2. Step 2 - hook up a browse to the iterative side
    1. This is mostly unused if setup correctly, but is required for iterative macros
    2. Can be useful if you need to debug the iterative side of the macro as it will show you outputs of the iterations which feed into the inputs of the next iteration
  3. Step 3 - the output data stream which you can build any data transformations as you see fit
    1. I personally did some data cleanup here as I intentionally export the kitchen sink and then trim it down later

 

25 REPLIES 25
LukeM
Moderator
Moderator

Hi @SDB40 

 

Correct me if I'm wrong but I believe the current Connector is broken. The final Data Cleanse tool before the Iterator Output has "Punctuation" selected which breaks the URL/Query etc for the second iteration onwards.

 

Luke

SDB40
7 - Meteor

@LukeM , @amcnally 

 

I think you are right Luke.  I must have uploaded the wrong version.  I uploaded a replaced the link in the original post with a new version (version 2) that corrects this.

 

The one on my hard drive does not have punctuation checked, nor whitespace.

 

Here is an image that highlights the two options you SHOULD UNCHECK if you downloaded the previous version.

 

Special thanks for identifying and calling this out so it can be corrected.  I believe it should solve some problems for a few others.

SDB40_0-1605624832535.png

 

 

 

lmccully10
6 - Meteoroid

Hi @SDB40 

 

I'm currently having issues with the JQL Query and can't retrieve any data. I'm able to connect to the API with the correct authorization (Have also used the previous Jira Connector API successfully) but get this error when trying to download:

 

"HTTP/1.1 400 Bad Request"

 

and from Downloadheaders the error shows as "{"errorMessages":["Error in the JQL Query: Expecting either 'OR' or 'AND' but got 'Issue'. (line 1, character 19)"],"errors":{}}"

So it seems like theirs an error coming from the query itself, but I didn't edit the input file in this field. I just added the desired project (Which happens in the formula tool).

 

Do you have any insight in what could be the problem?

 

Thanks!

SDB40
7 - Meteor

There are a few other Entries you need to edit in the input file.

 

  • Query
    • Worth adding your project ID to the project = section to start it in the right location
  • user
    • Needs to be updated to reflect your email/id to the API
  • ProjectID
    • Needs to be updated to your project ID
  • API Token
    • Needs to reflect your actual API token that was generated from admin tools in Jira
  • Site Base
    • Needs to reflect the core site domain base of your project

 

If you don't have these things updated correctly, will likely generate a bad URL and thus give you a 400 Bad Request.  Give it a try!

lmccully10
6 - Meteoroid

Thanks for reaching back!

 

All the requirements for the input file were updated previously as well. I'm now wondering if the project name isn't the same as project ID? The project I'm trying to reach has a name and then a key. In the input file I have it as "Project Name (Key)" as it would display in the JIRA Connector API. 

 

Should the input file just have the Project name with no key? Or is the Project ID a different value then what the Project name is?

 

Thanks again!

SDB40
7 - Meteor

The Project ID is different than the name, it should be a numeric value.

 

Here is how you retrieve it:

 

https://confluence.atlassian.com/jirakb/how-to-get-project-id-from-the-jira-user-interface-827341414...

 

lmccully10
6 - Meteoroid

Awesome thanks so much, I have it working now!

 

 

Gensig
5 - Atom

Dear SDB40,

I am trying to use your lovely tool, but I am always getting the following error in the process:

 

Error: Jira Iterative Macro Connector (6): Iteration #1: Tool #62: Parse Error at char(10): Type mismatch in operator +. (Expression #1)

 

I am able to see some records, but the process always stops with this error - tried different projects, the error is the same. Any help would appreciated.

 

Thank you,

Gena 

NeilR
Alteryx Alumni (Retired)

@SDB40 gallery.alteryx.com has been shut down so the general public will no longer be able to access your connector from the link you provided at the start of this thread. In case you'd like to migrate to the new Gallery space (community.alteryx.com/gallery) so that people can continue to find your tool, I've attached the macro to this post.