Error Resolution

Hi

While running below script in jelly runner, we are getting error like

Could not read script string.  
Extra Information: [hide] 

Exception: java.io.IOException: <...when> does not match 
java.io.PrintWriter@1d2ea78
Script:

<JiraJelly xmlns:jira="jelly:com.atlassian.jira.jelly.enterprise.JiraTagLib" xmlns:core="jelly:core" xmlns:log="jelly:log" xmlns:util="jelly:util">
<jira:Login username="<USERNAME REDACTED>" password="<PASSWORD REDACTED>">
<log:info>Running System Close</log:info>
<core:set var="comment">Hi,
We have noticed that this issue has not been updated for a period of 15 days. We assume that this issue is resolved. However if it is not the case, feel free to add a comment and reopen the issue.
Thanks
Support Team</core:set>

<core:set var="workflowUser" value="autominister" />
<core:set var="filter" value="16308" />
<jira:RunSearchRequest filterid="${filter}" var="issues" />
<core:forEach var="issue" items="${issues}">
${issue.key},${issue.type},${issue.status}
<core:choose>
<core:when test="${issue.type == 7}" > <!--support request-->
<core:if test="${issue.status==5}"> <!--Resolved-->
<core:set var="workflowStep" value="411" />
</core:if>
<core:if test="${issue.status==10023}"> <!--Duplicate-->
<core:set var="workflowStep" value="421" />
</core:if>
<core:if test="${issue.status==10003}"> <!--Invalid-->
<core:set var="workflowStep" value="431" />
</core:if>
</core:when>

<core:when test="${issue.type == 6}" > <!--Clarification-->
<core:if test="${issue.status==10014}"> <!--Clarified-->
<core:set var="workflowStep" value="101" />
</core:if>
</core:when>

<core:when test="${issue.type == 2}" > <!--New Enhancement-->
<core:if test="${issue.status==10003}"> <!--Invalid-->
<core:set var="workflowStep" value="1211" />
</core:if>
<core:if test="${issue.status==10019}"> <!--Delivered -->
<core:set var="workflowStep" value="1201" />
</core:if>
<core:if test="${issue.status==10023}"> <!--Duplicate-->
<core:set var="workflowStep" value="1191" />
</core:if>
</core:when>
<core:when test="${issue.type == 4}" > <!--Feature Enhancement-->
<core:if test="${issue.status==10003}"> <!--Invalid-->
<core:set var="workflowStep" value="1211" />
</core:if>
<core:if test="${issue.status==10019}"> <!--Delivered -->
<core:set var="workflowStep" value="1201" />
</core:if>
<core:if test="${issue.status==10023}"> <!--Duplicate-->
<core:set var="workflowStep" value="1191" />
</core:if>
</core:when>

<core:when test="${issue.type == 1}" > <!--Defect-->
<core:if test="${issue.status==10003}"> <!--Invalid-->
<core:set var="workflowStep" value="1221" />
</core:if>
<core:if test="${issue.status==10019}"> <!--Delivered -->
<core:set var="workflowStep" value="1231" />
</core:if>
<core:if test="${issue.status==10023}"> <!--Duplicate-->
<core:set var="workflowStep" value="1211" />
</core:if>
</core:when>

<core:when test="${issue.type==9}"> <!--Documentation Sub-task--!>
<core:if test="${issue.status=10017}"> <--Documentation Reviewed-->
<core:set var="workflowstep" value="51" />
</core:if>
</core:when>


<core:when test="${issue.type==9}"> <!--Documentation Sub-task--!>
<core:if test="${issue.status=10017}"> <--Documentation Reviewed-->
<core:set var="workflowstep" value="51" />
</core:if>
</core:when>

<core:otherwise>

</core:otherwise>
</core:choose>

<jira:TransitionWorkflow key="${issue.key}" user="${workflowUser}" workflowAction="${workflowStep}" comment="${comment}"/>
</core:forEach>
</jira:Login>
</JiraJelly>

 

 

 

Please help us to fix the error

3 answers

This widget could not be displayed.

I removed your username/password. Not a solution to your problem, but might save you from other problems.

This widget could not be displayed.

That error means your script is malformed - sometimes it's a dodgy character, but in this case, it's pointing you to a broken <when> clause.

This widget could not be displayed.

Dear Jonas,

Thanks for valuable concern.

Dear Nic,

Ya,Its pointing to <when> clause..Please suggest us some solution to fix this error

I'd open it in an xml editor that can help you work that out.  It'll be faster than me doing it.

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted yesterday in Jira

Atlassian Research Workshop opportunity on Sep. 28th in Austin, TX

We're looking for participants for a workshop at Atlassian! We need Jira admins who have interesting custom workflows, issue views, or boards. Think you have a story to sha...

41 views 2 2
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you