So I know I can do this...
{workflow:name=haslabel condition}
{state:First}
{state}
{state:Second}
{state}
{trigger:statechanged|state=Second|haslabel=test}
{set-message:duration=PT1M}
We are in Second state, and the page has the "test" label
{set-message}
{trigger}
{workflow}
Or inverse with haslabel=!test.
What I'd like to do is perform the trigger based on the number of labels, or even just a "has more than just this one" type thing.
End goal is to put a newly created page into an "Insufficient Labels" state or just set a message if the author did not add more than the default labels for the template.
Is there any way to do that? A hidden condition? Is there a way to do calculations or loops in a Workflow macro? Wildcards maybe (haslabel=*,*,*)?
It has been years since I have written workflows (sadly), but you can (or could) do math with the workflow. The easiest would be to set a metadata value, labelcount, and then test for that value. Basically, trigger an event each time a label is added to increment this count and update the metadata value, and then test to see if the count is greater than x in the same event. Basically, the page would stay in the "Insufficient Labels" state until your threshold is met.
Hope this points you in the right direction.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.