Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Javascript: How to get parent issue id on Create Sub-Task dialog

VINC Software July 3, 2015

Hi there!

How to get parent issue id in javascript function on Create Sub-Task dialog?

Here is a sample of that javascript:

AJS.$(document).ready(function () {
    console.log("GLOBAL_CONTEXT");
    JIRA.bind(JIRA.Events.NEW_CONTENT_ADDED, function (e,context) {
        setTimeout(function() {getParentIssueId();}, 50);
    });
});

function getParentIssueId(){
	// I can't get parent issue id here as I can issueType
    var issueType = AJS.$('#issuetype').text();
    console.log(issueType);
}

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Liston Ogana July 16, 2015

Hello, 

From the pop up screen you can get the issue ID from the title on the page which contains the parent ID.

AJS.$('title').text()

 

 

TAGS
AUG Leaders

Atlassian Community Events