Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
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

Error while creating ObjectAttributeBean in Groovy script for Insight automation script


As seen in many examples, I am trying to set the object's attribute to a value that is also an object. So, I have prepared all the necessary variables and objects, and am now ready to create the attribute value, add it to the object attribute list and store the whole thing. But!

I got stuck on this error which I don't fully get:

class com.riadalabs.jira.plugins.insight.common.exception.GroovyInsightException

GroovyInsightException: No signature of method: is applicable for argument types: (,, java.util.ArrayList) values: [sasas (TIAPBIS-1507901), ObjectTypeAttributeBean [id=15093, name=Tier 2, type=REFERENCED_OBJECT, defaultType=NONE], ...] Possible solutions: createObjectAttributeBeanForObject(,, [Ljava.lang.String;), createObjectAttributeBeanForObject(,, java.text.DateFormat, java.text.DateFormat, [Ljava.lang.String;)'

The code that produced the error:"object? "+object+" - "+object?.getClass());"objtypeToSet?"+objtypeToSet+" - "+objtypeToSet?.getClass());"valList?"+valList+" - "+valList?.getClass());"valList element?"+valList.getAt(0)+" - "+valList.getAt(0)?.getClass());
def newObjectAttributeBean = objectAttributeBeanFactory.createObjectAttributeBeanForObject(object, objtypeToSet, valList);

The logs showing values and classes before the error:

021-11-09 11:18:28,140 [https-openssl-nio-443-exec-23] | object? sasas (TIAPBIS-1507901) - class
2021-11-09 11:18:28,140 [https-openssl-nio-443-exec-23] | objtypeToSet?ObjectTypeAttributeBean [id=15093, name=Tier 2, type=REFERENCED_OBJECT, defaultType=NONE] - class
2021-11-09 11:18:28,140 [https-openssl-nio-443-exec-23] | valList?[TIAPBIS-1256821] - class java.util.ArrayList
2021-11-09 11:18:28,140 [https-openssl-nio-443-exec-23] | valList element?TIAPBIS-1256821 - class java.lang.String

I'm trying to figure out what to pass to the function to make it work?

I hope it is something simple I overlooked. 


1 answer

1 accepted

0 votes
Answer accepted

ArrayList --> String... Argh!

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Apps & Integrations

Marketplace Partner Spotlight: Fine Software

Happy New Year, everybody! What better way to kick off 2022 than with a new Marketplace Partner Spotlight ✨ This month, we're getting to know Daniel Franz, co-founder of Fine Software. Fine Software ...

423 views 2 15
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