Scriptrunner behaviors: How can I set a default value for Portfolio's "Team" field in JIRA?

I have a custom issue type with its own workflow. A specific Portfolio team will always be designated for that kind of work. Upon issue creation in JIRA, I want to set the default value for the Team field as that particular team.

I had this working fine previously when I used the JIRA Suite Utilities plugin. However, that plugin is no longer free, and I have been asked to adjust my workflow to utilize Scriptrunner instead because our studio has an active subscription to that.

Since JIRA currently treats Portfolio's "Team" field as a custom field (but limited to system level, so it can't be changed), how can I access it through Scriptrunner's behaviors? I've tried using the actual field name as well as the customfield_#### ID.

We're using these versions:

JIRA Software (Server) 7.1.9

Portfolio for JIRA 2.2.2

Scriptrunner 4.3.16 

1 answer

1 accepted

Hey Kelly,

I've seen your support ticket with ScriptRunner and will be posting this same reply there just in case.

So I have been looking into this for a solid hour or two now with not much luck. I've worked through multiple possible routes to finding an explanation and have now returned with only greater confusion.

I was unable to set the Team custom field under any context via the Atlassian API, and so I am now fairly confident that this is an issue on their end. Because of this, I've gone ahead and raised a bug request with Atlassian regarding this issue, and will be keeping you updated about what I find.

But as of right now, it appears that there is no way to set the Team field with a Behaviour or any other process.

I'm sorry I couldn't be of more help, but hopefully I'm provided some useful information throughout my collaboration with the Atlassian Support team!

Let me know if you have any questions or would like me to elaborate on anything! :)


Hey Aidan,

Thanks for looking into this and raising a ticket with Atlassian! While I'm sad that ScriptRunner can't access the Team field, I'm at least happy to know that I'm not completely crazy in my approach. I hope that Atlassian will work with you on finding a solution for this. I think it's great for Adaptavist to actively pursue more compatibility with Portfolio. I look forward to seeing what we'll be able to do with it in the future. Keep up the awesome work! :)

Just to add to what Aidan wrote, part of the underlying problem is that JIRA Portfolio doesn't have a published Java API (see, and many of their custom fields are inaccessible via the normal Atlassian JIRA APIs.

Since JPOSERVER-1814 seems to be resolved, any updates here? Thanks!

Are there any updates to this? We're trying to do exactly the same thing.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Feb 07, 2019 in Marketplace Apps

A Timeless Love Story

It started as any story starts, on a normal, rainy day.   Admin meets App, and her name was Klok2, and like any first relationship we were both trying to make it work but neither one knew what...

440 views 8 26
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you