Jira JQL: Issues with the 'WAS' Operator

The WAS operator returns zero issues but ‘=’ finds them. For example:

proj = DEF and staff_prev was bobk
proj = DEF and staff_prev = bobk

Why the mismatch?

In my experience, the confusion with the WAS operator often stems from the inherent difference in the way Jira tracks field changes. While using ‘=’, Jira simply checks for the current value in the custom field, the WAS operator is meant to query the historical values the field held. Sometimes the issue arises due to how and when the change events were indexed or even due to misinterpretation of the change data. It is also possible that some fields do not fully record change history. I’ve faced this after some migrations where older records didn’t have complete audit histories, which might be similar to your case.

i’ve seen this before, sometimes jira’s history indexing is off. the =’ op grabs live data while was relies on older logs that might be missing or incomplete. try looking at indexing or date filters, it might help get more consistent results.

The issue seems to trace back to how Jira logs field history. In my experience, the WAS operator relies on a complete audit trail of changes, which might not be available for all fields or records, especially if changes were not consistently captured or if indexing has gaps. The ‘=’ operator directly queries the current state of the issue, bypassing the historical data. Therefore, if history logging or indexing is incomplete, the WAS operator may fail to return the expected issues.

During my troubleshooting on similar cases, I discovered that the WAS operator device can often be impacted by the way Jira handles and stores change history. In instances where the change log wasn’t fully captured or indexing issues occurred, queries using WAS returned inconsistent results compared to using ‘=’. I learned that ensuring complete audit trails and verifying change history capture policies can sometimes resolve these discrepancies. This issue was more pronounced in projects that transitioned between different Jira versions or underwent data migrations.