gioboa / jira-plugin

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

Is there a way to filter the projects with a custom filter? #91

Closed probfacile closed 5 years ago

probfacile commented 5 years ago

Is your feature request related to a problem? Please describe. When I open Project list to set working project, I would like to have a custom filter to see only my team projects.

Describe the solution you'd like Maybe also a JQL search for this, where is put `project IN ('ABC', 'DEF', 'QWE', 'ASD') ORDER BY updated ASC

Describe alternatives you've considered not sure

Additional context There might be a problem when you have a lot of pojects in the domain, and you only want to see yours that are like 10 and select the working project for each open code window.

gioboa commented 5 years ago

The plugin use this Jira API maybe there is another way to get all projects. I also notice that this API is marked as deprecated.

UPDATE

The Jira docs say Returns all projects visible to the currently logged in user. isn't like this for you? An idea can be add the possibility to hide some project. What do you think? Unfortunately JQL are only to retrive issues...

probfacile commented 5 years ago

What about filtering the result object with client configured array in javascript? something like

myprojects = ['ABC', 'CDE'];
results.filter(i => myprojects.includes(i.key));
gioboa commented 5 years ago

Yep, I thought an implementation like this. :+1: This setting can be useful for some cases.

gioboa commented 5 years ago

I will include it in the next release.

probfacile commented 5 years ago

Thank you!

probfacile commented 5 years ago

ah well i really hoped it would be projects to show... because i have 40 projects growing wich i would like to see only 5 of them i work on :cry:

gioboa commented 5 years ago

With this url https://xxx.domain.com/rest/api/2/project you can get all projects in json format. From json you can extract all the project key and copy them into the plugin setting. I did hideProjects and not showProjects because if you create a new project you have to remember to add the key into this setting and also showProjects is not backward compatible. Sorry.

probfacile commented 5 years ago

ok i will try this solution thx

probfacile commented 5 years ago

if you can curl it you get something like:

curl https://xxx.domain.com/rest/api/2/project | jq .[].key -cMr | egrep -v 'KEY1|KEY2|KEY3' | tr '\n' ', ' | sed 's/,$/\n/'

gioboa commented 4 years ago

v 0.19.0 I added projectsToShow setting. Here you can define only the projects to include. The plugin keep, from all project list, only the project keys you define.