value updated in issue navigator but not in dashboard when script listener is used

gagan m s May 8, 2019

Hello Team,

we are using script listener to update a field for created and updated events.

the value is updated and shown correctly on the issue.

but it is not updating on the dashboard.

below is the code.                                          

 mycustomfield.updateValue(null, issue, new ModifiedValue(issue.getCustomFieldValue(mycustomfield), newvalue),new DefaultIssueChangeHolder())            

                    issueManager.updateIssue(user, issue, EventDispatchOption.DO_NOT_DISPATCH, false)

1 answer

1 accepted

0 votes
Answer accepted
Marc Minten _EVS_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 8, 2019

I guess you need to er-index the issue ? Does the JQL return the issue when you filter on the changed field ?

gagan m s May 8, 2019

Hello Marc,

i guess that is the issue.

can you tell me how i can do it?

Marc Minten _EVS_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 9, 2019
import com.atlassian.jira.util.ImportUtils
import com.atlassian.jira.issue.index.IssueIndexingService

Boolean wasIndexing = ImportUtils.isIndexIssues();
IssueIndexingService indexing = (IssueIndexingService) ComponentAccessor.getComponent(IssueIndexingService.class)
indexing.reIndex(issue)
ImportUtils.setIndexIssues(wasIndexing)
Like gagan m s likes this
gagan m s May 10, 2019

Thank you Marc 

Suggest an answer

Log in or Sign up to answer