Hi,
I have a question that is either very complex or to simple for me to see it. I'll describe the usecase for better understanding.
We are using Jira Service Desk and I have a deparment that should open up a ticket and another department should continue on this. As this is not possible with JSD (because emps are no agents) we have the folloing workarround:
One department opens the ticket and the post function sends an email to the other deparment with a deep link to the CreateIssue.jspa and the entered values are prefilled.
This works very well with text fields but not with Dropdown fields, as the CreateIssue.jspa does not expect the value of the Dropdown field but the OptionId of the option.
So the question is, how can I access the OptionID of a selected value of a dropdown field with in the "Send an E-Mail" Post Function Body.
Thanks a lot for your help
Manuel
Hello @Manuel Woletz
The option ID of the options of a select dropdown are fixed, please see the following quesitons as to how to retrieve them
Using script runner as well you can do it
Hi @Tarun Sapra I found some of this answers. The question is, how can I address this in the "E-Mail Body" field of the Post Function "Send E-Mail" script.
What I do in the E-Mail Body is to write the following:
<a hef=https://<myservicedeskurl>/servicedesk/secure/CreateIssueDetails!init.jspa?pid=10700&issuetype=10001&summary=Onboarding+Friedrich+Schiller&customfield_10818=Friedrich&customfield_10819=Schiller&customfield_10817=1/Apr/19&customfield_10820=mwoletz&customfield_10867=&customfield_10822=FRISCHI&customfield_10824=Leinfelden&customfield_10825=527>Click here</>
How can I reference here the mentioned OptionID field?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Manuel Woletz
Did you try entering the custom field with the option id in string
i.e. Id option id is "234" then customfield_1200="234" in the URL
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, yes I tried this, when I do it "manually" - but the link should be created in the Post Function Send E-Mail.
So the question is: when %{1200} returns e.g. "Leinfelden" - i need to have the %{<what_do_i_put_here} to get the result "234".
Do you know what I mean?
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In order to get the Option ID you need to write code to fetch the id
And then store the value in a variable and then use that variable in the post-function email
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.
Ok @Tarun Sapra hopefully last question - How do I access the defined variable from the post-function email? I tried % / %{} / $ / ${} neither works.
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Manuel Woletz
Can you please post the screenshots of your current post-function configuration.
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.
@Tarun SapraSo i have the post function that should put the OptionID in to a variable
and after that I have the email post function that accesses the customfields and needs to acceess the variables.
Thanks for you help
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.
Hello @Manuel Woletz
To send the custom email are you using the post-function by script runner or something else? As the post-function provided by the scriptrunner offers the ability to insert values from script.
https://scriptrunner.adaptavist.com/latest/jira/builtin-scripts.html#_send_a_custom_email
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Tarun Sapra thanks we made some good progress here - just finetuning missing.
Thanks for you help!
Manuel
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.