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
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
Posted Wednesday in Jira

Join our webinar: How 1B+ feature flag events helped us build the new Jira

Every time you release software, there's a bit of risk – that there's a bug, that something breaks, or that the feature doesn't resonate with customers. Feature flagging helps make high stakes s...

103 views 0 2
Join discussion

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