Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Python Jira Connectivity
#1
Hi Team,

Using Python I have established a connection with Jira and am able to extract data for specific projects,

Please confirm is there any way to extract all the columns from Jira. At present, in my code, I have explicitly called only two columns. Also, please confirm how to get the headers from Jira.
Reply
#2
from jira import JIRA

# Establish connection to Jira
options = {
'server': 'https://your-jira-instance.atlassian.net'
}
jira = JIRA(options, basic_auth=('username', 'password'))

# Fetch issues for a specific project
issues = jira.search_issues('project=YOUR_PROJECT_KEY', maxResults=100) # Adjust maxResults as needed

# Print issue keys and their fields
for issue in issues:
print(issue.key)
for field_name in issue.raw['fields']:
field_value = issue.raw['fields'][field_name]
print(f"{field_name}: {field_value}")
Larz60+ write Apr-17-2024, 02:48 PM:
Please post all code, output and errors (it it's entirety) between their respective tags. Refer to BBCode help topic on how to post. Use the "Preview Post" button to make sure the code is presented as you expect before hitting the "Post Reply/Thread" button.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Mysql-Python Connectivity Error aryamanurs 2 3,517 Apr-29-2020, 02:21 PM
Last Post: aryamanurs
  Error in Database connectivity with python3.7 srm 8 4,572 May-13-2019, 07:28 AM
Last Post: srm
  Python-Hive connectivity issue rekhagaonkar 0 4,465 Mar-05-2019, 07:01 AM
Last Post: rekhagaonkar
  jira-2.0.0.dist causing error with py2exe johnlawlor 1 2,562 Aug-09-2018, 08:27 PM
Last Post: Larz60+
  Why is basic Twitter Connectivity So Difficult? Not sure what I'm doing wrong. Oliver 0 1,920 Mar-10-2018, 12:38 PM
Last Post: Oliver
  Checking connectivity for sockets in Python pikkip 1 3,087 Apr-27-2017, 05:02 PM
Last Post: Ofnuts

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020