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?
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"
}
@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?"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Apologies for my delayed response. Yes, you can accomplish this using Automation, and I explained it by using a Send web request.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.