Fill enums from database or webhook

Hi,

is it possible to add an enum field to a project and fetch the enum values from an external resource, e.g. a database, webhook or a .csv file at least?
So if a new ticket is created the enum values should be fetch in background and should be added in the dropdown for being chosen?

Thanks for some hints how to achieve!
Alex

P.S.: youtrack standalone 2021.1

0
1 comment
Official comment

Hi Alex,

Thank you for reaching out. Generally yes, you can use YouTrack's REST API to create, update and fetch values of custom fields. Here you can find an example of adding a new value to the set of values: https://www.jetbrains.com/help/youtrack/devportal/api-usecase-add-value-to-bundle.html; and here is an example of how you can fetch issue's field value: https://www.jetbrains.com/help/youtrack/devportal/api-howto-get-value-for-specific-cf.html.

REST API specification can be found here: https://www.jetbrains.com/help/youtrack/devportal/rest-api-reference.html. YouTrack also can send REST requests to third-party services using workflows (e.g. on schedule or triggering on some events like issue creation): https://www.jetbrains.com/help/youtrack/devportal/JS-Workflow-REST-API.html.

Hope it helps. 

Please sign in to leave a comment.