Add Start date to the new Version

Alexandr December 2, 2024

version.png

 

Hey, I need some help, please. I'm trying to create a version in one project that matches an existing version in another project. I need to pass all the values from the trigger, but in the 'Create Version' action, there are only fields for the version name and release date. How can I pass the start date and description to the new version?

2 answers

1 vote
Tuncay Senturk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 2, 2024

Hi @Alexandr 

In Jira Data Center, the built-in "Create Version" action only supports limited fields (version name and release date). To include additional fields like start date and description, you'll need to use a web request with the Jira REST API.

URL: https://your-jira-url/rest/api/2/version

method: POST

body: 

{
"name": "{{version.name}}",
"description": "{{version.description}}",
"startDate": "{{version.startDate}}",
"releaseDate": "{{version.releaseDate}}",
"project": "TARGET_PROJECT_KEY"
}
Alexandr December 3, 2024

@Tuncay Senturk 
"I didn't quite understand, can this be implemented through Jira Automation? I need to get JSON using the REST API; do I need to use the ACTION Send web request for that? How can I then update the Start Date and Description in the new Version?"

Tuncay Senturk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 3, 2024

Apologies for my delayed response. Yes, you can accomplish this using Automation, and I explained it by using a Send web request.

0 votes
Bill Sheboy
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.
December 3, 2024

Hi @Alexandr 

Rather than using the Create Version action, the rule could use the Send Web Request action to call the REST API endpoint for creating the version.

Here is a how-to article for calling a REST API endpoint from a rule: https://community.atlassian.com/t5/Jira-articles/Automation-for-Jira-Send-web-request-using-Jira-REST-API/ba-p/1443828

And here is the endpoint needed to create the version: https://docs.atlassian.com/software/jira/docs/api/REST/9.13.0/#api/2/version-createVersion

Kind regards,
Bill

Suggest an answer

Log in or Sign up to answer