Hello,
We created an automation using Jira Automation that has the following settings:
1. When: Issue created.
2. If Reporter = x
3. Then: Send email
to: Reporter
subject - a new issue was created and is awaiting your response
Content:
Hello,
The issue: <a href="https://jira-address/browse/{{issue.key}}">{{issue.key}}</a> was created and it is waiting your action.
Please approve or reject this request:
<br>
<a href="https://jira-address/secure/WorkflowUIDispatcher.jspa?id=392248&action=731">Approve"
<br>
<a href="https://jira-address/secure/WorkflowUIDispatcher.jspa?id=392248&action=732">Reject"
This does not work and we get "Encountered a "403 - Forbidden"
error while loading this page. Go to Jira home" , probably because the actual link behind the issue transition includes a token:
But this token changes at each log in. Is there a better solution using jira automation? Either to dinamically get the token, or some other method.
Thank you!
Hi Mihai!
There is a somewhat "hacky" solution to this that could work for you.
In your Send email action you just need to specify the link with a smart value fetching the correct issue ID.
Step 1
Create a test issue and make sure it is in the status where the Approve/Reject transitions are available. In my test issue it needs to be in Pending Approval. From there my options are Approve and Reject.
Step 2
Right click on the relevant transition button and choose Copy link, I'll choose Approve as an example. My link is: https://MY-JIRA-DOMAIN/secure/WorkflowUIDispatcher.jspa?id=1015540&action=31&atl_token=BWU5-ZFEP-ZCCQ-MQQZ_61d35342348b104b2416708039e71a51547b8d59_lin
Step 3
Paste this link where you want it in your email body from the Send email action and replace the first parameter (id) with a smart link for the issue ID:
https://MY-JIRA-DOMAIN/secure/WorkflowUIDispatcher.jspa?id={{issue.id}}&action=31&atl_token=BWU5-ZFEP-ZCCQ-MQQZ_61d35342348b104b2416708039e71a51547b8d59_lin
If the user clicking the link isn't logged in s/he will need to do so, and then be met with an alert saying that the XSRF security token is missing.
It's just a matter of clicking Retry Operation and it works, but it is the clunky part of this hack :)
Hope it helps!
Hello Robin,
Thank you for your reply!
This works, but only until I log out and log back in again. The token: "&atl_token=BWU5-ZFEP-ZCCQ-MQQZ_61d35342348b104b2416708039e71a51547b8d59_lin" changes at each log in, so, probably, it is per user & per log in.
I'm not sure if there are other options besides this.
Thank you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi there,
Thanks so much for your feedback!
I’ve linked your suggestion to a related feature request, which counts as an upvote for this ticket:
https://codebarrel.atlassian.net/browse/AUT-275
Cheers,
Charlie
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.