Error Resolution

Bindhu VG August 24, 2016

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

0 votes
Bindhu VG August 24, 2016

Dear Jonas,

Thanks for valuable concern.

Dear Nic,

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

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 24, 2016

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

0 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 24, 2016

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.

0 votes
Jonas Andersson
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.
August 24, 2016

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

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events