Hi everyone,
I'm on Cloud and trying to find a way to get the translation mapping for Issue Priority (and the other issue attributes) through the REST APIs but I can't find anything that can work. I'm configuring the translations through https://<my_cloud_instance>/secure/admin/ViewTranslations!default.jspa?issueConstantType=priority
When I use translated values like that I receive them when using the "get issue" REST (/rest/api/2/issue/<issue_key>) but I only get the translated value and there is no way for me to get the original value based on this.
{"self":"https://<my_cloud_instance>/rest/api/2/priority/2","iconUrl":"https://<my_cloud_instance>/images/icons/priorities/high.svg","name":"Translated High","id":"2"}
I need it to create a JQL query using the original name because priority = "Translated High" doesn't work, it requires to be priority = "High"
Any ideas will be appreciated.
Thanks,
Georgi
Hi,
Did you try the "name" property from /rest/api/latest/field?
Moreover, it has "clauseNames" which is basically the field name options that you can use in JQL query
Hi Alexey,
Thanks for your reply but I don't need the actual name for the property field, I need the translation mapping for the values of the field. In my example I need to know that if I get the priority "Translated High" it corresponds to the original value "High".
If I use the /rest/api/latest/field API all I get is how to use the priority field which I'm already doing and no information about the values or am I missing something?
{"id":"priority","key":"priority","name":"Priority","custom":false,"orderable":true,"navigable":true,"searchable":true,"clauseNames":["priority"],"schema":{"type":"priority","system":"priority"}}
Thanks,
Georgi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Oh, sorry.
Is there a reason why you can't use priority ID in the JQL search query? It's the most robust option
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Alexey,
Thanks for the suggestion. I'm going to use the ID for the priority field but I am not sure it will work for all of the other fields that allow translations (such as Request Type). At any rate, I will investigate and see how I can implement most of the use cases until (if ever) Atlassian releases a way to get the translations through API.
Thanks again :)
Regards,
Georgi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi everyone
One way is described here https://jira.atlassian.com/browse/JRACLOUD-71793.
I was able to verify that the use of headers made it possible to obtain the values in the desired language, using both headers :
'Accept-Language': 'pl',
'X-Force-Accept-Language': 'true'
More information here : https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#special-request-headers
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.