Scope: I'm trying to run a jql query (it works in the jql search prompt) using a groovy script; to give me a list of issue keys. And it only gives me null results using the Script Runner Console.
Jira Software 9.12.18 - Jira Service Management 5.12.18
Additionally: I want to filter tickets only created between 12am to 8am. According to Grok it should be something like:
def filteredIssues = issues.findAll { Issue issue -> def createdDateTime = issue.getCreated().toInstant().atZone(ZoneId.systemDefault()).toLocalDateTime() def hour = createdDateTime.getHour() return hour >= 0 && hour < 8 // 00:00 to 07:59
Full Code here:
It's likely not "issuekey", but just "key".
Grok should tell you that if you push it hard enough to correct itself, or you could not be using `SearchProvider` which is the worse and more painful way of doing jql search, but then again Grok do what Grok does.
You need check field name for issue key. Just print all fields for one found issue:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.