Forums

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

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?

3 answers

1 accepted

0 votes
Answer accepted
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

Alexandr December 3, 2024

@Tuncay Senturk _Snapbytes_ @Bill Sheboy 
Thank you for your help, you helped me achieve my task!

Like Bill Sheboy likes this
1 vote
Tuncay Senturk _Snapbytes_
Community Champion
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 _Snapbytes_ 
"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 _Snapbytes_
Community Champion
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
Alexandr December 8, 2024

@Bill Sheboy @Tuncay Senturk _Snapbytes_ 
Guys, hi, can you tell me if I will be able to create Cross-project releases in Plans Roadmap using the Rest API? If yes, please let me know which Rest request I need to?

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 8, 2024

@Alexandr -- I do not know that and I am not using Data Center to experiment with it.  Perhaps try a web search to look for such a REST API for the feature, or check in the Developer Community: https://community.developer.atlassian.com/

Suggest an answer

Log in or Sign up to answer