I have a Portfolio for Jira Team field and I am trying to set it's value using a script runner script.
def PTFValue = issue.getCustomFieldValue(portfolioTeamField)
As you can see, I can log the "value", "title" and "description" but when I try to pass the "value" of 5 into a setCustomFieldValue method I get a type cast error.
How do I access all of the options for that field and assign them to unique variables? They are not simply strings, as the logs show. Even though the "title" of that Team object is Profiles I cannot pass the string Profiles as a value for that field. The "Description" value (calling PTFValue.getDescription()) appears to change when logged at different run times.
2020-05-13 14:31:58,687 DEBUG [runner.AbstractScriptRunner]: PTFValue =5
2020-05-13 14:31:58,687 DEBUG [runner.AbstractScriptRunner]: PTFValue Title = Profiles
2020-05-13 14:31:58,687 DEBUG [runner.AbstractScriptRunner]: PTFValue Description = com.atlassian.rm.teams.api.team.data.DefaultTeamDescription@6ce8214c
I need to assign the Team field's value but I cannot use a string or number. I want to access all of the Team field's options but I am unable to do so.
Is there some trick to access Portfolio For Jira fields? Any documentation that may help?
Thank you!