It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

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 in Marketplace Apps & Integrations

Marketplace Spotlight: Manage your assets with asset management apps

  The role of IT professionals has become increasingly difficult over the last decade. Our organizations work in an increasingly software-powered world and IT professionals are expected to not...

254 views 3 9
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you