Create ticked based on select list

Issue #598 resolved
Weston Rossborough
created an issue

Hello,

I have a scenario where I would like to create a linked issue when a selection is made by a "Support Team" select list. In this example, when Cadence Team is selected it creates a linked issue in that support team's project.

SupportTeam1.jpg

SupportTeam2.jpg

I've been able to create a mock up of this scenario using the Create issues and subtasks post function in JWT. This works nicely when I have 5 or 6 support teams to select from. However I may have up to 50+ teams to include in this list. This could get difficult since I need to create a post function for each team in this list.

SupportTeam3.jpg

Is it possible to accomplish this using 1 post function?

Comments (7)

  1. Fidel Castro Armario repo owner

    Hi Weston,

    You can do it using "Create issues and subtasks" postfunction with a configuration similar to this in parameter Project:

    Captura de pantalla 2017-05-08 a las 22.48.49.png

    String expression for project key is:

    getMatchingValue(%{nnnnn}, ["Team A", "Team B", "Team C"], ["PRJA", "PRJB", "PRJC"]) 
    

    Where

    • nnnnn is field code for "Support Team" Select List.
    • "Team A", "Team B" and "Team C" are options of field "Support Team".
    • "PRJA", "PRJB" and "PRJC" are project keys for teams "Team A", "Team B" and "Team C" respectively.

    You can extend this expression to any number of teams and projects.

  2. Jonathan

    @Fidel Castro Armario I have a similar setup, but it is kind of tedious to match all my project keys manually. I have a custom field select list that basically contain the project names of some jira project. now i could make this a cascading list where the second value would be the project key, but this again is manual maintainance. Is there a way/expression to get he project key out of a string search for the project name that is stored in my custom field?

    EDIT: it seems I can't only select the secondry values of a cascading select list anyway, so I would have to parse that string for the project key anyway :( Are you still working on that improvment for the project Picker field? https://bitbucket.org/fcarmario/jira-workflow-toolbox/issues/791/create-issue-in-project-based-on-project

  3. Fidel Castro Armario repo owner

    Hi @Jonathan,

    In version 2.2.43_beta_3, option "Project Key" has been renamed to "Project Key/Name", so that the string expression expected by when this option is selected, can return either a project key or a project name.

    Now, you can simply use the field code of the Select List custom field that contains the project names as string expression. The names of the project must be exactly written, i.e., respecting the case and without extra blank spaces.

    Please, confirm that this version works ok for your needs.

  4. Log in to comment