JIRA PDF View Plugin not pulling the subtask information

Hi,

I am evaluating the JIRA PDF View Plugin and I am trying to pull all the information (customfield values, links, change history, attachment) from the subtasks in parent issue's PDF view. I am using JIRA 4.0.1 for evaluating this plugin.

Is there any way to pull the subtask information in the PDF?

2 answers

1 accepted

Hi Naren!

Any issue can return its subtasks using the following getter:

Collection<Issue>  getSubTaskObjects()

Using that, the iteration in Velocity looks something like this:

# assume that you have the parent issue available in $issue
#foreach($subTask in $issue.subTaskObjects)
    <fo:block>$subTask.summary</fo:block>
#end


Thanks Ferenc. I am looking into it. But I am experiencing some errors while embedding attachments for issues by setting #set($embedAttachments = false).

Also I wanted to fetch the table grid data from cusomfield of type Table Grid Editor in the PDF format.

I am not able to embed the attachments or see the table grid view data in the PDF format due to following error. Can you please shed some information on this error.

java.lang.IllegalStateException: An error occurred whilst rendering this message. Please contact the administrators, and

inform them of this bug.

Details:

-------

org.apache.velocity.exception.ParseErrorException: Encountered "'environment', " at getEncodedBodyFromContent[line

250, column 180]

Was expecting one of:

"[" ...

"{" ...

<STRING_LITERAL> ...

"true" ...

"false" ...

<INTEGER_LITERAL> ...

<FLOATING_POINT_LITERAL> ...

<IDENTIFIER> ...

"{" ...

at org.apache.velocity.runtime.RuntimeInstance.evaluate(RuntimeInstance.java:1203)

at org.apache.velocity.runtime.RuntimeInstance.evaluate(RuntimeInstance.java:1165)

at org.apache.velocity.app.VelocityEngine.evaluate(VelocityEngine.java:219)

at com.atlassian.velocity.JiraVelocityManager.getEncodedBodyForContent(JiraVelocityManager.java:81)

at com.midori.jira.plugin.pdfview.renderer.IssuePdfRendererImpl.renderVmToFo(IssuePdfRendererImpl.java:215)

at com.midori.jira.plugin.pdfview.renderer.IssuePdfRendererImpl.render(IssuePdfRendererImpl.java:130)

at com.midori.jira.plugin.pdfview.view.PdfIssueView.getContent(PdfIssueView.java:66)

at com.atlassian.jira.plugin.issueview.DefaultIssueViewURLHandler.handleRequest(DefaultIssueViewURLHandler.java:181)

at com.atlassian.jira.web.servlet.IssueViewServlet.doGet(IssueViewServlet.java:23)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)

Naren,

Please open a ticket in our support tracker available at https://midori.zendesk.com/and attach your template. (If you are using the default template, then you don't have to attach that, just tell us if that's the case.)

Hi, you also try to use free add-on: https://bitbucket.org/amarkelov/andreymarkelov-atlas-plugins-templator/wiki/Home

and use

#foreach($subTask in $issue.getSubTaskObjects())
<anyblock>$subTask.summary</anyblock>
#end

I'll have a look at it, Andrey!

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Thursday in Jira

5 ways you can make the most of Jira Software and Bitbucket Cloud

As part of the Bitbucket product team I'm always interested in better understanding what kind of impact the use of our tools have on the way you work. In a recent study we conducted of software devel...

82 views 0 5
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