Hi,
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: com.riadalabs.jira.plugins.insight.services.model.factory.ObjectAttributeBeanFactoryImpl.createObjectAttributeBeanForObject() is applicable for argument types: (com.riadalabs.jira.plugins.insight.services.model.ObjectBean, com.riadalabs.jira.plugins.insight.services.model.MutableObjectTypeAttributeBean, java.util.ArrayList) values: [sasas (TIAPBIS-1507901), ObjectTypeAttributeBean [id=15093, name=Tier 2, type=REFERENCED_OBJECT, defaultType=NONE], ...] Possible solutions: createObjectAttributeBeanForObject(com.riadalabs.jira.plugins.insight.services.model.ObjectBean, com.riadalabs.jira.plugins.insight.services.model.ObjectTypeAttributeBean, [Ljava.lang.String;), createObjectAttributeBeanForObject(com.riadalabs.jira.plugins.insight.services.model.ObjectBean, com.riadalabs.jira.plugins.insight.services.model.ObjectTypeAttributeBean, java.text.DateFormat, java.text.DateFormat, [Ljava.lang.String;)'
The code that produced the error:
log.info("object? "+object+" - "+object?.getClass());
log.info("objtypeToSet?"+objtypeToSet+" - "+objtypeToSet?.getClass());
log.info("valList?"+valList+" - "+valList?.getClass());
log.info("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 com.riadalabs.jira.plugins.insight.services.model.ObjectBean
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 com.riadalabs.jira.plugins.insight.services.model.MutableObjectTypeAttributeBean
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.
Cheers,
Marina
ArrayList --> String... Argh!
Validate your expertise in managing Jira Service Projects for Cloud. Master configuration, optimize workflows, and manage users seamlessly. Earn global 🗺️ recognition and advance your career as a trusted Jira Service management expert.
Get Certified! ✍️Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.