Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

How to set multiple value to insight attribute using scriptrunner...


I am trying to pass arraylist ie "Values"  with multiple values to have an insight attribute updated with multiple values using below command

def new_attribute_value = objectAttributeBeanFactory.createObjectAttributeBeanForObject(InsightObject, Attribute_type_object, Values as String )
but getting error as below
com.riadalabs.jira.plugins.insight.common.exception.ValidationInsightException: ValidationInsightException: Validation errors were found: rlabs-insight-attribute-76576: ErrorMessage{i18nKey='rlabs.insight.i18n.constraint.violation.ObjectAttributeValueBean.MinOne.value', parameters=[], additionalMessage=null}; at at at at at$storeObjectAttributeBean$ Source) at

is there any other way to update multiple values to insight attribute 

1 answer

0 votes
Peter-Dave Sheehan
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Apr 28, 2023

First off... it's bad practice in Java/groovy to capitalize variables. Then it becomes too difficult to differentiate between class names and instances of classes.

But if your "Values" variable contains an ArrayList and you want each of them to generate an ObjectAttributeValue, you can't cast it as a String.  You must cast it as an Array of strings.

Like this:

def new_attribute_value = objectAttributeBeanFactory.createObjectAttributeBeanForObject(InsightObject, Attribute_type_object, Values as String[] )

Notice "as String[]" instead of "as String"

Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events