Adding an "Affected Version" via Rest API

I want to automatcially add a version value to a project via the REST API. Is this possible?
6 comments
Comment actions Permalink
Hello, Rory!
Yes, it's possible. General steps are:
0
Comment actions Permalink
Thanks, Anna, I can mostly see how that would work, but if you would help me a bit more to understand I'd be grateful.

  • I don't understand the concept of a "bundle". Is this like a list? So the "Affected Versions" field is a sort of list of version values?
  • It doesn't appear that this functionality is present in the YouTrack .Net client, is this true?

Also, if you can point me in the direction of documentation for setting up REST on a hosted YouTrack instance, I'd really appreciate it. I'm having a hard time finding clear guidance on basic questions like these for version 4.0 of YouTrack when it is hosted.
0
Comment actions Permalink
Yes, bundle is a list of values, that can be used for custom field. You can go to Administration -> Your Project -> Fields tab. There is a list of custom fields there. You can click on bundle name in corresponding column and view\edit this this list of values.
What is your exact problem with setting up REST? In YouTrack REST API is always enabled. The only thing you need to know to use it - YouTrack base url. If you are using hosted YouTrack, it should be "http://<your instance name>.myjetbrains.com/youtrack".
I'm not sure about .Net client - I'm not sure now, I'll check this with my colleague.
0
Comment actions Permalink
Hi Anna -

Any luck determining if the .Net client supports adding versions to the versions bundle?
0
Comment actions Permalink
I checked the code in github. It didn't, but I added it. I'm close to having it working, but the adding is failing. Do you know if the REST verb needs to be PUT or can it be POST?
0
Comment actions Permalink
I figured it out. It looks like a limitation in the EasyHttp library used to make HTTP requests. I came up with a workaround and sent a pull request to https://github.com/JetBrains/YouTrackSharp.
0

Please sign in to leave a comment.