Hello,
do you have any suggestion how we can change name of project (only name, not key) automatically with post function? Can we do that with script runner?
Thanks,Darko
With Script Runner you could create a custom script post function with the following script
import com.atlassian.jira.component.ComponentAccessorimport com.atlassian.jira.issue.MutableIssueimport com.atlassian.jira.project.Projectimport com.atlassian.jira.project.UpdateProjectParametersdef issue = issue as MutableIssuefinal def NEW_PROJECT_NAME = "New Project Name"def project = issue.projectObjectif (project.name == NEW_PROJECT_NAME) {log.debug "Project name is already updated - do nothing" return}changeProjectName(project, NEW_PROJECT_NAME)Project changeProjectName(Project project, String newname) {def updateProjectParameters = UpdateProjectParameters.forProject(project.id).name(newname) ComponentAccessor.projectManager.updateProject(updateProjectParameters)log.debug "Project $project.key name updated"}
Probably by using REST API. You can try webhooks to send a request.
https://developer.atlassian.com/server/jira/platform/webhooks/
That is exactly what I need.Thank you for answer Thanos!
I will first try to solve problem with script runner. Thank you for suggestion.
Hi @Thanos Batagiannis _Adaptavist_
I find a script listenner for update a component , when i change name the component the name changed in an other project with project key ?
Thanks in advance !
It looks like you're new here. Sign in or register to get started.