Hi
I have a calculated field that using a JavaScript does a specific calculation and posts the result into a new field. Let’s assume that field is called myCalculation. That all works fine.|
What I want to do is to create a second new calculated field which used myCalculation within its JavaScript. The issue here is that I need to ensure that myCalculation runs first otherwise the second calculation won’t work as it depends on it.
I think that’s not guaranteed.
So I was thinking…. Can I create one JavaScript in one calculated field but pushes data into two separate fields. Hope this makes sense.
I asked coPilot and it thinks I can do this
Example mapping in advanced settings:
[jira.customfield_fiscal]
name = "Fiscal Quarter"
data_type = "string"
javascript_code = ...
json_fields = ["fyQuarter"]
[jira.customfield_compliance]
name = "Epic Compliance Flag"
data_type = "integer"
javascript_code = ...
json_fields = ["complianceFlag"]
and in the JavaScript
Some JavaScript code here…
return { fyQuarter: currentQuarter,
complianceFlag: complianceFlag};
Should that work???
many thanks in advance Ralph