In my IDE and in the Atlassian Java API Documentation (under https://docs.atlassian.com/assets/9.1.16/index.html?io/riada/insight/model/DocumentationPage.html ) I find the method com.riadalabs.jira.plugins.insight.services.model.ObjectBean.getName() marked as Deprecated, but I found no suggestion what to use instead.
I know deprecated means it will still work for some time, but I would like to be pro-active.
Does anyone know, how to replace ObjectBean.getName(), or where to search for that information?
Many thanks in advance.
Hi, @Milan B
Try getLabel(). It's not deprecated and result is same to getName()
Hi @Milan B
Could you please specify which version of Jira and ScriptRunner you are currently using?
For your case, I suggest upgrading your ScriptRunner plugin to the latest release, i.e. 8.4.0, and looking into the HAPI feature.
In HAPI, you will see a Work with Assets / Insight section. This is a more straightforward approach to invoking the Object Bean attributes.
I hope this helps to solve your question. :-)
Thank you and Kind regards,
Ram
Thank you Evgeniy, it's working.
It's a bit confusing that getName actually does the same like getLabel, I can see now why they marked it as depricated :-)
Thanks Ram, it's an interesting option for future code, yet replacing the existing getName with getLabel was easier for now.
It looks like you're new here. Sign in or register to get started.