Issue with validation

Issue #165 resolved
Adolfo Casari created an issue

Hi Fidel,

I am using this validation:

If field Last comment matches the following parsed regular expression: (\w+). Message to show when validation fails: "Debe indicar justificacion de esta accion.".

The idea is validate that a comment is entered in a WKF transition. But the user enters a comment and the validation fails. I used \w+ to avoid entering just blanks.

This is version 2.1.33

Comments (12)

  1. Fidel Castro Armario repo owner

    Hi Adolfo,

    I can't reproduce your problem. In my tests using 2.1.33 and JIRA 6.4.10 all is working as expected.

    One question: Isn't it possible that you want to check comment entered in transition screen instead of last comment?

    The difference between both virtual fields is that the first one returns empty string if no comment is entered in transition screen, and the second one returns the last comment entered in the issue, even if no comment is entered in transition screen.

    Field code for transitions comment is %{00127}.

  2. Adolfo Casari reporter

    You're correct, I was using %{00109} instead of %{00127}.

    However I don't understand why the validation was failing with %{00109}, since the issue has comments and \w+ matches it.

    Thanks for your support.

  3. Fidel Castro Armario repo owner

    I don't understand it also, since I can't reproduce your problem.

    I'm using the following configuration that it's working as expected:

    conf-1.png

    Can you please, provide screenshots of your validation configuration?

  4. Adolfo Casari reporter

    The problem is the regex. With \w+ I enter ThisMatch and the transition goes OK. But I enter This Match the transition fail... I need a regex that avoids entering just blanks.

  5. Adolfo Casari reporter

    I ended up with this working as expected:

    f field Transition's comment matches the following parsed regular expression: ((?:\S+\s*)+).

  6. Log in to comment