Outside-the-box use of wftoolbox

Issue #249 resolved
Will created an issue

Can I place some function at the Create step of a workflow so that if someone emails junk to the jira project it doesn't create an issue.

I realize that this isn;t the best way to go about this, the right way would be to place a rule on the email server but i don't have access to that at this time.

As a workaround could toolbox be used to inhibit the creation of issues if some given sting is in the body of the email?

Thanks,

Comments (2)

  1. Fidel Castro Armario repo owner

    You can do it using "Boolean validator with math, date-time or text-string terms" in "Create Issue" transition using a configuration like this:

    Captura de pantalla 2016-02-25 a las 0.02.56.png

    Boolean expression is:

    %{00001} !~ "forbiden_word_1" AND %{00001} !~ "forbiden_word_2" AND %{00001} !~ "forbiden_word_3"
    

    The former expression prevents issues to be created if its Description contains any of 2 forbidden words.

    If you want to create a validation that ignores the case use the following expression:

    toUpperCase(%{00001}) !~ "FORBIDDEN_WORD_1" AND toUpperCase(%{00001}) !~ "FORBIDDEN_WORD_2" AND toUpperCase(%{00001}) !~ "FORBIDDEN_WORD_3"
    

    In this case you should write the forbidden case in uppercase.

  2. Log in to comment