For every project, I have exactly one Tempo account (Tempo Timesheets product) defined that represents the support aspect of that project. It contains the word "Support" prefixed by something else ("Foo Support", "Bar Support", etc). The business wants to set the Account field when a support ticket comes in.
I have the JMWE add-on (awesome by the way!) and use it for many things, but I can't figure out how to produce a nunjucks script to achieve this. I've gone through Innovalog and Nunjucks docs.
As an example, I have these Accounts for a project TEST:
- Extend Microwave Oven To Handle Ice
- Build Flux Capacitor
- Foo Support
I need to loop through the set of Accounts associated with the project TEST and return the one with Support in its name and set the Account field to Foo Support.
For instance, this does not work (I tried the custom field's name and also tried "Account".
{{ issue.fields.customfield_12440 | find("Support") }}