Forums

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

Custom field condition with Scriptrunner cloud

E01807
April 16, 2019

I'd like to set a condition for a fast-track script based on the value of a custom field. I used to have this working in Scriptrunner (Server) but cannot find an example of how to work it using Scriptrunner (Cloud).

My successful old implementation was:

cfValues['Change Category']?.value == 'Fast Track'

All research done so far indicates I need to hard code the custom field ID to be something like (?!):

issueInput.fields.customfield_10107 == [value: '{{Fast Track}}'] as Map

where 10107 is the custom field ID. Which is not ideal as I'd like to refer to the name instead.

Any ideas?

2 answers

1 accepted

Suggest an answer

Log in or Sign up to answer
1 vote
Answer accepted
Kristian Walker _Adaptavist_
Community Champion
October 28, 2019

Hi Luke,

Thank you for your question.

I can confirm that ScriptRunner for Jira Server only has limited support for Dialogs as described in the documentation page located here.  

This means that with dialogs that to anything advanced such as creating a field which searches for users that you would need to write a bespoke javascript function that would search for the users that were typed in the field, as ScriptRunner for Jira Server contains no built in functionality to be able to put standard Jira custom fields such as User Picker fields on the Dialog.

I understand that this response is frustrating but please understand that the methods do not exist to create this functioanlity as explained above.

Regards,

Kristian

Luke Jones
October 31, 2019

:'(

No worries, thank you for the response.

0 votes
Kamran Ansari
August 12, 2021

Hello Luke,

I'm in a similar situation where I have a list of values (just good old strings, nothing fancy) from a custom field displayed in a select list, and I'd like to be able to offer suggestions as the user starts typing in a search text field.

I was wondering where you ended up with your problem and if you'd have any suggestions or pointers for me. I'm not a JavaScript person but I have just about enough experience in coding that I should be able to cook something up once I have the starting point. 

Thank you so much!

Kamran 

@Luke Jones 

@Kristian Walker _Adaptavist_ 

TAGS
AUG Leaders

Atlassian Community Events