GithubHelp home page GithubHelp logo

jql's Introduction

jql

My favorite JQL queries.

JQL can be quite forgiving so I will put down a couple derivatives as I think of them.

Jira updated how JQL queries are composed. It seems to be entirely aestetic instead of functional. Because of this, any images on this page may be outdated.


Keeping up to date with current events

Let's say, for example, I work in tech support but I enjoy looking at CyberSecurity-related tickets so I can learn more about 1) MacEwan's IT infrastructure, 2) MacEwan's security and privacy policies, 3) trends for cybersecurity from the POV of support desk (is something trending?) and 4) the field of cybersecurity in general. Always be learning.

  1. Assigned to the current user
    • assignee = currentUser()
  2. Created this year
    • created >= StartOfYear()
  3. Keyword list in text or summary fields
    • text ~ "approx match in the text field"
    • summary ~ "approx match in the ticket title field"
    • the list:
      • secur*
      • cyber*
      • cybersec*
      • hack*
      • phish*
      • compromise
      • malware
      • malicious
      • breach
      • vulnerab
      • fire*wall
      • encrypt*
      • incident response
      • authenticat*
      • ransom*
      • MFA
      • 2FA
      • Multi*factor
      • 2*factor
      • DDOS
      • security awareness training
(text~"security" OR text~"secure" OR text~"cyber" OR text~"cybersecurity" OR text~"cybersec" OR text~"hack" OR text~"phish" OR text~"phishing" OR text~"compromise" OR text~"malware" OR text~"breach" OR text~"vulnerable" OR text~"vulnerability" OR text~"firewall" OR text~"fire wall" OR text~"encryption" OR text~"encrypt" OR text~"encrypted" OR text~"incident response" OR text~"authentication" OR text~"authenticate" OR text~"ransom" OR text~"ransomware" OR text~"MFA" OR text~"2FA" OR text~"Multi-factor" OR text~"2-factor" OR text~"DDOS" OR text~"security awareness training" OR summary~"security" OR summary~"secure" OR summary~"cyber" OR summary~"cybersecurity" OR summary~"cybersec" OR summary~"hack" OR summary~"phish" OR summary~"phishing" OR summary~"compromise" OR summary~"malware" OR summary~"breach" OR summary~"vulnerable" OR summary~"vulnerability" OR summary~"firewall" OR summary~"fire wall" OR summary~"encryption" OR summary~"encrypt" OR summary~"encrypted" OR summary~"incident response" OR summary~"authentication" OR summary~"authenticate" OR summary~"ransom" OR summary~"ransomware" OR summary~"MFA" OR summary~"2FA" OR summary~"Multi-factor" OR summary~"2-factor" OR summary~"DDOS" OR summary~"security awareness training") 
AND 
assignee = currentUser()
AND
created >= startOfYear()

order by Updated DESC, statusCategory ASC

Omit

If the main body of the ticket has these keywords, don't return.

Any tickets that have the word printer but not the word parking.

text ~ printer AND NOT text ~ parking        # notice the lack of quotations around the keyword. If there was a space there, you should use quotations
text ~ "printer" AND NOT text ~ "parking"    # does the same as above
text ~

Multiple keywords

It looks like "konica printer" should be processed differently to "konica" AND "printer", but not in JQL. If there is more than one word in the quotations, it does not specifically look for only instances where the two words are together. Demonstration:

Any tickets that have the words konica and printer anywhere in them

text ~ "printer" AND text ~ "konica"
text ~ "printer konica"                      #no difference!

Specific keywords

You can search for specific and non-specific (fuzz) text. To continue on from the Konica Printer example above:

Any tickets that have the words 'konica printer', together, specifically in this order.

text ~ "\"konica printer\""

the \ is not an error in GitHub formatting, it is literally what I have to use in a JQL search to include quotations for a string. text ~ kinda search terms here vs text ~ "these exact search terms here"

All tickets that I have, unfinished

assignee in currentUser() AND status not in (Done, Completed, Closed)

...#or...

assignee in currentUser() AND statusCategory != Done

any improperly categorized tickets

no dept & no sub-dept

updated >= startofyear() #arbitrary 
AND
    ("Department Queue" is EMPTY OR "Department Queue" in cascadeOption(11307) 
    AND
    "Department Queue" not in cascadeOption(11307, 11541) 
    AND
    "Department Queue" not in cascadeOption(11307, 11308) 
    AND
    "Department Queue" not in cascadeOption(11307, 14665) 
    AND
    "Department Queue" not in cascadeOption(11307, 14178) 
    AND
    "Department Queue" not in cascadeOption(11307, 15115) 
    AND
    "Department Queue" not in cascadeOption(11307, 15091) 
    AND
    "Department Queue" not in cascadeOption(11307, 15379)) 
AND
 (project = MHC OR project = HAR) 
AND
 "Request Type" != "Laptop loan request (HAR)" 

ORDER BY Updated ASC

The above filter JQL will grab any MHC or HAR tickets that don't have a department, or don't have a complete department.

E.g. 11307, 11308 - this is Client Services - Classroom support


More to come

as I create/improve them


jql's People

Contributors

dharrison4 avatar

Watchers

James Cloos avatar  avatar

jql's Issues

adding inline comments to JQL

I saw this done somewhere online. I think they used a text field search like this

text ~ "#COMMENT: this query will grab your tickets from today" OR
(
created >= startOfDay AND assignee = CurrentUser()
)

with the template being something like:

text ~ "#COMMENT: ________" OR
(
___#insert entire rest of JQL here___
)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.