Trouble setting up Script Listener for cloning issues due to service desk agents limit

I am trying to set up the Listener "Clones an issue and links" in script runner to clone every newly created issue from a service desk project to the dev project.
If I create an issue using the service-desk-portal, being logged into my administrative account everything works fine - the issue is getting cloned with reference working to the original ticket and so on...

But if now my service desk customer account creates an issue, the issue is being created in the service desk project but not cloned to the appropriate project.

So probably the problem lies in the permission settings.. I tried already to give the right to create issues to the target project for the service desk customer but nothing changed.

 

Is there a way to execute the action by using another account?
What am i missing here?

Looking forward to your reply

Greetings, Fabian

3 answers

Hi Fab,

Have you have already spotted, the problem is caused because the external user has no permissions to create issues in the destination project.

Adding the Service Desk Customer group to the Create Issue permission of the permission schema used in the target project will not help. Only if you grant external users one by one with that permission, you will get the issues cloned.

You can work around this problem by creating a custom script that uses an internal user to create issues instead of using the external one.

 

@@Alejo Villarrubia [Adaptavist]

Thanks for your reply. Yes its about the permissions...

I am definitely interested in creating a custom script that switches the user to create issues but i have not so much of a clue how to do so.
Any advice regarding how to create that sort of script is highly appreciated.

 

The difficulty level of the custom script would depend on how complex are the issues you want to copy, but basically you will need to copy system field values, custom fields values, labels, links and attachments.

Since that would mean a lot of work, I think the best option is to open a ticket in https://jamieechlin.atlassian.net to request the possibility of choosing the user that will copy the issues.

 

 

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Sunday in Agility

You asked for it, so we delivered: images on issues have arrived

A picture tells a thousand words. And agility boards have just released their latest feature: cover images on issues – so now your board can tell a story at first glance. Upload attachmen...

671 views 3 11
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you