Is there a way to call issue.description but only show the fist 5 lines of the description?
I am sending a custom email and do not want to display the whole description in it as it might be really long.
You want something like this but it's a bit inelegant, also you'd want to show an ellipsis if you are truncating it.
Given a string s:
s.readLines()[0 .. (s.readLines().size() < 5 ? s.readLines().size() - 1 : 4)].join("\n")
There is probably something better in a textutils class.
Mehmet's answer is for velocity templates, whereas you have a GStringTemplate.
Right. If you look at the link I sent in details- especially the section that has the code:
## setup some additional parameters
Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...
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!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
We're bringing product updates and pro tips on teamwork to ten cities around the world.Save your spot