nocejo / trev

Taskwarrior tasks reviewing script
Other
14 stars 1 forks source link

Multi-step reviews #35

Closed nocejo closed 9 years ago

nocejo commented 9 years ago

Address a suggestion and good idea from @linuxcaffe (David J. Patrick):

I'm thinking about how more-complex reviews might be implemented, as an example,reviewing "required" attributes. If you consider "project" and "priority" attributes to be "required" you could set up a review for each one, naming those reviews

review.required-project...
review.required-priority...

then maybe

trev required

matching both of those review definitions, might run the first review, and then the next one, in the order found in the rc, as part of the same "review"

Gonna try making trev to be able to perform sequential, chained reviews.

nocejo commented 9 years ago

I'm trying to implement something like this:

Multi-step or cascaded reviews perform sequentially linked individual reviews following the order of appearance of these in trevrc. Every individual review (mode) in a multi-step review is defined in trevrc by a set of lines including a '*' character in the mode name, separating that character the fore, linking part from the rear, individual part. This text:

    review.wp5*project.filter = pro:wp5
    review.wp5*project.lower  = This is wp5 basic review
    review.wp5*detail.filter  = pro:wp5 and active
    review.wp5*detail.lower   = Reviewing wp5 started tasks
    review.wp5*finish.filter  = pro:wp5 and active
    review.wp5*finish.lower   = Last opportunity!

configures a multi-step (wp5) review integrating three (project, detail and finish) steps or individual reviews in this order. When issuing 'trev wp5' at the shell prompt wp5*project is performed first --but see below-- then wp5*detail and wp5*finish at the end. When one step ends (or is quited) trev reports and ask:

    Multi-step review (wp5*):
      Finished : wp5*project
      Next     : wp5*detail
    Proceed [RET] or quit (q)?

If an specific step (instead of the general 'trev wp5') is requested at the shell prompt, e.g.: 'trev wp5*detail', reviews proceed from this on.

Common parameters can be configured for the whole multi-step review mode in trevrc as follows:

    review.wp5*.upper     = '          *RELEVANT*'
    review.wp5*.viewinfo  = off

and must appear before any individual step definition. Common parameters apply to every particular step, but configuration in individual steps overwrites them.

nocejo commented 9 years ago

Commit 907744a4 implements recognition of different modes --single, multi-step or individual step-- and the right order of value assignment to parameters. Step sequence is still not implemented.

nocejo commented 9 years ago

Working on branch multistep .

nocejo commented 9 years ago

Commit https://github.com/nocejo/trev/commit/282f0b7153ac0c7625ab7511cfb7ba39f0090576 merges branch multistep and closes this issue.