In this page
Overview
This page lists sample CQL queries for common use cases around page archiving. They're completely standard CQL queries, so you can use them as-is, adapt them to your own needs, or freely combine them with any other CQL field or function for more complex searches.
Query samples
Archiving date
Existence
Contents that have an archiving date set:
arch.archivingDate.setOn <= now()
(The actual date field cannot be tested for emptiness due to CQL limitations. This query tests the timestamp when the actual date was set instead.)
Contents that don't have an archiving date set:
type in (page,blogpost) and not arch.archivingDate.setOn <= now()
(The otherwise useless clause on the "type" field is needed only because a negative expression cannot be the first clause in CQL.)
Value
Contents with a passed archiving date:
arch.archivingDate < now()
Contents with an archiving date after a specific date:
arch.archivingDate > "2026-08-01"
Contents with an archiving date in a specific period:
arch.archivingDate > "2026-01-15" and arch.archivingDate < "2026-08-01"
Contents with an archiving date today:
arch.archivingDate >= startOfDay() and arch.archivingDate < startOfDay("+1d")
Contents with an archiving date inherited by their descendants:
arch.archivingDate.inherited = "true"
Who
Contents with archiving date set by a specific user:
arch.archivingDate.setBy = "123abcde95673300697be2ba"
(The alphanumeric string is the user's Atlassian account ID. How to figure out?)
Contents with archiving date set by specific users:
arch.archivingDate.setBy in ("123abcde95673300697be2ba", "456fabcd1238456789abcdef")
(The alphanumeric string is the user's Atlassian account ID. How to figure out?)
Contents with archiving date set by me:
arch.archivingDate.setBy = currentUser()
When
Contents with archiving date set before a specific date:
arch.archivingDate.setOn < "2026-08-01"
Contents with archiving date set in a specific period:
arch.archivingDate.setOn > "2026-01-15" and arch.archivingDate.setOn < "2026-08-01"
Contents with archiving date set today:
arch.archivingDate.setOn >= startOfDay()
Already-archived contents
Contents archived yesterday:
arch.event.archivedOn > startOfDay("-1d") and arch.event.archivedOn < startOfDay()
(Remember to check the "Archived pages" option at "Search In" in automation schemes, otherwise this query will not find anything.)
Contents archived this week:
arch.event.archivedOn > startOfWeek()
(Remember to check the "Archived pages" option at "Search In" in automation schemes, otherwise this query will not find anything.)
Questions?
Ask us any time.