I am using a JQL query in my code that I am writing in the script console of Jira and I am having some issues with the quotes in the script console as you can see below.
Here is the code:
def query3 = ""
try{
query3 = jqlQueryParser.parseQuery("project = \""+myproject.getName()+"\" and created >= -365d and issuetype in (""\"Defect"\"", "Code Roll-in - Maintenance", "Code Roll-in - New Version"))
}catch(Exception e){
log.warn("MounaException "+e)
}
Anyone knows how to fix this problem?
I have found the solution:
query3 = jqlQueryParser.parseQuery('project = "'+myproject.getName()+ '" and created >= -365d and issuetype in ("Defect","Code Roll-in - Maintenance","Code Roll-in - New Version")')