def new_user_story(self): self.view.open_user_story_form() signals.connect(self.view.user_story_form.cancel_button, "click", lambda _: self.cancel_user_story_form()) signals.connect(self.view.user_story_form.save_button, "click", lambda _: self.handler_create_user_story_request())
def new_issue(self): self.view.open_issue_form() signals.connect(self.view.issue_form.cancel_button, "click", lambda _: self.cancel_issue_form()) signals.connect(self.view.issue_form.save_button, "click", lambda _: self.handle_create_issue_request())
def edit_issue(self): issue = self.view.issues.widget.get_focus()[0].issue self.view.open_issue_form(issue=issue) signals.connect(self.view.issue_form.cancel_button, "click", lambda _: self.cancel_issue_form()) signals.connect(self.view.issue_form.save_button, "click", lambda _: self.handle_edit_issue_request(issue))
def filters(self): self.view.open_filters_popup() signals.connect(self.view.filters_popup.filter_button, "click", lambda _: self.apply_filters_from_filters_popup()) signals.connect(self.view.filters_popup.cancel_button, "click", lambda _: self.cancel_filters_popup())
def change_to_milestone(self): self.view.open_milestones_selector_popup(current_milestone=self.view._milestone) signals.connect(self.view.milestone_selector_popup.cancel_button, "click", lambda _: self.cancel_milestone_selector_popup()) for option in self.view.milestone_selector_popup.options: signals.connect(option, "click", functools.partial(self.handle_change_to_milestone))
def edit_user_story(self): user_story = self.view.user_stories.widget.get_focus().user_story self.view.open_user_story_form(user_story=user_story) signals.connect(self.view.user_story_form.cancel_button, "click", lambda _: self.cancel_user_story_form()) signals.connect( self.view.user_story_form.save_button, "click", lambda _: self.handler_edit_user_story_request(user_story))
def new_user_story(self): user_story = {"milestone": self.view._milestone.get("id", None)} self.view.open_user_story_form(user_story=user_story) signals.connect(self.view.user_story_form.cancel_button, "click", lambda _: self.cancel_user_story_form()) signals.connect(self.view.user_story_form.save_button, "click", lambda _: self.handle_create_user_story_request())
def handle_projects_response(self, future): projects = future.result() if projects is None: return # FIXME self.view.populate(projects) for b, p in zip(self.view.project_buttons, self.view.projects): signals.connect(b, "click", functools.partial(self.select_project, p)) self.state_machine.transition(self.state_machine.PROJECTS)
def move_user_story_to_milestone(self): user_story = self.view.user_stories.widget.get_focus().user_story self.view.open_milestones_selector_popup(user_story=user_story) signals.connect(self.view.milestone_selector_popup.cancel_button, "click", lambda _: self.cancel_milestone_selector_popup()) for option in self.view.milestone_selector_popup.options: signals.connect( option, "click", functools.partial( self.handler_move_user_story_to_milestone_request, user_story=user_story))
def new_task(self): selected_item = self.view.taskboard.widget.get_focus()[0] if isinstance(selected_item, UserStoryEntry): task = {"user_story": selected_item.user_story.get("id", None)} elif isinstance(selected_item, TaskEntry): task = {"user_story": selected_item.task.get("user_story", None)} else: task = {"user_story": None} self.view.open_task_form(task=task) signals.connect(self.view.task_form.cancel_button, "click", lambda _: self.cancel_task_form()) signals.connect(self.view.task_form.save_button, "click", lambda _: self.handle_create_task_request())
def __init__(self, view, executor, state_machine): self.view = view self.executor = executor self.state_machine = state_machine signals.connect(self.view.issues_header.issue_button, "click", functools.partial(self.handle_order_by, "issue")) signals.connect(self.view.issues_header.status_button, "click", functools.partial(self.handle_order_by, "status")) signals.connect(self.view.issues_header.priority_button, "click", functools.partial(self.handle_order_by, "priority")) signals.connect(self.view.issues_header.severity_buttton, "click", functools.partial(self.handle_order_by, "severity")) signals.connect(self.view.issues_header.assigned_to_button, "click", functools.partial(self.handle_order_by, "assigned_to")) self.view.issues.on_issue_status_change = self.handle_change_issue_status_request self.view.issues.on_issue_priority_change = self.handle_change_issue_priority_request self.view.issues.on_issue_severity_change = self.handle_change_issue_severity_request self.view.issues.on_issue_assigned_to_change = self.handle_change_issue_assigned_to_request
def edit_user_story_or_task(self): selected_item = self.view.taskboard.widget.get_focus()[0] if isinstance(selected_item, UserStoryEntry): self.view.open_user_story_form(user_story=selected_item.user_story) signals.connect(self.view.user_story_form.cancel_button, "click", lambda _: self.cancel_user_story_form()) signals.connect(self.view.user_story_form.save_button, "click", lambda _: self.handle_edit_user_story_request(selected_item.user_story)) elif isinstance(selected_item, TaskEntry): self.view.open_task_form(task=selected_item.task) signals.connect(self.view.task_form.cancel_button, "click", lambda _: self.cancel_task_form()) signals.connect(self.view.task_form.save_button, "click", lambda _: self.handle_edit_task_request(selected_item.task))
def help_info(self): self.view.open_help_popup() signals.connect(self.view.help_popup.close_button, "click", lambda _: self.close_help_info())
def __init__(self, view, executor, state_machine): self.view = view self.executor = executor self.state_machine = state_machine signals.connect(self.view.login_button, "click", lambda _: self.handle_login_request())