Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Custom field using Script runner

Deleted user March 26, 2018

It will be great if you can help me for few requirement or direct me to one who can help here. I want to have some customization for one of my project. Below we want to achieve.

Need help building two custom fields:

1) New Custom Field1: Need help building a custom field that is a jql lookup where a user can choose among issues that are filtered via jql query and the resulting choice will show the issue key in a field. On save, the key value is clickable and will navigate the user to the chosen issue.

2) Where an issue is chosen, also add a 'features' link that will list the chosen issue among the linked issues (we have a custom linktype we've created called "features/is feature of")

3) New Custom Field2: Need help building a second custom field that calls the value of Field1. Wherever this field is shown, it will look for a Field1 value first on the Epic, then on the Story/Task. Where none is found on either, the field value should be set to the key of the current issue. This way the field will never be empty. (we will use configuration to enable these fields among different issuetypes on specific projects)

Please feel free to reach out to me or Michael if you have any question.

Thanks,
Smriti

2 comments

Comment

Log in or Sign up to comment
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 26, 2018

1) You are going to need to write an add-on to do that.  ScriptRunner can do things like scripted fields and data manipulation, but that behaviour is going to need a full-on new field for it.  (You could get most of it by simply dropping the field and using a standard issue link)

2) ScriptRunner could do that, if you implemented the field.  If you do with with an issue link, then this requirement has already been met

3)  This does not make sense.  Field1 is effectively a link to another issue.  There's no need for the second field to do any work looking for stuff, it already has a value.  So your code is just "if field 1 filled, show field 1, if not, then show current issue key"

Deleted user April 9, 2018

Thanks Nic. I will be trying something similar to what you recommended. 

TAGS
AUG Leaders

Atlassian Community Events