YouTrack REST API - how to view/add comments?

Hello guys,

Is it possible to list all comments for the issue and add new one via REST API? I want to try to copy all issues from our current bugtracker (Gemini by CounterSoft) to YouTrack, just to see how well we can work with it. And comments are really important for us :-)

Thanks,

Alexey

0
4 comments
Avatar
Permanently deleted user

also it's not clear how to set "reported by" and "assigned to" fields. I tried to use reporterName/assigneeName keys in the POST request but it did not work. I tried both user IDs and full names, neither worked.

"fixedVersion" key does not work.

Not clear how to add attachements and links.

(CLARIFICATION - by "key" I mean the following line from the REST API example posted earlier:

 p.addParameter("fixedVersion", "version 1,version 2");   

)

All these sounds like a request for full-blown REST API documentation :-) but that's not my intent. I understand that you guys have your own priorities etc. What I want is to give a good test for YouTrack in our company, and in order to do that I have to migrate our current issues. And migration itself is not a problem but there are small details which makes migration useless (unability to copy comments, reported by/assigned to, attachements fields for now). If you already have this functionality - pls post some very simple example, otherwise just let us know when we can expect API & docs.

Thanks,

Alexey

0
Avatar
Permanently deleted user

Use commands to add links and comments. POST url is:

http://localhost:8181/youtrack/rest/issue/execute/{issueID}?command={your command}&comment={your comment}&group={visible for group}

If command is null, just comment will be added.

0
Avatar
Permanently deleted user

Evgenii,

thanks a lot for the promt answer! I will give it a try today for sure. But could you please elaborate a bit - what is valid syntax for commands? For example, how should it look like for adding new links? command=addLink?

Also (and I'm sorry if i'm asking too much) - is there a way to upload attachements? :-)

Thank a lot!

Alexey

0
Avatar
Permanently deleted user

Alexey,

You can check syntax of your commands via YouTRACK UI. For example on issues list, click button "Command" or simply press Ctrl+Alt+J. You can check any your commands or even sequence of commands in "Command dialog". Since REST API has not been documented yet it's the only way to check your syntax.

For attachments you may use next POST url:

http://localhost:8181/youtrack/rest/issue/attachment/{issueID}?group={visibilityGroup}&files={your files}&name={name}

If name is specified files will be renamed to specified name.

0

Please sign in to leave a comment.