Unable to set Conditional Execution

Issue #837 resolved
Andre Hughes
created an issue

I am trying to set an conditional execution for a Post function.

I have 2 separate issues in 2 different Projects linked together with a Linked Issue type.

In the condition I am try to only allow the post function to execute only if it has a specifics Link-type (name).

I have tried several various format, however the syntax check keeps failing.

Here is the JQL with a Search - ssuesFromJQL("issueFunction in hasLinkType(SD-DeliveryTeam-Link)")

In the Condition - %{12500} in linkedIssues("SD-DeliveryTeam-Link")

Comments (6)

  1. Andre Hughes reporter

    Hi the validator works in the Post function, however another problem has come up. I need to have this 1 post function be executed anytime a person enters a comment in the linked issue. I am using ScriptRunner to run a Fast Track on this transition. (Send Comment to JIRA Issue) As long as the Status is on Escalated in the linked issue, the comment is created in the other linked issue. What I need is for any status to be chosen and have the post function executed. I don't see an option to ignore Validations, Permissions, etc. Is there any option to execute this Post Function regardless of Status on the Linked Issue.

  2. Andre Hughes reporter

    Here is the error when I am not in the Escalated status - 2017-10-11 06:40:19,206 ERROR [utils.WorkflowUtils]: In-depth checking of each condition follows to determine why the action was not allowed. 2017-10-11 06:40:19,207 ERROR [utils.WorkflowUtils]: It seems that you have tried to perform a workflow operation (Send Comment to JIRA Issue) that is not valid for the current state of this issue (HCP-300). The likely cause is that somebody has changed the issue recently, please look at the issue history for details. 2017-10-11 06:40:19,207 ERROR [utils.WorkflowUtils]: (FAIL) FAIL: Only if transition is triggered by a JIRA Workflow Toolbox post-function, i.e., hidding it to interactive JIRA users. by JWT

  3. Fidel Castro Armario repo owner

    Hi @Andre Hughes,

    Sorry, but I don't fully understand your explanation. Anyway, maybe this solution solves your problem:

    Create a global reflexive transition for replacing "Send Comment to Issue" transition, which is a local reflexive transition which is only available from status Escalated.

    The following screenshot shows how to create a global reflexive transition:

    global-reflexive-transition.png

    By the way, I don't find necessary the boolean expression at parameter Conditional execution for your post-function, since in case there isn't any issue link nothing will be written. Please, try removing that boolean expression.

  4. Log in to comment