How to get the url of an issue in post function?

erika_zanoni February 24, 2021

Hi,

Is possible to get the url of an issue in a jira post function?

I tried to create  a String and insert the hyperlink but it doesen't work:

notificationMessage += "<li><a href=\""+issue.url+"\">"+issue.key+"</a></li>"

 

after, at the end of the postfunction I get the value of the String and I send an email with the string in the body, my need is that in the mail will appear the link of the issue

 

Thanks

1 answer

1 accepted

1 vote
Answer accepted
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 24, 2021

The url for an issue is

<base url>/browse/<issue-key>

In your system, you've got a fixed known base url (https://something.atlassian.net) so you can hard code it and keep it simple.

In html, you just need to construct

<a href="https://something.atlassian.net/browse/<issue key>">

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events