#Provide your login credentials
jira = JIRA(options, basic_auth=(login, pwd))
issue = jira.issue('ABC-1234')
print (issue.id) #1162223 is returned (which is correct)
Approach 1:
print (jira.issue_link(issue.id)) # I get error id does not exists
Approach 2:
print (issue.fields.issuelinks) # here I get [] as the output. How do I proceed further if I have to take this path
Purpose: I am generating report for a JIRA project from python. Instead of getting key as text for JIRA issues, I want link such that when I click on the JIRA issue it takes me to the JIRA ticket in the project.
Please help!
You already have the key (ABC-1234), and that's what you need for the issue URL. The form is
https://<JIRA_DOMAIN>/browse/issue_key
e.g.
https://jira.mycompany.com/browse/ABC-1234
FWIW, even though you already know the key, it is available via issue.key
I agree but I am looking for a representation like this: ABC-1234. So when I click on ABC-1234, I get to the issue.
I hardcoded the key to troubleshoot the error but yes, I am using issue.key to get the data point.
Hope to see your response soon. Thanks for looking into my issue.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Right, so you can do something like this:
url = "<a href=\"https://jira.mycompany.com/browse/" + issue.key + "\">" + issue.key + "</a>"
print (url)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Code as suggested:
url = "<a href=\"https://jira.mycompany.com/jira/browse/" + i.key + "\">" + i.key + "</a>"
sheet.write(rowCount,0,url)
Output in excel
<a href="https://jira.mycompany.com/jira/browse/ABC-1234">ABC-1234</a>
and not
ABC-1234
What am I missing? I am writing into excel where it should appear as hyperlink.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In that case, use the hyperlink function in Excel. Try outputting your data like this:
url = "=hyperlink(\"https://jira.mycompany.com/browse/" + i.key + "\",\"" + i.key + "\")"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Tushar Mishra ,
I am trying the same thing in python , I found the solution -
url = "https://jira.mycompany.com/jira/browse/"
issue_link = f'=HYPERLINK("{url}","issue.key")'
df = pd.DataFrame(issue_link)
df.to_excel('QA_OpenIssues.xlsx', index=False)
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.