How can I add 2 different URLs in mails sent by JIRA?

Tobias Zang June 17, 2015

Hello,

we re using JIRA 6.0.1 and I'd like to have in mails (e.g. on issue created)

a) one URL for internal use, e.g. http://jira1.mycompany.de:8080/browse/XXX-1374  and

b) one URL for external use by our clients, e.g. https://jira1.mycompany.de/browse/XXX-1374

How can I manage this?

Thanks in advanve,

Tobi

1 answer

0 votes
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.
June 17, 2015

The easy part of this answer is the technical "how to change an email template" - https://confluence.atlassian.com/display/JIRA/Customizing+Email+Content

But, it won't work:

  • The email generated is a single block of text that is sent to multiple recipients.  It is not generated for each recipient, and the template does not "know" who it is going to.  So you can't construct an "if external user, use url1, else use url2" logic in it.
  • You can't run JIRA on two urls.  It has a "base url".  Everything refers to that.  Even if you manage to use a comprehensive alias or rewrite trick in your web-server, your users will quickly land on the base url, and you have to use the base url for certain stuff to work correctly 
Tobias Zang June 17, 2015

Hi Nic,

thanks for the quick answer.

Without having read your link, 2 URLs in only 1 mail (template) would be fine for us.

Tobias

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.
June 17, 2015

Well, you can put two urls in, but one is functionally useless.

GabrielleJ
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 18, 2015

We have setup our Stash so it can be accessible via http://stash.com:7990 and https://stash.com. I bet it's possible with JIRA too (https://confluence.atlassian.com/display/JIRA/Integrating+JIRA+with+Apache+using+SSL)

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.
June 18, 2015

It half works, but not well - the integrations with systems (including some of JIRAs internal stuff) use the base url and rely on being on one single place, so if you access it from the "wrong" url, they fail.

Tobias Zang June 18, 2015

Thanks Nic. For us the 2 URLs are really important, cause we have 2 different user groups to access the issue from inside the company or via plain web browser (and a .p12 certificate installed). So we used to have the 2 links in auto-mails, but lost it with an major upgrade. Since a don't have direct access to our (inhouse support hosted) jira instance i hace one more question: I can figure out that I simply could use - a param like $issue or %issuekey% (which resolves to e.g. "XXX-1374") in the vm-templates to add it just behind a - "hardcoded" url, e.g. "https://jira1.mycompany.de/browse/"; Am I right with that?

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.
June 18, 2015

Yes, you'll have to hardcode the url that won't work properly. JIRA doesn't know anything about it and hence can't use it (same as your users really)

Suggest an answer

Log in or Sign up to answer