Jelly Script for workflow transition question

Rumceisz November 28, 2011

Hello Guys!

Let me ask for your help in a workflow transition script:

I wrote a script which close the issues which are in resolved status and been updated more than 30 days ago. I would like to set as a 'workflowuser' the person who is the Assignee at the moment of the closing - and this is what I cannot solve.

Here is my script:

<JiraJelly xmlns:jira="jelly:com.atlassian.jira.jelly.enterprise.JiraTagLib" xmlns:core="jelly:core" xmlns:log="jelly:log" >
<jira:Login username="atlassiansupport" password="[your password]">
        <log:info>Running closing issues service</log:info>
        <!-- Properties for the script -->
        <core:set var="comment">This issue has not been updated for 30 days so it will be automatically closed.</core:set>
        <core:set var="workflowStep" value="Close Issue" />
        <core:set var="workflowUser" value="???????" />
        <core:set var="filter30Days" value="10280" />
 
        <!-- Run the SearchRequestFilter -->
        <jira:RunSearchRequest filterid="${filter30Days}" var="issues" />
 
        <core:forEach var="issue" items="${issues}">
                <log:info>Close Issue ${issue.key}</log:info>
                <jira:TransitionWorkflow key="${issue.key}" user="${workflowUser}" workflowAction="${workflowStep}" comment="${comment}"/>
        </core:forEach>
</jira:Login>
</

Many Thanks!

R

1 answer

1 accepted

0 votes
Answer accepted
JamieA
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.
November 28, 2011

Try

user="${issue.assigneeId}"

Suggest an answer

Log in or Sign up to answer