I need help creating a JQL query that filters tickets by their issue type. I can successfully query using a specific ticket key like 'jql': 'key=HELP-2845', but I want to filter all tickets where the issue type is ‘Service Request’.
I’ve tried using issuetype.name='Service Request' but it’s not working. Looking at my JSON response, I can see the issue type data is nested under fields.issuetype.name.
The previous answer’s right, but here’s what I’ve learned from working with JIRA a lot. While issuetype = "Service Request" is the standard way, you’ll hit problems if the issue type name has slight variations or extra spaces. I’ve found it’s way more reliable to use the issue type ID instead: issuetype = 10400 based on your JSON response. This kills any matching problems with string comparisons. If you need to stick with the name approach, try type = "Service Request" as an alternative - both issuetype and type work in JQL. When I’m debugging JQL queries, I always test them directly in JIRA’s issue navigator first before putting them in code.
Something caught my eye in your original question - you used issuetype.name='Service Request' which makes me think you’re mixing up JSON structure with JQL syntax. I made the same mistake when I started. JQL is completely different from how data shows up in API responses. That dot notation you see in JSON doesn’t work in JQL queries. Also, some JIRA instances are picky about case sensitivity with issue type names. If the standard issuetype = "Service Request" isn’t working, check the exact spelling and capitalization in your JIRA admin settings. I’ve seen cases where “Service Request” was actually “service request” or had hidden trailing spaces.
Try issuetype = "Service Request" instead - you don’t need the .name part in JQL queries. Also make sure you use quotes around the issue type name since it has spaces.