Forums

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

Automation - Error in JQL to change status

Alicia Simon
Contributor
February 13, 2023

Hi, I am trying to create an automation rule that transitions issues from DONE to Archive after five days (I'm not an administrator so can't archive, but don't want to delete for reporting purposes). 

When I use status = "DONE” AND updated < -5d I get the error: Error in the JQL Query: The quoted string 'DONE” AND updated < -5d)' has not been completed. (line 1, character 36)

The audit log says:

Error running query for scheduled JQL trigger:
"(status = "DONE” AND updated < -5d) AND (project in (10014)) AND (updated >= -13m)" - Error in the JQL Query: The quoted string 'DONE” AND updated < -5d) AND (project in (10014)) AND (updated >= -13m)' has not been completed. (line 1, character 11)


I am new to the JQL part so unsure where the rest of the audit log error included. I used an existing query given as an example and changed the status and number of days, but still getting this error. Any ideas?

thank you, 

3 answers

2 accepted

3 votes
Answer accepted
Mikael Sandberg
Community Champion
February 13, 2023

Hi @Alicia Simon,

Welcome to Atlassian Community!

Try this JQL and see if it works:

status = Done AND updated < -5d 

Alicia Simon
Contributor
February 13, 2023

Ah, perfect, all works now. I feel silly for not thinking to try without the quotes. 

I appreciate your help so quickly. 

Thank you. 

Like # people like this
0 votes
Answer accepted
Trudy Claspill
Community Champion
February 13, 2023

Hello @Alicia Simon 

Welcome to the Atlassian community!

I suspect the problem is the quote marks you have surrounding the work DONE. From what you pasted it looks like they might not be the same punctuation mark on each side of the word. Specifically the mark on the right side of the word doesn't match the one on the left.

Try deleting and re-adding those marks to make sure they are the same.

Alicia Simon
Contributor
February 13, 2023

I tried redoing the quotes but still didn't work. Removing them was the key. 

Thanks!

Kelly Arrey
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 14, 2023

"(status = "DONE” AND updated < -5d) AND (project in (10014)) AND (updated >= -13m)"

I think the problem with this string is that there is a double quoted string ("DONE") within another double quoted string, so Jira thinks the "(status = " is your string and isn't sure what to do with what comes after it. You don't need the quotes around DONE anyway because it's one word, but you will need them if you ever need to search for a two word status like "In Progress".  So, if you double quote the whole string, use single quotes around the status, e.g., 

"(status = 'In Progress' AND updated < -5d) AND (project in (10014)) AND (updated >= -13m)"

0 votes
John Funk
Community Champion
February 13, 2023

Hi Alicia - Welcome to the Atlassian Community!

I think you have the < reversed. This could get everything that was updated more than 5 days ago. It's probably overwhelmed with the number of issues it is returning. Also, you don't want to use the Updated function but something like this:

Status = DONE and status changed to Done BEFORE (-5d)

But you probably want to make sure that will not be more than 1,000 issues initially. 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events