Forums

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

No result with filter for dates in AQL

Maria Plavin April 12, 2024

I´m trying to create a search filter to find assets with an EOL date 30 days from now by using this query:

objecttype IN ("computer","network","printer") AND "EOL" >= "now(+30)" ORDER BY Name ASC

The EOL is a custom field of the type Date. 

I should get at least one hit with this filter, but only gets the message "No objects created. Impossible to create objects due to the current object type is abstract.". 

If I this filter with the attribute "Created" instead, I get several hits.
objecttype IN ("computer","network","printer") AND "Created" > "now(-90d)" ORDER BY Created DESC

The difference of these two attributes, Created and EOL, is that the Created one also includes the time, which the EOL doesn´t.  I have also tried another custom field of the type Date, where I also should get several results, but get none. Is there any issues with filtering using custom date attributes?

 

1 answer

1 accepted

0 votes
Answer accepted
Gikku
Community Champion
April 12, 2024

@Maria Plavin If you are looking for the assets with EOL in the next 30 days, you should be using "EOL" < now(30d)

If looking for the ones after 30 days, the query should be objectType IN ("computer","network","printer") AND "EOL" >= now(30d) ORDER BY Name ASC

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events