Problem Statement:
No results are found when using a JQL function in a Jira automation AND the automation is either automatically triggered (e.g., sprint close) or scheduled. However, the same JQL returns results when manually triggering the automation.
The following screen shot shows the audit log; the green section shows results when manually triggered. The red section shows the same automation after being scheduled.
Additional Background:
The objective of the automation is to identify sprint changes; tickets and story points added / removed from a sprint. There is a similar automation exists that uses the addedAfterSprintStart function, instead of removedAfterSprintStart.
FYI - variables (e.g., sprintEvent, boardName) are used so the automations can be used in different projects by updating these "configurations". Since the automation is scheduled, the automation doesn't have access to Sprint smart values. The For JQL block is selecting a specific issue that contains the Sprint details.
FYI - This question previously posted on different thread. That thread hasn't been active. Hoping this reframes the question and the screenshot above clearly shows the issue.