Heads up! On March 5, starting at 4:30 PM Central Time, our community will be undergoing scheduled maintenance for a few hours. During this time, you might find the site temporarily inaccessible. Thanks for your patience. Read more.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

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

1 vote
Vikrant Yadav
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
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 Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
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 Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
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.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events