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

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

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
Community showcase
Published Nov 27, 2018 in Portfolio for Jira

Introducing a new planning experience in Portfolio for Jira (Server/DC)

In the past, Portfolio for Jira required a high degree of detail–foresight that was unrealistic for many businesses to   have–in   order to produce a reliable long-term roadmap. We're tur...

2,874 views 19 22
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