What I'm doing wrong with Automation?
Asked by Vladimir Sumilin:

Hi,

I have a problem with Jira automation, I'm trying to make automation, which will create new issues one year after, but before 2 weeks. I also add a new status for old ones.

Screenshot:

![Scrennshot.PNG](/t5/image/serverpage/image-id/241627i25F71493FB28B871/image-size/large?v=v2&px=999 "Scrennshot.PNG")

In Audit log it showing me this:

![config.PNG](/t5/image/serverpage/image-id/241628iFC685C464F2A3FB2/image-size/large?v=v2&px=999 "config.PNG")

So, what I am doing wrong? Why it's not creating anything? I just tried to make some tests and nothing was created.

Edited:

I have resolved some problems and I can run the query now, but I'm getting an error.

![Screenshotts.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/241663i5F56D5C7751ADAC3/image-size/large?v=v2&px=999 "Screenshotts.PNG")

Best regards,

Vladimir


Answers:
author: Alex Koxaras _Relational_
body: Hi [@Vladimir Sumilin](/t5/user/viewprofilepage/user-id/4998306)

I would double check the JQL on advanced issue search to verify that it yields the results that you want. From the image you provided to [@Velizar Borisov](/t5/user/viewprofilepage/user-id/3917253) it seems that your JQL yields 0 issues (not 0 errors). Thus it's not running.

comments: author: Vladimir Sumilin
body: Hi [@Alex Koxaras _Relational_](/t5/user/viewprofilepage/user-id/4150197)

I have tried with advanced issue search - if I understood it right. I will try to make it with Cron expression, was this your idea?

Screenshot:

![newQuery.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/241639i6E193E9941D3A0E7/image-size/large?v=v2&px=999 "newQuery.PNG")


author: Velizar Borisov
body: Hi Vladimir,

Looks the query you are using is not retrieving any issues so that's the reason why nothing has been updated. When you use the JQL inside the Automation , you can use "Validate query" which is positioned just below the JQL window. It will just check if there are any issues returned by your search criteria, without updating them.

My assumption is you will have to use "**issuetype = Score** " instead of "**type = Score**".

Hope that helps!  
Velizar

comments: author: Vladimir Sumilin
body: Hi Velizar,

Thanks for your reply, I have changed on "**issuetype = Score** " instead of "**type = Score** ". It's still not creating anything + I also tried to validate the query and I have 0 errors.

Screenshot:

![newscreen.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/241633i8A4D6F91B335FD01/image-size/large?v=v2&px=999 "newscreen.PNG")


author: Velizar Borisov
body: It might be the case that you don't have any issues at all that are satisfying the criteria about the due date. Can you try place the same JQL in the Advanced Issue Search , just like [@Alex Koxaras _Relational_](/t5/user/viewprofilepage/user-id/4150197) purposed?


author: Vladimir Sumilin
body: Thanks [@Velizar Borisov](/t5/user/viewprofilepage/user-id/3917253)

I can run my query right now, but I'm getting a new error, could you look at it? I edited my question.


author: Velizar Borisov
body: Seems like your Score ticket, that you're creating with the automation rule, is at the same level as the sub-task ones, meaning it is logically under the Task/Story/Bug level.

If that's the case you might need to check your creation action and see what is the value for "Parent Issue" . If you need the Score sub-task to be under the Task/Story/Bug that triggers the rule, than simply use "Trigger issue" as a value in the "Parent Issue" set up.


author: Vladimir Sumilin
body: I'm trying to create an issue from a child issue and I also need to connect it with a parent of that child issue.

Screenshot of Create a new issue:

![firstScreen.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/241677i3DC7CFD6C85D3BD4/image-size/large?v=v2&px=999 "firstScreen.PNG")

Also I added Linked Issues:

![secondIssue.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/241678i8F8188E4D19450CC/image-size/large?v=v2&px=999 "secondIssue.PNG")

I made something wrong or I just can't understand what is wrong here.


Tags: cloud

confluence-cloud