Forums

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

On Create Issue: set the Description Based on the Component (like a Template) - Scriptrunner

Shannon Davis
Contributor
November 17, 2020

I am trying to use ScriptRunner behaviors to set up a default description based on the selected component.  I have configured the Behavior and associated it to a Project and Issue Type.  

Initially I was using the Initializer as in the example, but that sets a Default Description before the Component is set.

So I moved my script to the Component field, assuming that when I select a Component, the description will update.  That is NOT what is happening.  The script doesn't appear to run when the component field is changed.

Questions:

Is this possible? (on the Create Issue screen, having the Description update based on the Component selection)

If possible, is this the correct way to accomplish?

If possible, how does this script look to you?  

scriptrunner_componentsetdescription.jpg

2 answers

Suggest an answer

Log in or Sign up to answer
0 votes
Joe Bkk
November 1, 2020

Hi Nir,

Thank you for your reply.

I've merged 2 script into 1 but it still doesn't work.

However, I notice that if I don't do fast-track (script runner) for this transition. Everything will work perfectly. Once I do fast track, I will have this problem immediately.

I believer something is related to the fast track.

Nir Haimov
Community Champion
November 1, 2020

So seems like you answer to your-self :)

Seems like the fast-track not performing the post-function script (and maybe all other post-functions you have in this step)

0 votes
Nir Haimov
Community Champion
October 30, 2020

Hi @Joe Bkk 

Why are you creating this as 2 different post functions?

It might be that the sub-task not showing yet because the process of the workflow transition not finished.

I would suggest to it all in one post-function, no reason to make 2, specially if 1 depend the other

TAGS
AUG Leaders

Atlassian Community Events