Page MenuHomePhabricator

Support auto-adding a project to a Task if not already tagged with a sub-project
Open, Needs TriagePublic

Description

Problem: I want all tasks within a certain space to be tagged with a certain project (so the relation with the project can still be identified after moving the task to a different space).

What does not work:

  • Writing a Herald rule:
    • if: space=SX
    • then: projects+=#X
  • Extending the Herald rule to the following does not have the desired effect, either:
    • if: space=SX
    • and-if: projects does-not-include #X
    • then: projects+=#X

The problem with both variants is that, if I tag the task with #X(sub) (a subproject of X), Herald will not notice that, remove the subproject and set the project in its place. Adding all the subprojects to the and-if is not an option, because there are just too many and the list is changing constantly.

Event Timeline

urzds created this task.Feb 22 2016, 11:15 AM
urzds updated the task description. (Show Details)Feb 22 2016, 11:17 AM
chad added a subscriber: chad.Feb 22 2016, 8:25 PM

so the relation with the project can still be identified after moving the task to a different space

This seems very brittle overall. What's the root problem you're facing that makes this a suggested solution?

urzds added a comment.Feb 23 2016, 5:45 PM
In T10408#160933, @chad wrote:

so the relation with the project can still be identified after moving the task to a different space

This seems very brittle overall. What's the root problem you're facing that makes this a suggested solution?

Setup: I have several tasks in spaces. These spaces are often directly linked to projects (i.e. they have Visible-To:#Project set). The tasks are each logically related to the space's project.

Now one might think that the space would be enough to query all tasks related to a certain project, buuuut...

Problem: If I move the task from one space to another, there is no way to know which project it was originally associated with.

Attempt at a solution: Use Herald to assign the appropriate project to all tasks in a space. Now, the relation to the project would be a bit more "permanent" than with spaces that might have to be changed more often.

Does not work, because: Described in the original report. Blindly assigning a project with Herald removes the relation to any subproject that I might have manually entered.

Suggestion for a proper solution: