taskwarrior icon indicating copy to clipboard operation
taskwarrior copied to clipboard

Fix inherited urgency when parent and child have the same urgency

Open RonMcKay opened this issue 2 years ago • 2 comments

Description

Fixes #2940. Changing the comparison of the maximum child urgency and the parent urgency to prev <= value is fixing the wrong inheritance.

Additional information...

  • [x] I changed C++ code or build infrastructure. Please run the test suite and include the output of cd test && ./problems.

    Failed:
    
    Unexpected successes:
    
    Skipped:
    dependencies.t                      1
    diag.t                              1
    export.t                            1
    feature.default.project.t           4
    filter.t                            1
    hooks.on-modify.t                   1
    import.t                            1
    nag.t                               5
    recurrence.t                        1
    tw-1999.t                           2
    wait.t                              1
    
    Expected failures:
    dependencies.t                      2
    filter.t                            3
    lexer.t                             4
    quotes.t                            1
    tw-2124.t                           1
    
  • [ ] I changed Rust code or build infrastructure. Please run cargo test and address any failures before submitting.

RonMcKay avatar Sep 18 '22 14:09 RonMcKay

does this work correctly with cde8361c?

smemsh avatar Sep 18 '22 19:09 smemsh

No, that still happens with that fix. PR #2760 rather makes the problem more consistent, as described in #2940. If parent and child have the same urgency value, then the if condition in https://github.com/GothenburgBitFactory/taskwarrior/blob/0bae7d9b655c2e787c7eadcfb73f717ec2501cee/src/Task.cpp#L2114-L2120 will not evaluate to true and thus the parent remains with the same urgency as it's child. This might sort it in reports under the child wrt. urgency (#2940).

RonMcKay avatar Sep 18 '22 20:09 RonMcKay