Skip to content

Commit

Permalink
Update SubRed.py
Browse files Browse the repository at this point in the history
  • Loading branch information
XZzYassin committed May 4, 2016
1 parent a8f5b2a commit fa4a8f1
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion SubRed.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import re
import webbrowser
import platform
from pprint import pprint

sys.path.append(os.path.join(os.path.dirname(__file__), "libs"))

Expand Down Expand Up @@ -61,6 +62,9 @@ def on_done(i):
query_ids.append(query.id)
if hasattr(query, 'project_id'):
query_projects.append(query.project_id)
else:
query_projects.append(0)


self.view.window().show_quick_panel(query_names, on_done)

Expand Down Expand Up @@ -138,7 +142,10 @@ def run(self,edit,text):
class RedmineFetchQueryCommand(sublime_plugin.TextCommand):
def run(self,edit,project_id,query_id):
redmine = SubRedmine.connect()
issues = redmine.issue.filter(project_id=project_id,query_id=query_id)
if(project_id != 0):
issues = redmine.issue.filter(project_id=project_id,query_id=query_id)
else:
issues = redmine.issue.filter(query_id=query_id)
self.redmine_view(edit, issues, title="Redmine Query List")

def redmine_view(self, edit, issues, title):
Expand Down

1 comment on commit fa4a8f1

@XZzYassin
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FIXED: Issue #2

Please sign in to comment.