I'm looking to restrict the subtask creation to less than or equal to 10 using Automation for Jira p

Kotakonda, Bhargavi May 11, 2023

I'm looking to restrict the subtask creation to less than or equal to 10 using Automation for Jira plugin .Can any help me on that .

Thanks in advance .

1 answer

1 accepted

2 votes
Answer accepted
Florian Bonniec
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 11, 2023

Hi @Kotakonda, Bhargavi 

You cannot do that using automation as automation is trigered by events. So it would required the user to create the subtask, check if there is less than 10 then delete the issue if it's not what you want to achieve I guess.

 

What you want is to prevent user to create a sub-task if there is already 10. I don't really know you want to implement such limitation but I would have try to do it using a validator from Scriptrunner for instance to achieve that.

 

Regards

Kotakonda, Bhargavi May 11, 2023

@Florian Bonniec can i know how can i implement the same using script runner

Florian Bonniec
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 11, 2023

Simple Script validator with this code

 

def passesCondition = true
if(issue.parentObject.getSubTaskObjects().size() >= 10){
    passesCondition = false
}
return passesCondition;

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
VERSION
9.4.4
TAGS
AUG Leaders

Atlassian Community Events