Item11338: WORKFLOWHISTORY, WORKFLOWSTATE* and WORKFLOWLAST* should accept a "rev" parameter

pencil
Priority: Enhancement
Current State: Closed
Released In: n/a
Target Release: n/a
Applies To: Extension
Component: WorkflowPlugin
Branches: trunk
Reported By: GilmarSantosJr
Waiting For: Main.GilmarSantosJr
Last Change By: GilmarSantosJr
WORKFLOWHISTORY, WORKFLOWSTATE* and WORKFLOWLAST* macros always render with the lattest revision information of the topic. Even when viewing an old revision of the topic. These macros should be sensitive to the version being viewed or they should accept an optional rev parameter that shows the information of that specific revision.

Or maybe I'm doing things the wrong way smile

I'm using WorkflowPlugin to control changes to procedures. I want to create a "visualizer" topic that INCLUDE the last approved version of the procedure, this way revisions can take place without duplication and the last approved version is easily available (the first version the user see is not the most recent, but the most recent approved one, so WORKFLOWLASTVERSION_APROVED link is not sufficient). The procedure has a header that includes "Status: %WORKFLOWSTATE%", and that should render to "Status: APPROVED" if there is a more recent unapproved revision. I want something like this:

Status: %WORKFLOWSTATE{rev="%REVINFO{"$rev"}%"}% %IF{"context inactive" then="(There is a [[%TOPIC%][most recent revision]] in %WORKFLOWSTATE% status)"}%

to be rendered as (assuming the most recent version is in UNDERREVISION state and a previous (approved) version is being viewed):

Status: APPROVED (There is a most recent revision in UNDERREVISION status)

And also the %WORKFLOWHISTORY{rev="$rev"}% should be "consistent" and show only transitions up to $rev.

I'm going to implement this (add a rev parameter to these macros), what do you think?

-- GilmarSantosJr - 07 Dec 2011

Sounds good if you can do it.

-- CrawfordCurrie - 08 Dec 2011

Done in version 13398 (2011-12-12), release 1.12.2.

-- GilmarSantosJr - 12 Dec 2011
 
Topic revision: r10 - 12 Dec 2011, GilmarSantosJr
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy