Hello,
How can i do a Scriptrunner condition if value is present in labels field.
Ex :
def Labels = issue.getLabels()
def Type = issue.getIssueType().nameif((Type == "EPIC) && (Labels =="Hello")){ ...
Regards,
Hi, @Hocine TAMINDJOUTE
Try, please, next code:
Set<Label> labels = issue.getLabels()String issueTypeName = issue.getIssueType().nameif((issueTypeName == "Epic") && (labels.label.contains("Hello"))) {//Do what you wanted to do}
p.s. it's bad idea to name variables like Labels or Type. They can interfere with imported classes
Hi, @Evgenii
Thank you for the answer, below the result with error :
Please, add this string to imports
import com.atlassian.jira.issue.label.Label
or change string at line 7 to:
Set labels = issue.getLabels()
Thank You, it's OK
It looks like you're new here. Sign in or register to get started.