Help. Cant figure out a condition.

Issue #623 resolved
Antônio3 created an issue

So i'm trying to set a condition to make the following validation :

  • I have a transition called " Alpha " , and another transition called "Betha"

  • When i use my "Alpha" transition, it triggers via post-function the "Betha" transition.

  • I have 2 tasks, "TaskA" and "TaskB", they both are linked, TaskA have the link type "Includes" and TaskB have the "Is part Of" link type.

I want my condition to only let Betha transition be triggered IF the linked issue on "TaskA" with the includes link type, is in status 'open, or planned' and has NO worklogs, is that possible?

I've been using the linked issues, with the Issue status, but can't seem to accomplish my condition.

Thank you in advance, great support!

Comments (6)

  1. Fidel Castro Armario repo owner

    Hi @antonio_stein,

    You can use "Boolean condition / validation with math, date-time or text-string terms" in Betha transition of with the following boolean expression:

    count(filterByPredicate(linkedIssues("Is part Of"), ^%{00016} in ["Open", "Planned"] AND ^{00025} = 0)) > 0
    

    Note that:

    • ^%{00016} is field code for Issue status in linked issues.
    • ^{00025} is code for numerical value of Total time spent (minutes) in linked issues.
    • "Open" and "Planned" are issue status. The names must be exact, respecting the case. Beware that JIRA UI usually shows the issue statuses in upper case. To check up the actual name of the statuses go to Administration > Issues > Statuses.
  2. Antônio3 Account Deactivated reporter

    Using the " ^ " in front of the field codes represent the linked issues value for this field right ?

  3. Fidel Castro Armario repo owner

    Yes.

    More exactly the field values for issues returned by the issue list expression in the first parameter of function filterByPredicate(issue_list, boolean_expression).

  4. Log in to comment