Hi guys,
I am trying to build an automation that updates Epic Link to a specific existing Epic depending on the Epic Due Date when a JIRA issue is created.
For example, there are already 12 existing monthly Epics:
1. January Epic with Epic Due Date on 01/31/2024
2. February Epic with Epic Due Date on 02/28/2024
3. March Epic with Epic Due Date on 03/31/2024
So on...
Now when a Story with Story Due Date is created, it should be linked to the applicable Epic according to the Epic Due Date.
For instance:
When a Story with Story Due Date 01/31/2024 is created, then it should be linked to the January Epic.
When a Story with Story Due Date 02/20/2024 is created, then it should be linked to the February Epic.
When a Story with Story Due Date on 03/10/2024 is created, then it should be linked to the March Epic.
This is what I have in the automation so far:

But I noticed this method does not work.
So I decided to use the following method, but I have no idea how to use JQL to Edit issue function.

Is it feasible to add JQL to specify a specific Epic in Edit Issue element?
Or is there any alternative way to make it work?
Thank you so much for your help!