How to use JIRA issues and Groovy script to generate a PDF requirement specification.

Mika Nuotio November 4, 2014

Ferenc Kiss wrote:

https://answers.atlassian.com/questions/27025

Just set up a "requirement" issue type as suggested by others, and use the JIRA PDF View Plugin to transform those issues to Requirement Specification documents. As for numbering, you can develop a simple Groovy script for the PDF plugin to auto-generate the numbers for you, depending on issue links or issue labels.

This is exactly the solution I am looking for. Very elegant.

Can you share more information on how to structure the issue dependencies to generate such a great PDF requirements document?

Also, are you open to share the Groovy script you used to generate the PDF?

Kind Regards, 

Mika



1 answer

0 votes
Midori
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 5, 2014

Can you share more information on how to structure the issue dependencies to generate such a great PDF requirements document?

Be a little more specific in your questions, please.

What that document does (captured in the PDF template) is simply iterating the issue list, exporting certain properties (summary, description, links) and adding a tree-like hierarchy based on the requirement number field. This field is expected to have a "dot-separated numbers" format, like "1", "2.3" and "6.7.5.1".

This field is not necessarily managed by the PDF View Plugin. It can be implemented as a "single line text" custom field, or a scripted field with the Script Runner plugin. Or, you could fully automate it and generate them only during the PDF document rendering if you have a consistent rule for generating those numbers.

What are your exact requirements here?

Also, are you open to share the Groovy script you used to generate the PDF?

That sample document was generated without Groovy. It is using the unmodified version of the "requirements-specification-fo.vm" file which is a default part of the PDF View Plugin. It is a Velocity template.

As all the logic used in the sample could be easily expressed in Velocity, we didn't want to complicate it with Groovy. If your requirements are more complicated, only then you may need to write some Groovy.

What are your exact requirements?

Suggest an answer

Log in or Sign up to answer