1

I found a good list of tutorials about JQL, including a reference on how to write a plugin [1]. Is there already or would it be possible to add comments to a JQL query?

For example, to document my item, I'd like to be able to document that our sprint 'number' differs from the jira sprint 'id'; sprint = 777 (* Agile sprint #50 *)

//Update ; I notice that the Sprint ID is apparently not immediately created upon opening of a sprint. We just started a new sprint but there is no number for it, according to browsing the report page...

1.[] ; ; ; ; ; X.JQL recap! See everything in one post ; ; http://blogs.atlassian.com/2013/03/jql-recap/

AnneTheAgile
  • 9,932
  • 6
  • 52
  • 48

2 Answers2

2

I still wished for the answer to this old question, so I'll share what I finally came up with. This is a hack and not as pretty as I wish, but I add comments by adding a fake search. In the example below, before each complex set of terms, I add "SUMMARY !~ "♥♥ ".

SUMMARY !~ "   ♥♥ No subtasks of stories in backlog: ♥♥   " AND issueFunction not in subtasksOf("type = story AND status = backlog") AND SUMMARY !~ "   ♥♥ Filter for members of that team: ♥♥   " AND filter = 25233

or

SUMMARY !~ "   ♥♥ No subtasks of stories in backlog:   // " AND issueFunction not in subtasksOf("type = story AND status = backlog") AND SUMMARY !~ " \\   ♥♥ Filter for members of that team: ♥♥   // " AND filter = 25233 AND SUMMARY !~ " \\ ♥♥"

The !~ prevents the SUMMARY search from messing up your real JQL query. There is a chance that my comment could actually be found inside one of the results, so adding ♥♥ makes it highly unlikely. If your computer can't make that character (press Alt-3 and let go), using ** or other combinations may work for you.

I also like how the ♥♥ and the spaces to make the comment stand out, but perhaps there are better characters like ☻ or ♫ or -- or //. Sadly, [] and () are not allowed. Any spaces must be inside the quotes to be preserved when you save the query.

Sometimes I paste long queries into a programming tool like Notepad++ and make a User Defined Language to clarify the (sections). But note that the special characters don't transfer correctly.

That's the best I can come up with until this feature request is voted up enough and fulfilled: https://jira.atlassian.com/browse/JRASERVER-20455

deasserted
  • 661
  • 6
  • 6
1

Sorry, you can't.

If something is not here: https://confluence.atlassian.com/display/JIRA061/Advanced+Searching then you can't. (Except of course the custom JQL functions provided by plugins.)

Koshinae
  • 2,240
  • 2
  • 30
  • 40