The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Update Insight field Value

Robin Weiß
April 1, 2020

Hey Folks,

I want to update a DateTime Field of an Insight Object with an groovy script. 
But the following code does not work:

Date now = new Date(System.currentTimeMillis())

Class objectFacadeClass = ComponentAccessor.getPluginAccessor().getClassLoader().findClass("com.riadalabs.jira.plugins.insight.channel.external.api.facade.ObjectFacade")

ObjectFacade objectFacade = ComponentAccessor.getOSGiComponentInstanceOfType(objectFacadeClass)

objectFacade.loadObjectAttributeBean(782, 1626).createMutable().getObjectAttributeValueBeans()[0].setDateValue(now)

 Maybe you could tell me how I have to change the code to get it working.
Why does the setDateValue() Method not update the field?

It does not work with Inteager Fields either.

0 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.