I have a custom field, Credits used, at the issue level. I want to sum this at the project level, and using ScriptRunner's aggregateExpression function I think I can do something like this:
project in projectMatch() and issueFunction in aggregateExpression("Total Credits Used", "Creditsused.sum()")
Is the space in the field name going to cause problems? If so, do I need to create a new field with no spaces (Creditsused)? Enclose the field name in single quotes in the function?
project in projectMatch() and issueFunction in aggregateExpression("Total Credits Used", "'Credits used'.sum()")