Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delete tags before adding new ones #131

Closed
kostajh opened this issue May 14, 2014 · 5 comments
Closed

Delete tags before adding new ones #131

kostajh opened this issue May 14, 2014 · 5 comments

Comments

@kostajh
Copy link
Contributor

kostajh commented May 14, 2014

Currently I'm mapping issue labels in the activeCollab service as Taskwarrior tags. Let's say an activeCollab issue comes in with the label ON_HOLD. Bugwarrior creates a TW task with this tag. Then the activeCollab issue gets changed to IN_PROGRESS. On the next bugwarrior-pull we now have a task with ON_HOLD and IN_PROGRESS tags assigned.

What do you all think about having Bugwarrior delete any prior tags before assigning them on a task update? /cc @coddingtonbear @ralphbean

@coddingtonbear
Copy link
Collaborator

Hmm, this brings up a few of thoughts:

  1. Recently, @ralphbean & I discussed a feature allowing one to provide a list of fields that should be updated only when an issue is created (for fields like, for example, priority).
  2. It's probably not a good idea to clear out tags from a user's issue since our default behavior now is to preserve all tags that the user has added manually, but if you must, make sure that you're only clearing out tags that you know the ActiveCollab did/could have added.
  3. The kind of thing you're describing above might be better handled as a UDA -- maybe, activeCollabStatus or something like that -- especially if each of the state tags are mutually exclusive.

@ralphbean
Copy link
Collaborator

Yeah, I vote for the UDA approach in number 3, but number 2 would work as well.

@kostajh
Copy link
Contributor Author

kostajh commented May 15, 2014

I ended up going with approach 3, fyi.

@kostajh
Copy link
Contributor Author

kostajh commented May 15, 2014

The way I use bugwarrior is that any task created by bugwarrior, is solely managed (updated/deleted) by it. I don't make any modifications to those tasks since they could be overwritten the next time bugwarrior-pull runs. Instead, I have a simple script that will clone a task, strip its foreign ID, and mark the Bugwarrior task as dependent on my new one. I use my new, cloned task for starting/stopping work (which I use for time tracking), adding/modifying annotations, tags, due dates, etc. When I'm done, I have a helper script that will close out the remote task and my local task.

All of that is to say, that's why I felt that clearing out all tags from the BW-managed task is OK, but I get that my workflow is probably different from most people's.

@ralphbean
Copy link
Collaborator

Closing this way after the fact. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants