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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.