Hi,
We have several Teams working on the same project.
As a CurrentUser,
when creating a new issue,
then I would like the Portfolio's cfTeam to be set to the Team I belong to.
So far I have been using a 'Custom Script Field' with the following plugin to retrieve current Issue's Team's name :
import com.atlassian.jira.component.ComponentAccessor
import com.onresolve.scriptrunner.runner.customisers.WithPlugin
import com.onresolve.scriptrunner.runner.customisers.PluginModule
import com.atlassian.rm.teams.api.team.GeneralTeamService
@WithPlugin("com.atlassian.teams")
@PluginModule GeneralTeamService teamService
def customFieldManager = ComponentAccessor.customFieldManager
def cfTeam = customFieldManager.getCustomFieldObject(cfID// "Team" cfID = in your JIRA
if (cfTeam){
String cfTeamV = issue.getCustomFieldValue(cfTeam)
if (cfTeamV){
CfTeamName = teamService.getTeam(cfTeamV.toInteger()).get().description.title
Is there a way I can use the same plugin to retrieve if CurrentUser() is assigned to a Team, and if yes what is the Team's name(s)?
Thanks for clues or solutions...
Hi, unfortunately not. Never found the way, on JIRA server....look for an answer on JIRA cloud with plan, using JIRA API, but did not find a way through either...Hoped I could help 😕
@THIERRY ALEXANDRE :
Hi, did you ever find a solution for this challenge? I've got the same problem right now...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.