Conditional Execution on Component Lead

Issue #722 resolved
Weston Rossborough created an issue

Hi Fidel,

I need to configure a post function to assign an issue to the component lead. To accomplish this I'm using the attached post function. Using the target field "Component Leaders" works, but I would like to create a conditional execution to prevent the post function from firing when the component lead is "No Reply". This is a dummy account that we use for this project. So far I haven't been able to get the conditional execution working.

Is this use case possible? If so, am I using the wrong post function or wrong syntax?

ComponentLeads.png

Comments (7)

  1. Weston Rossborough reporter

    I was able to get this working by using a conditional execution for "Assignee's Full Name". This ticket can be closed.

  2. Weston Rossborough reporter
    • changed status to open

    I'm reopening this issue because I would like to clarify my solution. As a workaround, I was able to get this working by adding an additional post function right after my first one. The second post function clears the assignee if the assignee is "No Reply".

    ComponentLeads2.png

    This works, but if possible I would like to just use a conditional execution at the end of my first post function to have it not fire if the component lead is "No Reply".

    Any further assistance would be much appreciated!

    Thanks, Weston

  3. Fidel Castro Armario repo owner

    Hi @WestonR,

    Try using the following boolean expression in the first post-function:

    %{00021} != "No Reply"
    

    where %{00021} is field code for "Current user's full name".

  4. Weston Rossborough reporter

    Hi Fidel,

    Thanks for responding! The conditional execution seems to work, but it doesn't accomplish what I'm looking for. As the current user, my username isn't No Reply, however, the post function still fires and assigns the ticket to user account No Reply since this is the component lead for this particular test ticket.

    The desired result would be for the post function to assign the ticket to the component lead for any component in the project except for this one.

    Thanks, Weston

  5. Fidel Castro Armario repo owner

    Hi @WestonR,

    You have a user in your JIRA instance with "No Reply" as user's full name. I don't know which its username (not to be confused with user's full name). Let's suppose that it's "noreply". Then you should use the following boolean expression in parameter conditional execution in the first post-function: %{00125} !~ "noreply".

    Where %{00125} is field code for Component Leaders.

    You should find out the actual username of user with full name No Reply.

  6. Log in to comment