Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Create issue with Elements and update multi issue picker (script runner)

Lior Efraim
Contributor
June 6, 2023

Hi,

 

we use both "elements copy and sync" and Script Runner (=SR) on Jira server instance.

i want to create an operation on Elements to create a new issue, and when the issue is created update a "multi issue picker" (=MIP, which is a SR scripted field) with the new issue.

one way i thought about is to create the link with elements as well in the same operation and write a script to trigger and update the field.

but i'm trying to understand if it's possible to add this issue to the MIP directly, by using the built in "Elements" field mapping functionality or something else that directly update the field.

 

i've tried using "Velocity" language on Elements to map "#issue" to the field, it's not working.

 

thanks for any help in advance!

3 answers

0 votes
Lior Efraim
Contributor
June 10, 2023

Hi everyone,

 

just to close the loop on this subject - contacted "Elements" support - this functionality is not supported \ not possible for now using elements copy and sync.

groovy script - here we go, i guess .

0 votes
Julie d_Antin _Elements_
Atlassian Partner
June 8, 2023

Hi @Lior Efraim 

I shared your question with our support team yesterday, but without details of your configuration it's a bit hard to make a suggestion (other than do you also have a synchronization activated?). You can get help from Elements Support here.

Lior Efraim
Contributor
June 8, 2023

Hi Laura,

 

thanks! i've opened a support ticket for Elements.

haven't used "syncronization", are you suggestingto use it? can y ou elaborate how in this specific example?

0 votes
PD Sheehan
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 6, 2023

I've never used Elements Copy & Sync and I don't have access to it to really try. But I've working with MIP plenty.

Are you trying to apply the source issue as a value in the target issue MIP?

If so, I can't see why you can't use the built-in mapping functionality.

In the Elements mapping, select the MIP field for your target and try to set the mapping value to velocity value:

[$issue.key]

The [ ] will make this a "multi value" array with a single item. And $issue.key should represent the currently issue (source).

Lior Efraim
Contributor
June 6, 2023

Hi Peter,

thanks for "plunging in" to assist.

i did your suggestion "[$issue.key]" and i get this error message:

"

class java.lang.String cannot be cast to class com.atlassian.jira.issue.Issue (java.lang.String is in module java.base of loader 'bootstrap'; com.atlassian.jira.issue.Issue is in unnamed module of loader org.apache.catalina.loader.ParallelWebappClassLoader @30338883)

"

the issue is created and link is created as well, but i get the error and the MIP field is not updated.

any ideas?

PD Sheehan
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 7, 2023

The only other thing I would suggest you try is

[$issue.id]

If that still doesn't work, you'll have to populate that field after the fact using a Scriptrunner Listener groovy script. Or contact the Elements vendor to see if they have encountered that and have a solution.

Like Lior Efraim likes this
Lior Efraim
Contributor
June 7, 2023

not working :(

will try to contact the vendor.

thanks!

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
TAGS
AUG Leaders

Atlassian Community Events