2

is it possible to perform a HTTP request in YouTrack workflow?

I would like to create a workflow that calls some REST API whenever user logs some time on an issue.

Daniel A. White
  • 187,200
  • 47
  • 362
  • 445
Igor
  • 592
  • 2
  • 9
  • 31

2 Answers2

0

YouTrack workflow rules run inside a pretty restricted sandbox. Currently, there're no means to do what you want.

Alex.V
  • 2,081
  • 14
  • 13
-1

YouTrack Workflows are providing some methods to communicate with foreign servers:

https://www.jetbrains.com/help/youtrack/standalone/2017.1/Workflow-REST-API.html

A simple example (taken from the link above):

// post new issue content to third-party tool and add response as a comment

when issue.becomesReported() {
    addHttpHeader("Content-Type", "text/html");
    var response = doHttpPost("http://server.com/issueRegistry", issue.description);
    issue.addComment(response)
}

I've never worked with timetracking inside YouTrack, so no concrete example is here. But on page linked above, there is a section with "Custom Time Tracking with the Harvest Web Service", maybe you can adapt some code from there.

Nepomuk Pajonk
  • 2,972
  • 1
  • 19
  • 29