Forums

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

I want to create a custom button to create a subtask under different link type

Arunajyothi Samala July 11, 2024

 

Hello, Need help

 

I have a request where customer wants a custom button named Create AC. when user clicks on it, it should t open create subtask issue dialog box and let the user create a subtask under a link type called "Acceptance criteria" and this button should be only available to feature issue type.

 

So far I used the xml raw script fragment from ScriptRunner to have a custom web item called create Acceptance Criteria and link it as a subtask. 


below is the script to  restrict the web item only to feature  : 

 

<web-item key='issuekey-123' name='ScriptRunner generated web item - Create Acceptance criteria' section='operations-restore' weight='1'>
    <label>Add Acceptance Criteria</label>
    <link linkId='link-create-constrained-subtask'>/jira/secure/CreateSubTaskIssue.jspa?parentIssueId=${issue.id}&amp;pid=${issue.projectObject.id}&amp;issuetype=14901</link>
    <styleClass>issueaction-create-subtask</styleClass>
    <param name="condition">issue.issueType.name == 'Feature' || issue.issueType.name == 'Epic'</param>
</web-item>

 

 

 

working script for a button to create subtask: 

 

<web-item key='issuekey-123' name='ScriptRunner generated web item - Create Acceptance criteria' section='operations-restore' weight='1'>

    <label>Add Acceptance Criteria</label>

    <link linkId='link-create-constrained-subtask'>/jira/secure/CreateSubTaskIssue.jspa?parentIssueId=${issue.id}&amp;pid=${issue.projectObject.id}&amp;issuetype=14901</link>

    <styleClass>issueaction-create-subtask</styleClass>

</web-item>

1 answer

0 votes
Ram Kumar Aravindakshan _Adaptavist_
Community Champion
January 15, 2025

Hi @Arunajyothi Samala

Were you able to find a solution for this?

Thank you and Kind regards,
Ram

Arunajyothi Samala January 15, 2025

Yes, I used the ScriptRunner Fragment called Constrained issue web item custom button and behaviour script. 

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, state of product 2026, product teams report, developer experience, product manager survey, AI impact, product team stress, product teamwork, dev workflow insights, 1000+ PMs, product leadership research

State of Product 2026

State of Product 2026: your pulse check on product development today. We asked 1000+ real teams how they’re feeling–and they had a lot to say.

Get the report
AUG Leaders

Atlassian Community Events