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

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

JIRA-PYTHON: Pass argument to python script to get Jira static Query/Create a Stout

Good day,


 So what I'm trying to accomplish is the ability to pass a dynamic query such as:

python project = "TTS" AND assignee="Bob"

To my python script I created and search the above query to get static query. It works if I input it manually in the code, but I want to be able to type it in the command line so I don't have to edit the script every time.

Current Script:

for issue in jira.search_issues("TTS" AND assignee="Bob", maxResults=3):

print('{}: {}'.format(issue.key, issue.fields.summary,))


This works fine, as is but would be useful if I could input argument where the query is. I'm also looking for a way to direct the output into a file when ran. So the results of the static query would go into a file and if possible be labeled after date it was created. I'd appreciate any help and see if anyone can come up with ideas.


Thank you.

1 answer

0 votes


Welcome to the community

Create a .txt file (with your JQL inside) that your python script will read. You will only need to update the .txt file and no your script.

Suggest an answer

Log in or Sign up to answer

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you