lastmodified in CQL is not working!
I know I have edited several pages today, and confluence keeps only returning two images from june.
This used to work.
Has something changed?
****Query run******
cqlQuery":"type=page and space in ('SIS') and lastmodified >= \"2020/07/13 14:55\" and created<\"2020/07/13 14:55\""
***User detals*****
This is from a user (me) whose timezone is set to be UTC (user settings on confluence)
The pages I am getting back have lastModified as below:
*****page returned********
"lastModified":"2020-07-13T14:02:51.263Z"
Last modified is clearly < 14:55Z.
Why is this happening?
When I ran similar code (with dates appropriate for last month) the above CQL worked.
Further:
Input (last modified) | Output pages last modified | ||
lastmodified >= "2020-07-13 14:02" | 2020-07-13 13:54 | 2020-07-13 13:57 | 2020-07-13 14:02 |
lastmodified>="2020-07-13 14:55" | 2020-07-13 13:57 | 2020-07-13 14:02 |
Hello @Anurag Gulati !
I tried to replicate the behavior you explained but was ultimately unable to. I edited an already existing page called “NEW EDITOR” and then performed the following CQL search:
atlassian.net/wiki/rest/api/content/search?cql=lastModified>="2020-07-24 15:25"%AND%created<2020-07-24 15:25"
Since I specified both date and time for the lastModified value, only this page came up in the results:
Would it be possible for you to try the following:
- Create a new page
- Publish it
- Edit it
- Create a CQL that looks only for the newly created page based on created and lastModified
- Check if the newly created page shows up
You can run this directly in your browser by typing the CQL after "atlassian.net/wiki/rest/api/content/search?" and using the % character where white spaces should be placed. Much like the example I gave above.
Let us hear from you!
Hi Diego,
Thanks for this. I can validate this does *not* work for my case as I suspect a timezone conversion's happening somewhere.
According to the documentation, I should specify the time in the timezone of the user who is querying not the timezone of the confluence site (cloud/on premise)
Can I ask what's the timezone of the user you are using to query and the timezone of the confluence site?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Anurag Gulati , I think I have faced this issue last week. I have simply entered a random text in the search and did a basic search first. Then I added Type "Pages" and Last Modified "24hrs" and it started working.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.