taskwarrior icon indicating copy to clipboard operation
taskwarrior copied to clipboard

How to change the project and tag names of a context?

Open sofomryu opened this issue 3 years ago • 4 comments

I set a context with a project and a tag. I hope to modify the project's name and the tag of the context, but 'task mod project:"newer name" ' creates another task which is not included in the context. Adding a task still shows older project name in the context. How can I change properties of a project and a tag in the context?

I also tried edit ~/.taskrc file. it can change the project and tag name of a context, however the changed context doesn't include tasks that were included before the change.

sofomryu avatar Dec 20 '22 11:12 sofomryu

Hi @sofomryu, I'm having trouble following the sequence of events here. Could you please provide a more detailed reproduction script, ideally with the bash commands and (un)expected output? :pray:

tbabej avatar Apr 21 '23 05:04 tbabej

Hi @sofomryu, I'm having trouble following the sequence of events here. Could you please provide a more detailed reproduction script, ideally with the bash commands and (un)expected output? 🙏

  1. Define context task context define example_context proj:example_project +example_tag

  2. Set the context task context example_context

  3. Add a task task add example_task

  4. Modify the project name and tag name of the context task context define example_context proj:modified_proj +modified_tag or task context example_context mod proj:modified_proj +modified_tag

Expected result: task Project: modified_project Tag: modified_tag Description: example_task (so, I want to change project and tag properties conserving the tasks in the example_context)

What I get instead: task There is no task in the example_context with proj:modified_project tag:modified_tag. If I set task context none Project: example_project Tag: example_tag Description: example_task

sofomryu avatar Apr 21 '23 08:04 sofomryu

So the expectation is that modifying the tags and/or project on a context propagates the same modification to all tasks that match the original context's filter?

dathanb avatar Apr 21 '23 16:04 dathanb

So the expectation is that modifying the tags and/or project on a context propagates the same modification to all tasks that match the original context's filter?

yes, exactly

sofomryu avatar Apr 21 '23 19:04 sofomryu