Default value for custom field based on JQL query

Chris L November 17, 2016

Is it possible to default a Task custom field based upon a value set in the Story it is contained within? I assume via the use of JQL...

Scenario:

Given a user is viewing a Story
And the Story that has a custom field ('Team') set to a particular value ('A' or 'B')
When the user selects to create a Task
Then the Task custom field ('Team') defaults to the same value ('A' or 'B')

1 answer

2 votes
Jon Bevan [Adaptavist]
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.
November 17, 2016

Hi Chris L,

If you use ScriptRunner for JIRA you could create a postfunction script that set the custom field value after the "create" transition, and base the value of the custom field on the specified Story.

Let me know if you need more details.

Thanks, Jon

Chris L November 18, 2016

Thanks, Jon. I have no experience with ScriptRunner - how difficult would it be to create a postfunction script to do this?

Chris L November 18, 2016

Ah, it also comes at a cost, which I wouldn't be able to get approved for just this unfortunately.

Suggest an answer

Log in or Sign up to answer