Updated by
Modified
Copy Project VersionsScriptConsoleJiraCloud.groovy- Ignore whitespace
- logger.info("Copying the version with the name of ${it.name.toString().replaceAll("\\[", "").replaceAll("\\]", "")}")
+ logger.info("Copying the version with the name of: ${it.name.toString().replaceAll("\\[", "").replaceAll("\\]", "")}")
+ logger.info("Copying the version with the name of ${it.name.toString().replaceAll("\\[", "").replaceAll("\\]", "")}")
* "All right, title and interest in this code snippet shall remain the exclusive intellectual property of Adaptavist Group Ltd and its affiliates. Customers with a valid ScriptRunner
* license shall be granted a non-exclusive, non-transferable, freely revocable right to use this code snippet only within their own instance of Atlassian products. This licensing notice cannot be removed or
* amended and must be included in any circumstances where the code snippet is shared by You or a third party."
+* This example script console script shows how you can get the versions from one project and copy them to another project on the Script Console.
+* "All right, title and interest in this code snippet shall remain the exclusive intellectual property of Adaptavist Group Ltd and its affiliates. Customers with a valid ScriptRunner
+* license shall be granted a non-exclusive, non-transferable, freely revocable right to use this code snippet only within their own instance of Atlassian products. This licensing notice cannot be removed or
+* amended and must be included in any circumstances where the code snippet is shared by You or a third party."
+ // Get the start date and if it is null set it to todays date as a start date is required when creating a version in a new project
+ // Get the release date and if it is null set it to todays date as a release date is required when creating a version in a new project
+ "description": it.description.toString().replaceAll("\\[", "").replaceAll("\\]", "") ?: "", // Get the desceription and pass an emtpy string if it is null
+ "name": it.name.toString().replaceAll("\\[", "").replaceAll("\\]", "") ?: "", // Get the name and pass an emtpy string if it is null
You can clone a snippet to your computer for local editing. Learn more.