GothenburgBitFactory / GothenburgBitFactory/bugwarrior

[gitbug] Stop fetching closed issues

Open
#1,229 1 comment 0 reactions 0 assignees View on GitHub
bug gitbug
Dominant language
Python
Stars
820
Forks
225
PR merge metrics
No merged PRs in 30d

Description

I have been an on-and-off user of bugwarrior with the git-bug service for a few years now and one thing that has always stopped me is that it fetches _all_ issues from the issue tracker (open and closed) into taskwarrior.

I now understand that the other services do not do this, and this may be a bug in the implementation?

Current behavior:

- Context: Repository with git-bug issue tracker with one open and one closed issue.
- `bugwarrior pull` imports _both_ issues into taskwarrior as pending tasks.
- I close the 2nd issue in git-bug.
- `bugwarrior pull` keeps both issues imported as pending tasks in taskwarrior.

Manually completing in task (`task done`) and pulling will mark them as `status:pending` again in taskwarrior even if they are closed in git-bug (due to bugwarrior's pull-only model).
Only issues that are **deleted** in git-bug with `git bug bug rm ` will be marked completed in taskwarrior.

I believe this goes against the intended UX in the issue tracker (i.e. close finished issues instead of deleting them).

Expected behavior:

- Context: Repository with git-bug issue tracker with one open and one closed issue.
- `bugwarrior pull` imports only the open issue into taskwarrior as pending.
- I close the 2nd issue in git-bug.
- `bugwarrior pull` marks the 2nd issue's task as completed.

Taking a look at other Services, e.g. [GitHub](https://github.com/GothenburgBitFactory/bugwarrior/blob/4ed78ac2734e0979268d41ff22ef8b6d4a7a40ee/bugwarrior/services/github.py#L441) restricts queries to `status:open`, as does [GitLab](https://github.com/GothenburgBitFactory/bugwarrior/blob/4ed78ac2734e0979268d41ff22ef8b6d4a7a40ee/bugwarrior/services/gitlab.py#L325).

My question: is the current behavior the intended behavior for bugwarrior?

For the moment I am using a simple [fix which drops](https://github.com/GothenburgBitFactory/bugwarrior/commit/2a187e7032507bab82686fe6e87dc19f5e444605) closed issues before importing.
If this is indeed a bug and not intended I am happy to prepare a more polished version as PR for bugwarrior.

Contributor guide

Open the contributing guide

Research direction

Start with the git-bug service used by `bugwarrior pull`, then compare its issue filtering with the referenced GitHub and GitLab service implementations in `github.py` and `gitlab.py`. Reproduce the open-and-closed issue scenario and verify that closed issues are excluded from import and existing tasks become completed after pulling.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.