Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How do I create a release version using the name of a sprint in Automation for Jira?

Geoff Robles
Contributor
September 26, 2019

Today, my process is to create a ticket at the beginning of the sprint to track our releases as well as a release version. Both the release ticket and release version use a similar naming convention. I'd like to automate all of this.

Sprint: OurTeam S34 MM/dd-MM/dd

Ticket: Sprint 34 Release

fixVersion: Team Sprint 34 Build:775

I use Automation for Jira and I'd like to auto-create both the release as well as the release ticket in the sprint. I've gotten the ticket creation to work however I can't figure out how to use the number portion of the sprint name. I can't find any documentation on the Codebarrel site for {{Sprint}} or how to manipulate the string to pull out the number.

I'm not an engineer, so I don't fully grasp how to use the Java examples. 

How do I use a portion of the sprint name to set the title of the new ticket?

1 answer

1 accepted

1 vote
Answer accepted
Deleted user September 26, 2019

Hey there Geoff,

It depends a bit on how you're triggering off your rule, if you're using the Sprint trigger (https://docs.automationforjira.com/reference/triggers.html#sprint-created-started-or-completed)

You can use the {{sprint.name}} as smart value in your "Create issue" action. To match a part of the sprint name like the sprint number, you'll need to use the "match" function and regular expressions (see https://docs.automationforjira.com/reference/text.html#match)

It smart value you can use for a Spring name that looks like "OurTeam S34 MM/dd-MM/dd" and you're extracting "34" might be something like:

{{sprint.name.match(".* S(\d*)")}}

So in the creation issue action, you can have:

Project_automation_-_Your_Company_Jira.jpg

Hope that helps! If it still doesn't work, you could post your results & audit log here or if the info is private, raise a support request at https://codebarrel.atlassian.net/servicedesk/customer/portal/1

Cheers,

Mark C

Geoff Robles
Contributor
September 27, 2019

This worked perfectly. Thanks for the quick response!

Suggest an answer

Log in or Sign up to answer