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

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

customField not being update on Advance Roadmaps for JIRA server 8

Hi,

I have Scriptrunner script that reads a an Epic does a calculation and writes to a custom field in the Epic.  This script gets read when epic is viewed

 

The custom field works gets updated in the epic correctly, however when I use the custom field in a Roadmap plan, it never updates unless I go into the field in roadmaps change the value and click Review.  For the benefit of testing I have set the CustomField as Text and Free Text searchable.

My code snippet as follows:

 

if (mIssue.issueTypeObject.name == "Epic") {
CustomFieldManager customFieldManager = ComponentAccessor.getCustomFieldManager()
CustomField customField = customFieldManager.getCustomFieldObject(EpicTotalOriginalEstimateField)
def issueManager = ComponentAccessor.getIssueManager()
// def user = ComponentAccessor.getJiraAuthenticationContext().getLoggedInUser()


if (customField != null) {
//def changeHolder = new DefaultIssueChangeHolder()
// Double db = daysForEpic
String db = ""+daysForEpic
mIssue.setCustomFieldValue(customField, daysForEpic)
customField.updateValue(null, mIssue, new ModifiedValue(cfieldValue, db),changeHolder)
//MutableIssue issueMute = issueMger.getIssueObject("LS-11050") as MutableIssue
//issueMute.setCustomFieldValue(customField, "100")
//ComponentAccessor.getIssueManager().updateIssue(user, issueMute, EventDispatchOption.ISSUE_UPDATED, false)
// issueMger.updateIssue(user, mIssue, EventDispatchOption.DO_NOT_DISPATCH, false)
}

I have called both setCustomFieldValue and updateValue

If I call updateIssue (as commented out) it kills my jira server.   We are doing this because of the limitations of Advance Roadmaps that cant display calculated Custom fields.

 

I would appreciate any help in this.

 

Thanks,

 

-Mark

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Advanced Roadmaps

Introducing Advanced Roadmap’s new dependency report

To see this feature in action check out our recent dependencies demo here: https://www.youtube.com/watch?v=eQu5VsUqyZA Keeping on top of your dependencies is a key part of ensuring project success....

1,740 views 12 18
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you