I'm wondering if anybody has written a Custom JQL Function in ScriptRunner that would let you use JQL to select issues based on the count of the number of versions in fixVersion, affectedVersion, etc.?
I'm envisioning something like:
project = PROJ AND issueFunction in versionCountGreaterThan("fixVersion", 1)to find all the issues where the count of versions in the fixVersion field is greater than 1, or:
project = PROJ AND issueFunction in versionCountNotEqual("affectedVersion", 1)to find all the issues where the count of versions in the affectedVersion field is not equal to 1.
I looked at the Custom JQL Function examples in the docs, but being a Python guy and not a Java guy, it didn't quite "click".