How to create team using GeneralTeamService plugin in groovy

Edited

Hi, 

 

I am using the GeneralTeamService Plugin to get and set the Team field value in my groovy script. I have a requirement where i need to create a team through the script. I have found the below method for Creating Team but not sure what is the input for it.

     

  WithPlugin("com.atlassian.teams")
  @PluginModule GeneralTeamService teamService 
  //get Team custom field object
  def cfTeam = 
  ComponentAccessor.customFieldManager.getCustomFieldObjectsByName('Team').first()
  def user = ComponentAccessor.jiraAuthenticationContext.loggedInUser
  log.debug "foundTeamId ${foundTeamId}"
  issue.setCustomFieldValue(cfTeam, teamService.getTeam(foundTeamId, true).get())
  issueManager.updateIssue(user, issue, EventDispatchOption.ISSUE_UPDATED, false)
   // does a new team have to be created?
  
    teamService.createTeam(teamDescription)
 

Here i dont get what is teamDescription variable

Also, it will be helpful if someone can provide me GeneralTeamService plugin details link. 

Thanks in Advance 

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events