Is there a way to create a link that will execute a YouTrack command such as clone issue?

438 views Asked by At

The "Generate Issue Template URL" functionality is clunky, and I'm try to work around it. I have a webpage outside of YouTrack with a list of links containing different templates for ticket writers. Any time a template changes we have to click the "generate issue template" then go update that link on our other web page. It would be nice to simply link to a template, by ID, that when saved will create a new issue or instead link directly to the clone command. The intent is that we won't have to update our template links going forward, and ticket writers will always get the latest version of the template they need.

Ideally it would be best if the entire call to YT could be in the href attribute of a link, but using AJAX is an option as well.

YT Version: 2021.3.22256

I've tried this, and a couple of variations, with no luck:

<a href="[myYouTrack]/api/commands/execute?clone=issue-1">Template 1</a>
1

There are 1 answers

0
Jk1 On

In YouTrack there's no link you can pass a command into to get get it executed.

What you can do is to compose a workflow script to autofill issue fields as required. The only remaining bit is some kind of trigger to get script started. For that you can still use "Generate Issue Template URL" functionality with a single fields or any other marker to let the script recognize the right change to react to.