gioboa / jira-plugin

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

(bug fix for issue #47): favourites not returning #48

Closed keithturley closed 5 years ago

keithturley commented 5 years ago

In the event of a project ID or project name existing anywhere in the JQL of the JIRA filter it will not be returned to VS Code.

Example: Project name: DER

JQL string contains: "ORDER BY field a"

The favourite would not be returned in this example. Fix has been applied to utilise a regular expression for the various predicates that are possible in JIRA for project key and project name which include variants for project = and project IN etc.....

keithturley commented 5 years ago

Jira automatically sets the case I have used in the Regex regardless of what the user adds in basic mode or types in advanced and the named objects eg project key and name will always be the correct case as they are validated by Bayern on save of the query in jira, so shouldn’t be an issue in case sensitivity

Negative predicates I will need to think about and do some tests. What use case are you thinking about when it comes to != and not in?

gioboa commented 5 years ago

I think we have to exclude the filters that contains != Or not in because if the jql is project not in DER the issues in explorer list are invalid. What do you think?

keithturley commented 5 years ago

What if there is no project filter at all? Is that an valid case?

Are you trying to ensure that the issues returned are only valid for the active explorer project?

gioboa commented 5 years ago

Yes, this is my worry. Maybe it's too difficult parse correctly the jql.

Update If there is no project in jql we can force project = working_project

keithturley commented 5 years ago

Let me have a think and I will come back to you in a few days. Everything has a solution :-)