For anyone here who has used Jira-Python, if I'm using vim to edit my code, how do I display all issue fields for my project?
Here is the link of the doc
https://jira.readthedocs.io/en/master/
and attached picture shows all the common fields of an issue but my companies fields might be different.
You can use
issue.raw['fields']
to get all the results obtained in the JSON object as raw string. Its not as pleasant to view, but will provide you with what you're looking for. Take a look at this stackoverflow solution and see if you find your answer, cheers.
I made a web application using plotly/dash on Python to make an interactive Jira work log dashboard. Users who are viewing the answer to this question might find something valuable there. You can visit this GitHub repository.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I know this is old but this might help someone else down the road. You can do this to just get the field names:
print(sorted(thisIssue.raw['fields'])
if you even better clarity (but more scrolling), you can put them each on a newline:
print("\n".join(sorted(thisIssue.raw['fields'])))
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I added this to an answer above but thought I would expand it here:
I'm using this JQL to get issues that fall within a date range for a project:
from jira import JIRA
from jira.client import ResultList
from jira.resources import Issue
import os
import datetime
import json
#set date ranges
dtOneYearPast = datetime.datetime.now() - datetime.timedelta(days=3*365)
dtThreeWeeksPast = datetime.datetime.now() - datetime.timedelta(days=21)
#convert to strings
strOneYearPast = formatDateString(dtOneYearPast)
strThreeWeeksPast = formatDateString(dtThreeWeeksPast)
strJQL = "project=KME AND status = 'Code Review' OR status = 'IN QA - DEV' OR status = 'IN QA - STG' AND createdDate > " + strOneYearPast + " AND createdDate < " + strThreeWeeksPast
and grabbing the first response and outputting the fields, sorted ascending, each field on its own line here:
for thisIssue in jira.search_issues(strJQL, maxResults=250, expand='changelog'):
print("\n".join(sorted(thisIssue.raw['fields'])))
break
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I would go this way:
project_keys = ['Zen']
issuetype_names = ['Task']
meta = jira_instance.createmeta(projectKeys=project_keys,
issuetypeNames=issuetype_names,
expand='projects.issuetypes.fields')
for x in meta:
...
Basically gives you all info, datatypes, options etc. attached to the individual fields in the corresponding project/issuetype. This also gives you the field name to the customfield_123456 fields, translations etc.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Were you able to do this? Trying the same thing and having a fairly hard time.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi!
Please, try to use the Pycharm, or vs code to edit.
regarding to view in one shot I do recommend a look into postman side
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.