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

Error while retrieving custom fields in JIRA Edited

 i am not able to fetch the data for custom filed using the below approach , can you please help

This is the error i am getting 

 description_list.append(issue.fields.customfield_15742)
AttributeError: type object 'PropertyHolder' has no attribute 'customfield_15742'

 and this is my code 

key_list = []
summary_list = []
description_list = []

issues_in_project = jira.search_issues('project=OUTAGE AND created >= -7d')

for issue in issues_in_project:
key_list.append(issue.key)
summary_list.append(issue.fields.summary)
description_list.append(issue.fields.customfield_15742)



wb = Workbook()
ws = wb.active
key_row = 1
summary_row = 1
description_row = 1

start_column = 1

for key in key_list:
ws.cell(row=key_row, column=start_column).value = key
key_row += 1

for summary in summary_list:
ws.cell(row=summary_row, column=start_column + 1).value = summary
summary_row += 1

for customfield_15742  in description_list:
ws.cell(row=description_row, column=start_column + 2).value =customfield_15742
description_row += 1


wb.save("jira-report.xlsx")




 

https://community.atlassian.com/t5/Jira-questions/Fetch-Jira-details-in-excel-using-python/qaq-p/763401


import
jira.client
from jira.client import JIRA
from openpyxl import Workbook

jira_options={'server': 'http://example.com'}
jira=JIRA(options=jira_options,basic_auth=('admin','password'))


key_list = []
summary_list = []

#Add additional lists for fields here
#Example:
#description_list = []



issues_in_project = jira.search_issues('project=ALPHA AND assignee= admin')

for issue in issues_in_project:
key_list.append(issue.key)
summary_list.append(issue.fields.summary)

# Add additional fields returned here
# Example:
#. description_list.append(issue.fields.description)


wb = Workbook()
ws = wb.active
key_row = 1
summary_row = 1
#add additional "$FIELD_row = 1" entries here so the field results start at row 1
#Example:
#description_row = 1


start_column = 1



for key in key_list:
ws.cell(row=key_row, column=start_column).value = key
key_row += 1

for summary in summary_list:
ws.cell(row=summary_row, column=start_column+1).value = summary
summary_row += 1

# add additional fields here
#Example:
#for description in description_list:
# ws.cell(row=description_row, column=start_column+2).value = description
# description_row += 1

wb.save("jira-report.xlsx")

 

1 answer

1 accepted

0 votes
Answer accepted

Have fixed it

How did you solve the issue

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