I have a custom field for RAG status (BRAG rating) and scripted field for RAID score and I update the RAG status within the scripting for RAID score as follows:
def bragField = customFieldManager.getCustomFieldObjects(issue).find {it.name == "BRAG Rating"}
def fieldConfig = bragField.getRelevantConfig(issue)
def bragValue = optionsManager.getOptions(fieldConfig).getOptionForValue(bragString, null)
bragField.updateValue(null, issue, new ModifiedValue(issue.getCustomFieldValue(bragField), bragValue),changeHolder) This works just fine and I can search and sort by BRAG rating without problems. Now my users want to automate a Trend field based on whether the BRAG rating has gone up, down or remained the same over the past week. I had thought to just look at the history of the BRAG rating field to calculate this but I now notice that there are no history items being stored.
Is there something I need to do in addition to updateValue to cause the history to get updated?