Can WAS operator be used together with CONTAINS (~) operator

Christophe H-M March 14, 2024

Hi community

I'm trying to find updated issues which were updated during a certain time frame, but with a focus on the fixVersion field. And instead of giving the full list of versions (which I can achieve with "WAS IN" operator) I had in mind to combine WAS together with CONTAINS. something like :

project IN (MYPROJECT) AND fixversion changed DURING (startOfDay("-7d"), startOfDay()) and status not in (Done, Addressed) AND fixVersion was ~"myProduct_2024*"

The idea is to have this filter valid for the entire development cycle, during which we can add versions along the way (like alpha, beta, or why not .1 or .2).

 

We are also using ScriptRunner Enhanced Search but I'm not convinced the WAS operator is handled properly with versionMatch function, therefore I tried to come back to the basis.

 

Any help would be appreciated.

1 answer

0 votes
Leandro Cantero March 14, 2024

Hi @Christophe H-M ,

Regarding your query, combining the "WAS" operator with "CONTAINS" in JQL is not directly supported. The "WAS" operator is typically used to search for issues based on their historical values, while "CONTAINS" is used for text searching within fields.

However, if your goal is to filter issues based on their fixVersion field and dynamically include versions that match a certain pattern (such as "myProduct_2024*"), you might consider using the "IN" operator with a version pattern instead. For example:

 

project = MYPROJECT AND fixVersion ~ "myProduct_2024*" AND fixVersion CHANGED DURING (startOfDay("-7d"), startOfDay()) AND status NOT IN (Done, Addressed)

 

This query will retrieve issues from the project "MYPROJECT" with fixVersion values matching the specified pattern, which were updated during the last 7 days and are not in the "Done" or "Addressed" status.

Regarding ScriptRunner Enhanced Search, I recommend reaching out to the ScriptRunner support team for assistance with the use of the "WAS" operator in conjunction with the versionMatch function.

I hope this helps clarify things for you. Let me know if you have any further questions!

Best regards,

 

Leandro C.

Christophe H-M March 14, 2024

Thanks Leandro for the very quick reply.

Unfortunately the proposed query would only list the issues still matching the fixVersion pattern. In my case I'm interested in those issues, but also the ones which would have been moved to another cycle like myProduct_2025*" for instance. Therefore I was not filtering on the actual fixVersion but on the original one. Typically to find also the issues which have been moved out of the version.

I fear I will have to keep updating my filter along the way.

I'll also check with ScriptRunner support team.

Regards

Christophe

 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events