Question about reason JIRA.CONTENT_ADDED_REASON.dialogReady


I have a question about this reason.

When is actually triggered/set? The docs says:

When any dialog is ready to be rendered. The context is the content of the dialog.

Dialog means a popup like Create Issue?
I am trying to use this reason to bind some jquery commands when the Create Issue popup is displayed, but sometimes these commands are not executed.

Thanks in advance,

Here’s how I’m able to bind some JS code to the rendering of one particular dialog box.

// The dialogContentReady event is triggered by Dialog.js in the JIRA code base. It's no good binding to the
// '' event because that event is thrown before the content has been added to the dialog.
JIRA.bind('dialogContentReady', function(event, dialog) {

    // We only want the JIRA dialog that has an id starting with the string 'workflow-transition-'
    dialog.$popup.filter('div[id^=workflow-transition-]').each(function() {
1 Like

Thanks! I will give that code a try.