Create an issue on another project from Jira Service Desk issue
Asked by Nicolo Marchesi:

Hello, tried to figure our this thing by myself but it's becoming more and more confusing.

In my organization there is a Jira Help Desk portal where all our customer can open tickets. To organize work between all the business units there are multiple projects for each customer, including a project for all support and service desk requests.

To keep track of the effort I usually need to create an issue on the support project and link the issue to the service desk ticket. Since a lot of people don't do this (because it takes a couple of minutes to do all the chores) I thought it would be easier to create a manually triggered automation that, given the customer in the ticket, it automatically creates a user story in the customer support project.

I really can't figure out how to do it in the automation rules.

I found some references to use the objectsLookup smart value, but this smart value enters in every object (so if I did it with project, it would iterate over it).

Is there a way to dynamically get the correct project by filtering through the elements (like a WHERE clause in SQL, or a regex pattern) using the customer name? Is it possible at all?

Any help appreciated


Answers:
author: John Funk
body: Hi Nicolo - Welcome to the Atlassian Community!

What I do is create a custom field with the values for the projects in it (doesn't pull from anywhere, those are hardcoded in the custom field). Then I simply use this field to determine which project to create the issue in and have the automation rule also do the linkage.

comments: author: Nicolo Marchesi
body: Is that a manual input or did you automate the selection of the project?

Since the automation for the create issue step just let me use smart values instead of the project name how can I achieve this?


author: John Funk
body: It's manual when the user creates the request. Or it could be done by some other value that the reporter would understand.


author: Nicolo Marchesi
body: it's the manual part that I'm trying to avoid.

Unfortunately I wasn't able to select it dynamically, so I had to create an "for: current issue" step with an "if" step against the organizations field and a subsequent "create new" issue that hardcode the creation for the specific project.

I can't stress enough how much this is tedious and prone to errors, and also if I need a similar automation I would have to copy those steps in another automation.

I'll try experimenting with smart values but at this point I don't know if automation can support this use case at all without manual intervention.


author: John Funk
body: So, you are not able to use the Organization to identify the Jira Project using and automation rule?


author: Nicolo Marchesi
body: Update and solution: I ended up using a webrequest action to get the ProjectID and another one to extract the IssueTypeID.

It took me an afternoon of experimentation cause "smart" values are a nightmare to test.

The thing I hate most is that I needed to create a personal API token to work with the webrequest. Also not being able to search for things in Jira within the automation rules is really clunky. I'm a programmer so it's not a big deal dealing with API, but I can see someone less technical having a lot of troubles implementing something like this.

Right now I'm able to create the issue in the correct project and with the correct issue type (a story), still need to test if it works for all projects.

I will probably create a guide for this to help others.

![Screenshot 2024-07-11 183058.png](https://community.atlassian.com/t5/image/serverpage/image-id/335050i1CD0B04172AE2370/image-size/large?v=v2&px=999 "Screenshot 2024-07-11 183058.png")


Tags: cloud

jira-service-management

jira-service-management-cloud