I have created some documentation on Confluence for my colleagues to use. I would like to allow them create a Jira issue from my page as described in Creating Issues via direct HTML links. Here is a sample of my HTML code:
<a href="https://seg-jira.csg.apple.com/secure/CreateIssueDetails!init.jspa?pid=10000&issuetype=4&summary=''&reporter=Riad Kaced">[File a Jira Task]</a>
Reporter being a mandatory field, I would like to set it to the current logged-in user. It is hard-coded to myself in the example above, however I want to improve my code to use the current logged-in user instead. A similar topic was discussed @ How do I find out current logged in user? The answer was:
Pasting the above verbatim into my HTML code won't work, hence my question: How to find the current logged in user with a syntax I can incorporate in my HTML code?
If you are on Confluence and using the same user base as on JIRA, you can derive the current user in Confluence User Macro with
and complete whole HTML link.... like....
Check User Macros in Confluence for more.
this worked for us, I hope this help to you as well.
Not specifying the reporter should cause the field to default to the currently logged-in user, just as is the case when you click the Create button, but there is a bug that causes that not to happen - https://jira.atlassian.com/browse/JRASERVER-25308 A workaround mentions using a Behaviour, which you may consider doing if you have ScriptRunner installed.
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