Set assignee based on an other field

Issue #345 resolved
Seher Sönmezsoy created an issue

Hello Fidel,

I have a new question again. I've set in one project (Project 1) a user picker. Can I use it with the same user in an other project (Project 2)? That means I have a Select List and a User Picker in Project 1, if I use the same Select List in Project 2, can I set my Assignee based on this Select List in relation to the User Picker?

Best regards,

Seher

Official response

  • Fidel Castro Armario repo owner

    You should add twice "Read field from issues returned by JQL query" post-function in "Create Issue" transition in workflow of issues of project 2 with the following configurations:

    Post-function 1: Setting "Account Manager"

    Captura de pantalla 2016-06-22 a las 10.22.43.png

    Post-function 2: Setting "NOC"

    Captura de pantalla 2016-06-22 a las 11.30.52.png

    JQL Query in both post-function is:

    project = CRM AND Company = "%{nnnnn}"
    

    replacing nnnnn with field code for "Company". This field code depends on each particular JIRA instance. That shown in the screenshots is field code for Company in my JIRA instance.

    Once configured, transition "Create Issue" will look like this:

    Captura de pantalla 2016-06-22 a las 11.32.04.png

    Post-functions should be added after post-function "Creates the issue originally.".

Comments (14)

  1. Fidel Castro Armario repo owner

    Hi Seher, I haven't understood exactly what you intend to do. I give you some information in relation with your question:

    Options in a Select List custom fields may have the same options in all the projects (using global context), or particular sets of options per project and/or issue type (using multiple contexts).

    In JIRA, each issue has a particular value for each custom field (i.e., fields doesn't have values at project level, but at issue level).

    Any custom field can be used in any project of your JIRA instance, there is no project-scope for custom fields.

    You can set your Assignee in any project based on the value of one or more fields in your JIRA instance using Set a field as a function of other fields post-function.

    If you give an example of what you intend to do I think I will understand it, and will be able to help you.

  2. Seher Sönmezsoy reporter

    Hello Fidel,

    sorry for this. I have a field Select List with Company names, an User Picker Account Manager and an user Picker NOC. This three fields should have relation. In Project One (CRM), I set this Fields. In Project two, I want to read this fields. If I choose an Option in my Select List in Project two, it should automatically assign this task to the NOC of this Company. The NOC should be read of project one. Can we do this? I want to use set the field function from project one to project two. I have more than 300 companies. What is the most simple way to do this?

    Best regards,

    Seher

  3. Fidel Castro Armario repo owner

    Ok, now I understand: you have an issue at project CRM per company, isn't it?

    Do you want also to set field Account Manager in issues in project 2 based on the value of this field in the issue of project CRM for the selected company?

  4. Seher Sönmezsoy reporter

    Yes, that's right, the Account Manager and the NOC Manager should be in Project Test Request with the same Account and NOC Manager of Project CRM. That means I write the Information in CRM and I have to read the Information of CRM in Test Request for selected Company.

  5. Fidel Castro Armario repo owner

    You should add twice "Read field from issues returned by JQL query" post-function in "Create Issue" transition in workflow of issues of project 2 with the following configurations:

    Post-function 1: Setting "Account Manager"

    Captura de pantalla 2016-06-22 a las 10.22.43.png

    Post-function 2: Setting "NOC"

    Captura de pantalla 2016-06-22 a las 11.30.52.png

    JQL Query in both post-function is:

    project = CRM AND Company = "%{nnnnn}"
    

    replacing nnnnn with field code for "Company". This field code depends on each particular JIRA instance. That shown in the screenshots is field code for Company in my JIRA instance.

    Once configured, transition "Create Issue" will look like this:

    Captura de pantalla 2016-06-22 a las 11.32.04.png

    Post-functions should be added after post-function "Creates the issue originally.".

  6. Seher Sönmezsoy reporter

    Thank you Fidel,

    this is a perfect possibility, you write me. I asked that, but I thouht, that is not possible in Jira Workflow Toolbox. Thanks again.

    best regards,

    Seher

  7. Seher Sönmezsoy reporter

    Hello Fidel,

    it doesn't work. I have this:

    Screen Shot 2016-06-22 at 11.56.58.png

    Customer Name is my Select List in CRM. I want to choose the customer name in project 2 and the noc should be set automatically. The message I'll get:

    Screen Shot 2016-06-22 at 12.02.04.png

    Best regards,

    Seher

  8. Fidel Castro Armario repo owner

    Are "Account Manager" and "NOC" the exact names of your custom fields?

    Please, try doing an advanced search in your JIRA instance using those 2 JQL queries, replacing field code with an actual value for each of the fields (NOC and Account Manager). You will get an error message explaining the problem with those JQL queries.

  9. Seher Sönmezsoy reporter

    Now I have not the error code with 'invalid...' Yes Account Manager and NOC are the exact names (User Picker). I've added it in both projects. Does the Select List have a relation with Account Manager and NOC?

    Best regards,

    Seher

  10. Fidel Castro Armario repo owner

    Sorry, I made some mistakes in my description of the solution. I have updated my post describing the solution. Please, reread it do the necessary modifications.

  11. Log in to comment