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

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

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 staticquery.py 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.

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS

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