How to link new story to an Epic automatically while creating??

Deleted user January 15, 2020

Hello All,

When creating a new story it has to link automatically to an particular Epic.

Thanks in advance,

ch

2 answers

1 accepted

0 votes
Answer accepted
Leo
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 16, 2020

Hi @[deleted],

Below Behaviour script may give you some idea

def labels = getFieldByName("Labels")
def lbls = labels.getFormValue() as String

if(lbls.contains("label name")){
getFieldByName("Epic Link").setFormValue("JRA-3")

Note: you need place this script for Labels field

 

BR,
Leo 

Deleted user January 17, 2020

Hi @Leo 

It is not working.
Epic.PNG

Leo
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 17, 2020

Is it not updating Epic Link field? can you include else part in the script and try to update other epic for testing?

Deleted user January 18, 2020

tried with the below script still it is not working

def labels = getFieldByName("Labels")
def lbls = labels.getFormValue() as String

if(lbls.contains("Test")){
getFieldByName("Epic Link").setFormValue("DONE-12")
} else {
getFieldByName("Epic Link").setFormValue("DONE-14")
}

Deleted user January 19, 2020

Hi @Leo

Epic link is now updating with the below script.

def labels = getFieldById(getFieldChanged())
String lbls = labels.getValue() as String

if(lbls.contains("Test1")) {
getFieldByName("Epic Link").setFormValue("DONE-12")
} else if(lbls.contains("Test")) {
getFieldByName("Epic Link").setFormValue("DONE-14")
}

Thanks for the help.

0 votes
Lenin Raj
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 15, 2020

Hi @[deleted] 

 

If you can open the Epic issue and add issue from that page, it will be linked to that particular Epic automatically.

Deleted user January 16, 2020

Hi @Lenin Raj

Thanks for the reply.

What i mean is when user creating a story it should automatically populate required Epic in Epic Link field depends on Label selection on create screen.

Thanks,

ch

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events