Just a heads up: On March 24, 2025, starting at 4:30pm CDT / 19:30 UTC, the site will be undergoing scheduled maintenance for a few hours. During this time, the site might be unavailable for a short while. Thanks for your patience.

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

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

Suggest an answer

Log in or Sign up to answer