How to provide Hyperlink for issue key or any Id in Script listeners for Jobs

uday May 7, 2021

How to provide Hyperlink for issue key or any Id in Script listeners for Jobs

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.
May 7, 2021

I am sorry, I do not understand the question.  

The hyperlink for an issue is <base url>/browse/<issue key>, but I don't understand what you mean when you say you want it "in script listeners for jobs"

Could you tell us what you are trying to achieve?  In general terms, not the technical "put this code here" part.

uday May 7, 2021

Hi,

what i am asking is I have written a script Listener for automatic due notification and i have done it but the problem is i missed something in that and the notification i am like this

1. Issue key: DCAB

But i need the mail like this

1. Issue key: DCAB

while clicking on the issue key it will navigate me to the issue.

regards

Uday

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.
May 7, 2021

Ok, so a listener listens for events and does something based on the content of the event.  One of the things the event contains is a reference to the issue, so your code can use the object event.issue directly.

The part of your code that is building the email looks like it has got the Id already (the DCAB), but it'll need to build the html if you want it to link like that.  You'll want it to build something like

1. issue key: <a href="(your base url)/browse/(issue key)">(issue key)</a>

uday May 7, 2021

Hi Nic,

Thanks for the response. Could you please elaborate more datils about the "BASE URL"

Regards

Uday

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.
May 7, 2021

The base url is the url set in the system as the single root of the application.   If, for example you are seeing issues on urls like https://yourserver/jira/browse/DCAB-42 then your base url is https://yourserver/jira 

Suggest an answer

Log in or Sign up to answer