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.
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.
YouTrack workflow rules run inside a pretty restricted sandbox. Currently, there're no means to do what you want.
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.