Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,364,888
Community Members
 
Community Events
168
Community Groups

Can we utilize python for scripting or automation in Jira?

Hi Everyone,

In our Jira admin team we want to on-board a Python developer for some other project but we want to him work in Jira team as well for scripting and automation part.

My question is "can we use python as an scripting language for automation or data flow in jira"?? if yes we can utilize the same resource for both purpose.

Please let us know if anyone is already using python for scripting in jira or know how to do it.

Please also let us know what should be the setup for using python as scripting language in Jira like any additional add-on for jira is required or can be done with jira only.

Thanks a lot in advance.

Regards,
Shib

5 answers

1 accepted

4 votes
Answer accepted
Mykenna Cepek Community Leader Sep 30, 2021

You can use the Jira REST API from most any language, including python.

The built-in Jira Automation, however, doesn't support embedded scripting.

1 vote
Darryl Lee Community Leader Oct 01, 2021

There's a few Python REST API wrapper packages, but I can't vouch for how well they work.

This one is only for Jira, and looks well-maintained:

https://github.com/pycontribs/jira/

This one covers multiple Atlassian products, but I'm not sure if it's as well-maintained:

https://github.com/atlassian-api/atlassian-python-api

If you're more of a DIY person, here's some examples that include all the hairy details about auth, etc:

https://www.opentechguides.com/how-to/article/python/185/jira-python-rest.html

Hi Shib,

I don't know if this is the only answer, but you could use Python if you ran it as a web service, and use the Jira Automation component Send web request in your flow.  The response is available as part of the {{webResponse}} specifically {{webResponse.body}}.  

Specifics are here:  https://community.atlassian.com/t5/Jira-articles/Automation-for-Jira-Send-web-request-using-Jira-REST-API/ba-p/1443828 

Erin

Mykenna Cepek Community Leader Sep 30, 2021

Good point, @Erin Quick-Laughlin. Jira Automation can send web requests outbound. So this approach can be used for "data flow" from Jira to a custom web service.

But this functionality doesn't support the "use [of] python as [a] scripting language for automation" as noted in the original post. Maybe it helps with part of what @Shib Saha is trying to do, though!

Like Bill Sheboy likes this

Hi @Shib Saha 

Can you explain what your use is a little more? Are you trying to invoke Jira APIs from inside a python script? If so, the answers above are good pointers to get started.

If you are trying to have a shell or python script invoked as an automation script I don't think this exists at the moment. I am building a Jira app that will allow this to happen. If you are interested, please let me know. I'd be happy to help!

Happy automating!

0 votes

Hi @Shib Saha 

For several year now, we use Python scripts + Jira REST API to automatically create tasks when onboarding new people. Then, Jira Automation updates tickets with additional details. Great combination.

Excel/VBA would have been more relevant to simply push a table into Jira, but I guess we are using Python for the same reason as you :-)

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events