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

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

0 vote

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.

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
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Fadoua M. Boualem
Published 8 hours ago in Trello

Using Trello to manage events

As a Jira power user, I was at first doubtful that Trello could benefit my workflow. Jira already uses boards (ones you can customize!), so why would I even need to use Trello?! In this post you will...

277 views 4 4
Read article

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