I found many posts with a Script structure to copy a project like this:
def copyProject = new CopyProject()
def inputs = [
(CopyProject.FIELD_SOURCE_PROJECT) : originProjectKey.toUpperCase(),
(CopyProject.FIELD_TARGET_PROJECT) : destinationProjectKey.toUpperCase(),
(CopyProject.FIELD_TARGET_PROJECT_NAME) : destinationProjectName,
(CopyProject.FIELD_COPY_VERSIONS) : true,
(CopyProject.FIELD_COPY_COMPONENTS) : true,
(CopyProject.FIELD_COPY_ISSUES) : false,
(CopyProject.FIELD_COPY_DASH_AND_FILTERS): true
]
def errorCollection = copyProject.doValidate(inputs, false)
if (errorCollection.hasAnyErrors()) {
oLog.escribir("ERROR> Condidicion al clonar proyecto> " + errorCollection)
} else {
try {
def util = ComponentAccessor.getUserUtil()
def adminsGroup = util.getGroupObject("jira-administrators")
assert adminsGroup // must have jira-administrators group defined
def admins = util.getAllUsersInGroups([adminsGroup])
assert admins // must have at least one admin
ComponentAccessor.getJiraAuthenticationContext().setLoggedInUser(util.getUserByName(admins.first().name))
copyProject.doScript(inputs)
} catch (Exception e) {
oLog.escribir("ERROR> Excepcion> " + e.getMessage())
}
}
In Built-in-script, on copy project feature, is possible to copy an specific Board from the original project to the new project setting the new board name. How can I do the same throught the script? Is there any CopyProject extra attribute to copy an specific board?
Jira Version 8.5.1
Thank you and best regards,
Eloi.