Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

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

Fetch properties using Jira Python client

Hi Team,

I was able in the past to use a JQL by using REST API in order to fetch a specific property from JIRA 

request_url = jira_base_url+'/rest/api/3/search?jql=project%3D%27'+projectCode+'%27%20AND%20syncedFactSheetCount%3E0&properties=leanix'

This was providing me the specified properties in the response, but as I am exploring the jira-python library I am not able to retrieve the properties when I try the below. Is there a way to fetch this information?

  jira = JIRA(options, basic_auth=("email", "apiToken"))
for issue in jira.search_issues('reporter = currentUser() order by created desc', maxResults=30,json_result=True,fields='summary')['issues']:
print(issue)

 

1 answer

0 votes
Daniel Eads Atlassian Team May 03, 2021

Hi @Tarun Tarun ,

After parsing through the source of the jira-python client, it appears that the library doesn't have a wrapper for entity properties, such as the issue property in your REST API example. There does appear to be a request to add properties to the client here in its open source project

I would suggest trying to use the REST API directly in your python code to get the properties, as the client cannot currently do it. Or if you're handy with python enough to extend the client, check out the contributing guidelines and submit a pull request to the client to get it added officially.

Cheers,
Daniel

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Site Admin
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