Hi All,
The below highlighted conditions are not working as expected.
for Issue in jira.search_issues('project=YKP and assignee='+ Assignee +
' and status not in ("Done", "Released", "Discarded") ORDER BY issuekey, issuetype'):
if (Issue.fields.issuetype == 'Epic'):
print(Issue.fields.issuetype)
print("---" + '{} | {} | {} | {}'.format(Issue.key,Issue.fields.issuetype, Issue.fields.summary, Issue.fields.status))
if (Issue.fields.issuetype=='Story'):
print(Issue.fields.issuetype)
print("---" + '{} | {} | {} | {}'.format(Issue.key, Issue.fields.issuetype, Issue.fields.summary, Issue.fields.status))
I have tried all the combinations like below,
if (Issue.fields.issuetype == 'Epic'):
if (Issue.fields.issuetype == "Epic"):
if (Issue.fields.issuetype in ['Epic']):
Could you please help me to sort out the issue?
Thanks in Advance,
Maadi.
Hello Sunesh,
The datatype of issuetype is 'class 'jira.resources.IssueType' and you value 'Epic' is string so you have to convert you issuetype class into a string.
if str(i.fields.issuetype)=='Story':
'your code'
Feel free to place print instructions like this 'print (type<your variable or anything else') to know the datatype and if you need to convert something.
Sorry for my english is not my native language
Hope it help
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
you're welcome, i'm glad i helped you.
Feel free to tag your question as solved may be it will help other people.
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.
Join the largest European gathering of the Atlassian Community and reimagine what’s possible when great teams and transformative technology come together. Plus, grab your Super Fan ticket now and save over €1,000 on your pass before prices rise on 3 June.
Register nowOnline forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.