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

Current user value exported in xml

Kevin Sermon May 14, 2014

We are exporting JIRA issues in an xml format, to be able to process it with XSLT afterwards.

However, we would need the user exporting the data to be included in the xml export.

We tried several options, but none seem to work:

<currentUser>$!{Username}</currentUser>
<currentUser1>$currentUser</currentUser1>
<currentUser2>$!{currentUser}</currentUser2>
<currentUser3>currentUser()</currentUser3>
<currentUser4><![CDATA[(User)ActionContext.getSession().get(DefaultAuthenticator.LOGGED_IN_KEY);]]></currentUser4>
<currentUser5>#xmlEscape($currentUser)</currentUser5>
<currentUser6>javascript:user()</currentUser6>
<currentUser7><![CDATA[javascript:user()]]></currentUser7>

How should we adapt the searchrequest-xml-header.vm file to include the current user exporting?

Thank you very much for your answer.

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

1 vote
Answer accepted
Andreas Ebert
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.
May 14, 2014

Try this:

&lt;currentUser&gt;$!{authcontext.getUser().getName()}&lt;/currentUser&gt;

This comment lists the available objects in the velocity context. It might be helpful as a reference.

Kevin Sermon May 14, 2014

Thank you, that works!

TAGS
AUG Leaders

Atlassian Community Events