Abstract
This code snippet checks the value of a standard or custom multi-valued type field (typically a multi-select field). The multi-valued fields can either be a collection of objects or a set of values.
...
The output of the code is a boolean value (true
or false)
which you could use to conditionally execute a Post-function/Condition/Validator or Unlink issues:
Check the issue has been flagged
Code Block language groovy linenumbers true issue.get("Flagged").any { it.getValue() == "Impediment"}
Check the issue has a label
Server
Code Block language groovy linenumbers true issue.get("Labels").any { it.getLabel() == "Server"}
Check the issue has
5.0.0
as an Affects Version/sCode Block language groovy linenumbers true issue.get("versions").any { it.getName() == "5.0.0"}
...