Hello everybody,
i try to set the project lead a project with Groovy/Scriptrunner.
I have already seen and tested post Set Project Lead with Script Runner .
I have the problem that the username is set in the project, but when I check the result via GUI the message
"Looks like we can't find the selected project lead.
They may have been deleted from your instance. Click 'Edit defaults' to select a new project lead."
is displayed and the user is not showed recognized as JIRA user.
On edit screen, the right JIRA user is displayed. If I close the screen with "update" the user is now correct.
Is there are final command to complet to set the project lead?
import com.atlassian.jira.project.Project
import com.atlassian.jira.project.ProjectManager
import com.atlassian.jira.project.AssigneeTypes
import com.atlassian.jira.component.ComponentAccessor
def originalproject = ComponentAccessor.getProjectManager().getProjectObjByKey("APP1")
def name = "AAA"
def description = "test"
def String leadkey = "jira_admin" // this is username in my JIRA instance
def url = ""
ComponentAccessor.getProjectManager().updateProject(originalproject,name,description,leadkey,url,AssigneeTypes.UNASSIGNED)