I'm trying to build a web item provider that adds a mailto link that includes a link to the current issue. However I can't seem to access the issue with just "issue" or "event.getIssue()".
Is there a way to get the current issue as an object in the web item provider? Thanks!
Hi @jon_d ,
welcome to the Atlassian community!
In order to retrieve the URL of your ticket based on an event you should use the following portion of code:
String baseUrl = ComponentAccessor.getApplicationProperties().getString(APKeys.JIRA_BASEURL);
String issueKey = event.getIssue().getKey();
String issueURL = baseUrl+"/browse/"+issueKey;
Hope this helps,
Fabio
please let me know what you are trying to do. A webitem is not related to an issue context.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I want a webitem on the action menu for an issue that contains a mailto link with a body parameter that includes a link to the current issue. But I can't get the webitem to know what the current issue is.
Hopefully that clears it up, thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.