Restrict the connections names based on the source project

Originally asked by Venkatesh Pokala on 29 September 2020 (original question)


Hi Team,

Now, If I click the “exalate” option. I could see all the available connections from the instance. But is there any possibility to restrict the connections?

Because we have 150+ local to local sync connections. Every time it is very difficult to pick the connection name from the list.

Thanks,

Venkatesh.


Comments:

Francis Martens (Exalate) commented on 29 September 2020

Venkatesh Pokala - why do you have some many connections?

Venkatesh Pokala commented on 30 September 2020

Hi Francis Martens (Exalate),

would be is it possible to hide connections in the drop-down menu? Example. Project X members would only see connections: X > Y, X > Z, but not Z > Y or Y > Z. Currently all the connections are visible in the dropdown menu.

To answer your questions- I have created many local single project connections for each project sync request.

Thanks,

Venkatesh.

Francis Martens (Exalate) commented on 30 September 2020

Having so many connections is most cases not necessary. Most of the logic can be contained in one connection, unless each connection has specific requirements.

How different is each connection?

I’m asking - as if the number of connections can be reduced - you don’t need the feature to limit the connections in the drop down.

Do you agree?

Venkatesh Pokala commented on 30 September 2020

Yes, I agree but in my case below is one example.

One Source bug and 100+ destination projects

Each bug based on the product, the developer has to decide and clone the ticket by using the connection.

So I created projects to project connections. Is there any other possibility?

Answer by Francis Martens (Exalate) on 30 September 2020

Hi Venkatesh Pokala,

Check out the Service Desk to multiple projects example configuration.

What you can have on your source project - a custom field where the user selects the target project.

On the incoming sync side, you then map this to the issue.projectKey.

One connection is then sufficient.


Comments:

Venkatesh Pokala commented on 01 October 2020

Hi Francis Martens (Exalate)

This needs advance connection, right?

Thanks,

Venkatesh.

Francis Martens (Exalate) commented on 01 October 2020

Yes - correct.

Venkatesh Pokala commented on 01 October 2020

Hi Francis Martens (Exalate),

Can you please provide a basic script to start? Because this is the first time trying “advance option”

Thanks in advance.

Regards,

Venkatesh.

Francis Martens (Exalate) commented on 01 October 2020

The advanced section is not that different from the ‘single project’.

What you need to do is

  • On source - create a custom field with all the target project and link this to the source project
  • Add the custom field in the outgoing processor such that it is part of the replica
  • On the incoming side,
    • Calculate the target project based on the information of the replica
    • Set the issue.projectKey field to the calculated target project
  • Test

Hope this helps.