piknik

Unnamed repository; edit this file 'description' to name the repository.
Info | Log | Files | Refs | README | LICENSE

commit 44822d102b1ef6907e63bc43bbd73a1dd3bc02f3
parent 8facdb6e9c85945655406a5ce31dc4272d3f2374
Author: lash <dev@holbrook.no>
Date:   Sun, 23 Apr 2023 00:43:49 +0100

Make remaining basket methods work with alias

Diffstat:
MCHANGELOG | 2++
Mpiknik/basket.py | 29++++++++++++++++++-----------
Msetup.cfg | 2+-
3 files changed, 21 insertions(+), 12 deletions(-)

diff --git a/CHANGELOG b/CHANGELOG @@ -1,3 +1,5 @@ +- 0.3.14: + * Make remaining basket methods work with aliases - 0.3.13: * Invoke show command as default if no subcommand specified - 0.3.12: diff --git a/piknik/basket.py b/piknik/basket.py @@ -93,19 +93,23 @@ class Basket: def state_pending(self, issue_id): - self.state.move(issue_id, self.state.PENDING) + o = self.get(issue_id) + self.state.move(o.id, self.state.PENDING) def state_doing(self, issue_id): - self.state.move(issue_id, self.state.DOING) + o = self.get(issue_id) + self.state.move(o.id, self.state.DOING) def state_review(self, issue_id): - self.state.move(issue_id, self.state.REVIEW) + o = self.get(issue_id) + self.state.move(o.id, self.state.REVIEW) def state_backlog(self, issue_id): - self.state.move(issue_id, self.state.BACKLOG) + o = self.get(issue_id) + self.state.move(o.id, self.state.BACKLOG) def state_finish(self, issue_id): @@ -116,19 +120,22 @@ class Basket: def advance(self, issue_id): - if self.state.state(issue_id) & self.limit > 0: - raise DeadIssue(issue_id) - self.unblock(issue_id) - self.state.next(issue_id) + o = self.get(issue_id) + if self.state.state(o.id) & self.limit > 0: + raise DeadIssue(o.id) + self.unblock(o.id) + self.state.next(o.id) def unblock(self, issue_id): - if self.state.state(issue_id) & self.state.BLOCKED > 0: - self.state.unset(issue_id, self.state.BLOCKED) + o = self.get(issue_id) + if self.state.state(o.id) & self.state.BLOCKED > 0: + self.state.unset(o.id, self.state.BLOCKED) def block(self, issue_id): - self.state.set(issue_id, self.state.BLOCKED) + o = self.get(issue_id) + self.state.set(o.id, self.state.BLOCKED) def blocked(self): diff --git a/setup.cfg b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = piknik -version = 0.3.13 +version = 0.3.14 description = CLI issue tracker author = Louis Holbrook author_email = dev@holbrook.no