Post-function "Create issues and subtasks: on create?

Issue #650 resolved
Scott McDonald created an issue

Hello:

Can the Post-function "Create issues and subtasks be used on Create? The reason I ask is I receive the error "We can't create this issue for you right now, it could be due to unsupported content you've entered into one or more of the issue fields. If this situation persists, contact your administrator as they'll be able to access more specific information in the log file. jira"

I've also attached the post function logic I have happening on Create.

Thank you,

Scott

Comments (28)

  1. Scott McDonald reporter

    Hello:

    I've moved it to different steps in the post-function creates the issue originally but I'm still seeing the same error.

    Scott

  2. Fidel Castro Armario repo owner

    Hi @scottjmcdonald,

    I think that you misunderstood my indications: Please, move post-function "Creates the issue originally" to FIRST position in execution order, and ensure that you publish the workflow draft.

    BTW, Summary and Description should be parsed in advanced mode.

    Let me know whether it solves the problem.

  3. Fidel Castro Armario repo owner

    Can you update to the most recent version of JIRA Workflow Toolbox, i.e. 2.2.37?

    If it doesn't solve the problem, can you, please, share your server's log file? You can send it to support@workflowarts.com.

  4. Scott McDonald reporter

    After upgrading, I am still experiencing the issue. Just to make sure i get you the correct file, you are interesting in reviewing /srv/atlassian/application-data/jira/log/atlassian-jira.log?

  5. Fidel Castro Armario repo owner

    Hi @scottjmcdonald,

    After examining your log files I have found a bug in the plugin. It will be fixed in the next version of the plugin.

    Anyway, your problem can be solved simply by writing the seed strings in function getMatchingValue() exactly as in the seed string list. Specifically, you are writing Desk and Floor Plan Update in the seed string list, and Desk & Floor Plan Update in getMatchingValue() function.

  6. Scott McDonald reporter

    With a Select List (single choice) field, there are 3 options to choose from. We only want a sub-task created if "Contractor" is selected and ignore the remainder of the options. Is this possible? I try the following logic as my option but I receive error messages upon create.

    getMatchingValue(%{User Status}, ["Contractor"], ["Cornerstone Setup for Contractor"]) Thanks,

    Scott

  7. Fidel Castro Armario repo owner

    Try entering the following boolean expression in parameter "Conditional execution":

    %{nnnnn} = "Contractor"
    

    where nnnnn is field code for User Status custom field.

  8. Scott McDonald reporter

    @fcarmario ,

    Can I add additional logic to this where "if user status = employee, create one ticket for system setup, create a second ticket for system2 setup and create a 3rd ticket for system3 setup?

    Thank you.

  9. Fidel Castro Armario repo owner

    Hi @scottjmcdonald,

    To do it you should use boolean expression %{nnnnn} = "Employee" in parameter Conditional execution of the "Create issues and subtasks" post-function you are using for creating the 3 new tickets (i.e., "system setup", "system2" and "system3").

    Note that:

    • You should replace nnnnn with field code of User Status custom field.
    • You should write the name of the option (i.e., "Employee") respecting the case.
  10. Fidel Castro Armario repo owner

    Hi @scottjmcdonald,

    You are using an unnecessarily complex configuration in your post-function. You don't need to use function getMatchingValue() since parameter conditional execution is limiting the execution of the post-function to users with User Status with value Contractor.

    This post-function doesn't appear in the XML export you sent to me. Please, send me the right workflow with the post-function. I will tell you exactly how to modify the post-function to fit your requirements.

  11. Scott McDonald reporter

    Hi,

    I've sent you 2 xmls - this particular use case is in the StandUp workflow. If that doesn't work, does a .jwb file work?

    Here's my use case: If contractor, open a subtask "Cornerstone Setup". If employee, 3 separate sub-tasks" - ADP setup, Jobvite Setup, Concur Setup.

  12. Fidel Castro Armario repo owner

    Use the following configuration:

    Captura de pantalla 2017-08-01 a las 20.57.33.png

    String list expression is:

    %{14412} = "Contractor" ? ["Cornerstone Setup for Contractor"] : (%{14412} = "Employee" ? ["ADP Setup", "Jobvite Setup", "Concur Setup"] : []) 
    

    Note that:

    • You should empty parameter Conditional execution, since we are moving the condition to string list expression.
    • %{14412} is field code for User Status.
    • In my screenshot I have selected issue type Task since I don't have created issue type Stand Up Sub-Task.
  13. Fidel Castro Armario repo owner

    Use the following configuration for setting Assignee field:

    Captura de pantalla 2017-08-02 a las 0.56.01.png

    String expression for assignee is:

    getMatchingValue(^%, ["Cornerstone Setup for Contractor", "ADP Setup", "Jobvite Setup", "Concur Setup"], ["user_a", "user_b", "user_c", "user_d"])
    

    Where user_a, user_b, user_c and user_d are user names, not to be confused with user full names.

  14. Log in to comment