Forums

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

Can you help with behaviour on service desk to populate fields on form using existing issue

Nicole Downes
Contributor
February 16, 2020

We create an issue using a recruitment request on the Service desk. This issue contains data such as job title, start date, office, business unit, etc.

I would like to populate the same fields in our Onboarding request in the Service Desk using the information already entered on the recruitment request.

I have created an Issue Picker scripted field to allow the user to select the correct recruitment request. 

I have been advised I need to use the behaviours getValue() method with the issueManager.getIssueByCurrentKey("issuekey") method to get the issue object. But I just don't know how to structure up the script to achieve it.

Can someone provide a sample of how this would be achieved. Please include all imports and definitions as well.

1 answer

1 accepted

Suggest an answer

Log in or Sign up to answer
0 votes
Answer accepted
JamieA
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 Champions.
December 10, 2015

You can probably just do a cast there:

DateUtils.getDurationString(Math.round((timeDiff / 1000) as Double))

Not exactly sure what's going on, but it's obviously having trouble inferring the type for "timeDiff / 1000".

It's safe to ignore the type checking information... https://scriptrunner.adaptavist.com/latest/jira/#_static_type_checking

Conor McGmail
December 11, 2015

Thanks Jamie. That worked a treat!

TAGS
AUG Leaders

Atlassian Community Events