-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Low
-
Component/s: Work Item - Search - Backend - JSIS
-
Minor
Issue Summary
When the ISO8601 setting is enabled on a Jira site, JQL queries interpret startOfWeek() as Monday 00:00 on the issue search screen. However, when the same JQL is used in an Automation rule condition, the JQL evaluation appears to treat startOfWeek() as Sunday 00:00, leading to inconsistent results.
Steps to Reproduce
- Create a Jira issue and determine the minutes passed from the start of the week in both of the following scenarios:
- When startOfWeek() is expected to be Sunday 00:00
- When startOfWeek() is expected to be Monday 00:00
- For both values calculated in step 1, create JQL queries similar to: createdDate > startOfWeek("1300m") AND createdDate < startOfWeek("1310m") (Adjust the minutes to match your specific timestamps so that the issue is returned by the JQL.)
- Enable the ISO8601 setting via: Jira settings → System / Look and feel → enable ISO8601 week date setting.
- Verify the behavior on the issue search screen:
- Run the JQL created for the Monday 00:00 case in the issue search UI.
- Confirm that the issue is returned, demonstrating that startOfWeek() is being treated as Monday 00:00.
- Create an Automation rule:
- Trigger: Manual trigger
- Condition: JQL condition
- Use the same JQL that worked for the Monday 00:00 case in step 4.
- Action: Log action (e.g. “Condition passed”).
- Manually trigger the Automation rule on the same issue.
Expected Results
- When the JQL is executed on the issue search screen, startOfWeek() correctly uses Monday 00:00 as the start of the week (with ISO8601 enabled), and the issue is returned.
- When the same JQL is evaluated in the Automation rule condition, the behavior should be consistent: the rule should treat startOfWeek() as Monday 00:00 and the condition should pass for the same issue.
Actual Results
The JQL returns the issue as expected when run directly on the issue search screen (using Monday 00:00 for startOfWeek()). The same JQL, when used in the Automation JQL condition, does not return the issue / the condition does not pass. This indicates that Automation appears to always interpret startOfWeek() as Sunday 00:00, ignoring the ISO8601 setting that shifts the week start to Monday.
Workaround
When using startOfWeek() in Automation rule conditions, adjust the JQL to account for the fact that Automation currently does not respect the ISO8601 setting:
- Write the JQL as if startOfWeek() is always Sunday 00:00, even if ISO8601 is enabled on the site.
- For example, shift your minute offsets to align with a Sunday-based week start so that Automation evaluates the same effective window as the issue search UI.