Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Inserting a plaintext variable into an email

Greg Johnson April 16, 2018

We'd like, in Jira SD, to be able to use the Jira issue key (ABC-123) as an RMA number when we are asking customers to return some products to us.  This will keep everything in one system.

However, the ${issue.key} macro appears not only to insert "ABC-123" but also an href to the portal.  As we don't use the portal at all (our customers want to use emails only) AND we want a non-href version, is there any alternative that we can use?

Cheers,

greg

1 answer

1 vote
Tzu Hau Chai
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 16, 2018

the ${issue.key} variable should only insert the issue key without the hyperlink. I believe what you are seeing in the portal is just how the issue key is being rendered (with a hyperlink) in the portal only. In the email itself you should only see an issue key without hyperlink.

You should be able to preview how the email actually looks like in the edit template page.

if for whatever reason you want the hyperlink to be disabled in portal as well, you can disable the linking module for the wiki renderer.

INSERT INTO pluginstate VALUES ('com.atlassian.jira.plugin.wiki.renderercomponentfactories:jiraissuelinkrenderer',false);

you will need to shutdown jira and insert the entry above into the database to disable it. I am not sure if doing this will break any other functionality unexpectedly, so proceed with caution and test on your staging env first. 

Greg Johnson April 18, 2018

Unfortunately, the emails we receive contain a URL.  Is this a bug, as it does not match your description of the behaviour.

Tzu Hau Chai
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 18, 2018

The ${issue.key} variable will not insert the hyperlink in the email. Are you sure the issue key is not in the comment?

email.pngtemplate.png

Greg Johnson April 18, 2018

Hmmm.  I hadn't appreciated the difference between a comment and an email.  I thought that all comments entered inside Jira that were saved as "share with customer" became emails?

How can you send an email to the customer _without_ commenting on an issue?

Maybe I'm missing something fundamental about Jira SD.  Feel free to tell me to RTFM...

Greg Johnson April 18, 2018

Upon a second read of your comment, I guess we are, in any case, using the "comment variable" and it is, as you confirmed, inserting a linked reference.

 

Is it possible to suppress that behaviour?  

Tzu Hau Chai
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 18, 2018

It can be supressed if you implement the workaround mentioned previously by inserting this database entry to disable the module and restart JIRA:

INSERT INTO pluginstate VALUES ('com.atlassian.jira.plugin.wiki.renderercomponentfactories:jiraissuelinkrenderer',false);

however I am not sure if this will break any other functionality/component that relies on the module. Try testing it out on your test environment first before implementing it on production.

image.png

Greg Johnson April 20, 2018

Thanks, Tzu - we will give it a shot.

Are there other parameters that can be tweaked like this that are documented somewhere?  Other behaviour such as how the KB articles are referenced would be nice to be able to adjust.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events