Currently, I have a connection between Jira and Azure.
I want to know, if it is possible in Azure to decide to which project to save the task.
In the connection settings it lets you choose a single project. I have tried in the code to do something like this: âworkItem.projectKey =â Test ââ or âworkItem.project =â Test ââ or âworkItem.project? .Name =â Test "
But it doesnât work always save to project I selected in settings.
In this way Exalate for Azure doesnât support synching issues to multiple projects.
However, we would like to suggest you a workaround with creating multiple connections: one for each Azure project with specifying a filtering condition, i.e.:
if (replica.project.key != "FromJira") {
return
}
And set triggers to navigate synchronised issues to the needed projects.
It is just an example script, you might want to add your defined objects and your value as well.
So if you have workitem.projectKey instead of issue.projectKey, you should replace it with your object.
Kind Regards,
Andrii
Comments:
Anyer commented on 19 July 2021
Hi Andrii,
I understand that they are test script.
Really what I want to know, is how should I configure the script in Azure to be able to create the task with a key that I will send to it from Jira.
I have this configuration in the Incoming:
if(firstSync){
// Set type name from source entity, if not found set a default
workItem.typeName = nodeHelper.getIssueType(replica.type?.name)?.name ?: âTaskâ;
}
I tell you, from Jira when I go to scale, I will send the project key and the type of issue where the issue should go in Azure. I understand from what you say, that I can upload a CSV with all the project keys and then in the script Can I choose which project to save the task to? If so, how is this done?
If I understood you correctly, you might want to use Bulk Connection.
You can provide a mapping of issue keys on .csv file, so it will not be up to the particular project.