Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to write the hyper link to get the issue key link in mail using script lis

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: AB

But i need the mail like this

1. Issue key: DPMZ

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

regards

Uday

1 answer

0 votes
Payne Community Leader May 07, 2021

I do so in a script listener like this:

//Append an issue number to this string to get a link to the request in Jira
String jiraBaseUrl = "https://myjira.com/browse/"

String body = "blah blah blah" + "<a href=\"" + jiraBaseUrl + issue.key + "\">" + issue.key + "</a>" + "blah blah blah"

sendEmail(helpDeskEmail,subject,body)

def sendEmail(String recipientEmailAddress,String subject,String body)
{
Email email
SingleMailQueueItem smqi
email = new Email(recipientEmailAddress)
email.setMimeType("text/html")
email.setSubject(subject)
email.setBody(body)
smqi = new SingleMailQueueItem(email)
ComponentAccessor.getMailQueue().addItem(smqi)
}

Hope that helps!

Hi payne

Thanks for the response, But there are so many issues and the mail should go all the due date who ever the assignee they will get the mail for that particular ticket so is it possible like that to create a hyper link?

Regards

Uday

Payne Community Leader May 11, 2021

I don't follow what you're saying, Uday. The example I provided will make a link out of any issue number that you include in an outgoing email.

Suggest an answer

Log in or Sign up to answer
TAGS

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you