The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to automate the creation of subtasks based on a date field

Javier Peraita
Contributor
August 6, 2024

Hello! Is it possible to automate the creation of subtasks based on a date field? I.e.: if we have the field "Due date" in an issue, it is possible to open a specific subtask X days before? (the time we determine)

For example:

- Due date: October 1st

- Automatic opening of subtask: 15 days before (September 15th)

What would be the automation logic (trigger and date comparison)?

Thank you very much!

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

1 vote
Vikrant Yadav
Community Champion
August 6, 2024

Hi @Javier Peraita  For this you need to create a scheduled automation, which run everyday and check issue in which duedate is equal to currentdate+15. For those issue, it create a sub-task. 

 

JQL : project = "PAA" AND duedate = startOfDay(15)

Screenshot 2024-08-06 at 6.40.34 PM.png

Javier Peraita
Contributor
August 12, 2024

Hi @Vikrant Yadav, thank you very much for your reply. I am testing this solution but it is not working. I have created several issues with different deadlines, however when I click on validate query I never get any results. I have also tried to validate it from the filters section in Jira and it doesn't return any results either.

I have tried another way of filtering (see attached image) and I have not been able to get it to work either. Can you think what could be wrong and how to solve it?

My Deadline field is a custom field of type date and time.

image (5).png

Vikrant Yadav
Community Champion
August 12, 2024

@Javier Peraita  Are you filter those issues in which Deadline is greater then 15days from now via Issue Search or JQL ? 

If those issues are visible via JQL then automation also validate the query ? 
Is validate query giving zero result ? 

Javier Peraita
Contributor
August 12, 2024

@Vikrant Yadav I am doing it with the JQL code but it does not return any result. Is it possible that it is because the field is date+time ?

Vikrant Yadav
Community Champion
August 12, 2024

@Javier Peraita  It means no issues have Deadline greater than 15 days from now. 

Try to create an issue with Deadline 27th Aug , then Do JQL search, issue would be visible.

DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events