gioboa / jira-plugin

Jira plugin for VsCode
https://marketplace.visualstudio.com/items?itemName=gioboa.jira-plugin
MIT License
266 stars 41 forks source link

Trying to get Default JQL Search working #115

Closed dvonessen closed 5 years ago

dvonessen commented 5 years ago

Describe the issue Hello, I'm new to this extension. Maybe I make something wrong. I want to create my own JQL Search. I constructed it via Jiras search and tried pasting it in the appropriate config. But it seems that this is not working.

I want to see all issues assigned to me with status open in the current sprint. sprint in openSprints() and sprint not in futureSprints() AND status = OPEN AND assignee in (currentUser()) ORDER BY status ASC, updated ASC I get all issues with status open.

Expected behavior Get only what the JQL search specifies or an error when not able to satisfy

Desktop (please complete the following information):

Version: Version 1.35.1 (1.35.1)

gioboa commented 5 years ago

Hi @dthielking , the plugin already search for current sprint with this JQL:

project = '${project}' AND sprint in openSprints() and sprint not in futureSprints() ORDER BY status ASC, updated ASC

maybe you can simply add AND status = OPEN AND assignee in (currentUser()) at the above JQL please have a try 👍

dvonessen commented 5 years ago

Hi @gioboa i did that and it didn't work. I see all open jira issues.

gioboa commented 5 years ago

And the same JQL extract different issues in Jira Web Application?

dvonessen commented 5 years ago

Yes. project = "ProjectName" AND sprint in openSprints() and sprint not in futureSprints() AND status = OPEN AND assignee in (currentUser()) ORDER BY status ASC, updated ASC in Jira itself gives me exactly what I except.

gioboa commented 5 years ago

Could you tell me in witch param you have insert the JQL please?

dvonessen commented 5 years ago

Yes of course. "jira-plugin.defaultJqlSearch": "project = '${project}' AND sprint in openSprints() and sprint not in futureSprints() ORDER BY status ASC, updated ASC" This is the entry in my settings.json.

gioboa commented 5 years ago

Ok, so this search is available in the three dots menu. In this JQL I don't see any filter for you user... You need a VsCode restart for apply new changes in the plugin settings.

dvonessen commented 5 years ago

Thank you for the hint with restarting. Now I'm using the correct JQL. "jira-plugin.defaultJqlSearch": "project = '${project}' AND sprint in openSprints() and sprint not in futureSprints() AND status = OPEN AND assignee in (currentUser()) ORDER BY status ASC, updated ASC",

And after restarting VSCode I get an error from the JIRA-PLUGIN Output Terminal. {"statusCode":400,"body":{"errorMessages":["The value '${project}' does not exist for the field 'project'."],

gioboa commented 5 years ago

Here the description of default jql settings "description": "Here you can define your default/custom JQL search (n.b: WORKING_PROJECT is the placeholder for the current working project)"

The default value: "project = 'WORKING_PROJECT' ORDER BY status ASC, updated DESC"

So in your custom JQL replace project piece with this project = 'WORKING_PROJECT' :+1:

n.b: '${project}' is only the variable inside the code :smile: :+1:

dvonessen commented 5 years ago

Great. Thank you for your help! Now it works! 😀

dcarreraccc commented 9 months ago

Hi @gioboa it would be nice if in the description of that parameter you specify that you need a VSCode Reload for the new default JQL search to work.

gioboa commented 9 months ago

Thanks for the suggestion @dvonessen 👍