Boolean validator with "has not change" validation

Issue #663 resolved
Maximilian Peter created an issue

Hey Fidel, I have another question about the "Boolean validator" functionality. I want to create a validation like that:

  1. Check whether the due date has changed during the transition. If true, the user has to provide a transition comment.

  2. Check whether the due date has changed during the transition. If false, there's no comment to provide.

For 1. I created the following statement:

hasChanged(%{00012}) AND projectProperty("Fälligkeit_ändern_Kommentar") = "JA" AND filledInTransitionScreen(%{00127})

But I can't find a solution for 2 in your wiki. May you help me please.

Thanks Max

Comments (13)

  1. Fidel Castro Armario repo owner

    Hi @MaxPeter,

    Use any of the following 2 equivalent boolean expressions:

    1)

    !(hasChanged(%{00012}) AND projectProperty("Fälligkeit_ändern_Kommentar") = "JA") OR filledInTransitionScreen(%{00127})
    

    2)

    (hasChanged(%{00012}) AND projectProperty("Fälligkeit_ändern_Kommentar") = "JA") IMPLIES filledInTransitionScreen(%{00127})
    
  2. Maximilian Peter reporter

    I have another question about this validation. I have the following requirements:

    If the due date is change during the transition and the project property (Fälligkeit_ändern_Kommentar) is = JA, then the a standard comment should be added to the issue. Therefor I have create a post function "copy parsed text to field" with the following parameters:

    Target field: Last Comment Text to be parsed: Das Fälligkeitsdatum für diesen Vorgang wurde mit folgender Begründung angepasst: %{00127} Conditional execution: projectProperty("Fälligkeit_ändern_Kommentar") = "JA" AND hasChanged(%{00012})

    If I try the transition with this configuration it doesn't work. I think it is a problem with the hasChanged(%{00012}), because without that it works fine.

  3. Fidel Castro Armario repo owner

    There is a bug that was fixed in version 2.2.36. I recommend you to update to the most recent version of the plugin.

  4. Log in to comment