Beispiel #1
0
    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())
Beispiel #2
0
    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())
Beispiel #3
0
    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 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())
Beispiel #5
0
    def new_user_stories_in_bulk(self):
        self.view.open_user_stories_in_bulk_form()

        signals.connect(self.view.user_stories_in_bulk_form.cancel_button, "click",
                lambda _: self.cancel_user_stories_in_bulk_form())
        signals.connect(self.view.user_stories_in_bulk_form.save_button, "click",
                lambda _: self.handler_create_user_stories_in_bulk_request())
Beispiel #6
0
    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))
Beispiel #7
0
    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())
Beispiel #8
0
    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 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))
Beispiel #10
0
    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))
Beispiel #11
0
    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 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 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))
Beispiel #14
0
    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())
Beispiel #15
0
    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))
Beispiel #16
0
    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)
Beispiel #17
0
    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))
Beispiel #18
0
    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())
Beispiel #21
0
    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())
Beispiel #22
0
    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
Beispiel #23
0
    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))
Beispiel #25
0
    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())
Beispiel #27
0
    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())
Beispiel #28
0
    def help_info(self):
        self.view.open_help_popup()

        signals.connect(self.view.help_popup.close_button, "click",
                lambda _: self.close_help_info())