Hi,
Can anybody suggest how to retrieve the Reporter's language so that I can use it in a Groovy Script condition?
I tried this:
issue.get("reporter")?.language=="German"
but it does not work.
Thanks for help
Paul
In a JMWE groovy script, you can use this code:
import com.atlassian.jira.user.UserLocaleStore;
UserLocaleStore localeStore = getComponent(UserLocaleStore);
def locale = localeStore.getLocale(issue.reporter);
locale.language == "de"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Perhaps this issue will be of help to you
https://community.atlassian.com/t5/Jira-questions/How-to-find-User-s-Language-in-Jira/qaq-p/1101468
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
And most likely this in scriptrunner
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for you fast reply.
I found that suggestion but I do not understand how to use it in groovy script.
Can you suggest how?
Paul
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Paul Wilkinson where do you place that code you want to write? On a PF within a workflow? On a listener? Which app do you use?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.