This script takes a JQL query as a parameter that should be a list of epics and returns issues where the custom field (second parameter) does not match the value of the epic.
Example Usage (JQL query)
key in silJQLList("silJql_FieldValueDosentMatchEpic.sil", "Project = EX and type = Epic", "Fruit")
Script
string [] epics = selectIssues(argv[0]); string matchField = argv[1]; string [] ret; for(string e in epics) { for(string i in allLinkedIssues(e, "Epic-Story Link")) { if(%i%.%matchField% != %e%.%matchField%) { ret += i; } } } return ret;
"<h1>See More</h1><ac:structured-macro ac:name="contentbylabel" ac:schema-version="4" data-layout="default"><ac:parameter ac:name="cql">label = "jql" and label = "examples" and space = currentSpace ( )</ac:parameter><ac:parameter ac:name="showLabels">false</ac:parameter><ac:parameter ac:name="showSpace">false</ac:parameter></ac:structured-macro>