want to create a new project-B using the shared configuration from project-A. Is it possible to get a releases from Project-A to Project-B using the automation?
Hi @pradeep jeevan ,
mainly the configuration only relies on how your project is set up and how things in the project behave (issues, workflows, etc).
The versions are entities within a project and refer to this specific project. So a version from project a cannot natively be chosen as fixedVersion in an issue of project B.
One way that comes to my mind would be to work with the Jira API. It‘s capable of getting all versions of a project as well as creating new versions in a project. Guess it could work this way.
Please let me know if this was helpful or if there are further questions.
BestStefan
Hi @pradeep jeevan - correct me if I'm wrong, but you're wanting to create a new Project B based on the configuration of Project A, and specifically you'd like to copy Versions.
So using Automation for Jira, you can access those versions as a Smart Value list:
{{project.versions}}
In addition, there is an Action to Create version that accepts Smart Values:
https://support.atlassian.com/cloud-automation/docs/jira-automation-actions/#Create-version
So the trick would be iterating through all the Versions from Project A and then creating each one in Project B.
So, assuming you'd want to run this script after creating a new project, you'd use a manual trigger to kick off the automation. And I believe it would be scoped to the current project.
And that would be a problem:
Does that seem right to you, @Bill Sheboy ?
In which case, @Stefan Salzl is right: You'd need to use the API to write an external script to read versions from Project A and create them in Project B.
Now if the set of Versions is relatively static, then you *could* simply hard-code the versions into an automation that you trigger after creating a new project.
Oh, and I forgot, there is a trigger for Project Created.
But yeah, same thing applies, I don't think you'd be able to get the list of Versions from Project A.
Oh, I figured out how to read the list of Versions from Project A (Branch rule / related issues - JQL), but unfortunately there's no way to nest an Advanced Branch within that.
But because 1) branches execute in parallel and/or 2) smart value variables are not global, I cannot then iterate over {{allversions}} to create the versions:
I tried to avoid the whole problem of not being able to have a list object by using split, but nope:
{{allversions.split("---")}}
Hi @Stefan Salzl
Much appreciated for the info.
Thanks
Pradeep
Hi @Darryl Lee
Thanks for the info.
I am new to automation rules. shall I get the list of the smart values available in automation?
correct me if I'm wrong, but you're wanting to create a new Project B based on the configuration of Project A, and specifically you'd like to copy Versions - Yes, I want to create a multiple projects, like 100+ based on the shared configuration from the project-A and want to copy all the versions available in project -A to project - B.
Regards
It looks like you're new here. Sign in or register to get started.