Hi!
My goal is to update a custom label type field with values when fixVersion field changes. Values to update are lookup table values (since versions can't have custom fields attached to them) linked to version ids (key being version id, value being the label I want to display).
Automation goes like this:
- When value changes for fixVersion
- Build lookup table for fixVersion ids and words added to the custom field, for example 12345 = "foo", 23456 = "bar" etc., store as "baseValues"
- Set customField with value "base"
- And add value to audit log
- If fixVersion is not empty
- for each {{issue.fixVersions.id}} saved as "fixVersionId"
- if {{baseValues.get(fixVersionId)}} not empty
- Add value {{baseValues.get(fixVersionId)}} to audit log
- And edit issue custom field: add {{baseValues.get(fixVersionId)}}
This logs all values as you'd expect (base + foo, bar if both versions were selected). However the issue field is sometimes updated with only some of the lookup table values, not all of them. It seems to me that the order logging and adding is done has no role in this as it fails in both.
I also have another rule for when issue is transitioned to In Progress and it behaves the same.
Any advice what's going on and how to resolve this?
Mikko