[tele2.nl] Jira Subtask with demo and test Bookmarklet

Creates subtask demo+test on Jira

Source (jira.com)


Download Bookmarklet:


View Bookmarklet Code:

Bookmarklet Source Code:

javascript%3A%28function%28%29%257Bvar%2520teamFieldId%2520%253D%2520%2522customfield_14313%2522%253Bvar%2520teamValue%2520%253D%2520%252228442%2522%253Bvar%2520appFieldId%2520%253D%2520%2522customfield_14612%2522%253Bvar%2520appValue%2520%253D%2520%252227549%2522%253Bvar%2520assignLinkId%2520%253D%2520%2522assign-to-me-trigger%2522%253Bvar%2520createAnotherId%2520%253D%2520%2522qf-create-another%2522%253Bvar%2520createButton%2520%253D%2520%2522create-issue-submit%2522%253Bvar%2520summaryFieldId%2520%253D%2520%2522summary%2522%253Bvar%2520dialogTitleClass%2520%253D%2520%2522.jira-dialog-heading%2522%253Bvar%2520button%2520%253D%2520document.getElementById%28%2522create-subtask%2522%29%253Bvar%2520dialog%252C%2520i%253D0%253Bif%2520%28button%29%2520%257Bbutton.click%28%29%253BtimerCall%28function%28i%29%2520%257Bdialog%2520%253D%2520document.getElementById%28teamFieldId%29%253Bif%2520%28dialog%29%2520%257BcreateTestSubtask%28%29%253Breturn%2520true%253B%257Dreturn%2520false%253B%257D%29%253B%257D%252F%252F%2520Create%2520a%2520Test%2520Taskfunction%2520createTestSubtask%28%29%2520%257Bvar%2520field%253Bdebugger%253Bfield%2520%253D%2520document.getElementById%28teamFieldId%29%253Bif%2520%28field%29%2520field.value%2520%253D%2520teamValue%253Bfield%2520%253D%2520document.getElementById%28appFieldId%29%253Bif%2520%28field%29%2520field.value%2520%253D%2520appValue%253B%252F%252F%2520Not%2520assigned%2520for%2520nowfield%2520%253D%2520document.getElementById%28createAnotherId%29%253Bif%2520%28field%29%2520field.click%28%29%253Bfield%2520%253D%2520document.getElementById%28summaryFieldId%29%253Bif%2520%28field%29%2520field.value%2520%253D%2520%2522Test%2522%253B%252F%252F%2520Event%253A%2520When%2520this%2520task%2520is%2520saved%252C%2520create%2520another%2520onefield%2520%253D%2520document.querySelector%28%2522.jira-dialog-heading%2522%29%253BsetCreateTaskObserver%28field%252C%2520createDemoSubtask%29%253Bfield%2520%253D%2520document.getElementById%28createButton%29%253Bif%2520%28field%29%2520field.click%28%29%253B%257D%252F%252F%2520Create%2520a%2520Demo%2520Taskfunction%2520createDemoSubtask%28%29%2520%257Bvar%2520field%253Bfield%2520%253D%2520document.getElementById%28summaryFieldId%29%253Bif%2520%28field%29%2520field.value%2520%253D%2520%2522Demo%2522%253B%252F%252F%2520Event%253A%2520When%2520this%2520task%2520is%2520saved%252C%2520leave%2520control%2520to%2520user%2520for%2520the%2520next%2520onefield%2520%253D%2520document.querySelector%28dialogTitleClass%29%253BsetCreateTaskObserver%28field%252C%2520afterDialogOpen%29%253Bfield%2520%253D%2520document.getElementById%28createButton%29%253Bif%2520%28field%29%2520field.click%28%29%253B%257D%252F%252F%2520Event%2520triggered%2520when%2520task%2520is%2520created%2520%28after%2520pressing%2520%27Create%27%2520button%29function%2520setCreateTaskObserver%2520%28node%252C%2520callback%29%2520%257Bif%2520%28MutationObserver%29%2520%257Bvar%2520config%2520%253D%2520%257B%2520attributes%253A%2520false%252C%2520childList%253A%2520true%252C%2520characterData%253A%2520false%2520%257D%253Bvar%2520observer%2520%253D%2520new%2520MutationObserver%28function%28mutations%29%2520%257B%252F%252F%2520mutations%2520has%2520the%2520changes%252C%2520we%2520don%27t%2520need%2520to%2520check%2520themcallback%28%29%253Bobserver.disconnect%28%29%253B%257D%29%253Bobserver.observe%28node%252C%2520config%29%253B%257D%257Dfunction%2520afterDialogOpen%28%29%2520%257Bvar%2520field%253Bfield%2520%253D%2520document.getElementById%28assignLinkId%29%253Bif%2520%28field%29%2520field.click%28%29%253Bfield%2520%253D%2520document.getElementById%28summaryFieldId%29%253Bif%2520%28field%29%2520%257Bfield.value%2520%253D%2520%2522%2522%253Bfield.focus%28%29%253B%257D%257D%252F%252F%2520Uses%2520interval%2520to%2520wait%2520for%2520a%2520conditionfunction%2520timerCall%2520%28callback%29%2520%257Bvar%2520interval%2520%253D%2520setInterval%28function%28%29%257Bif%2520%28callback%28i%29%2520%257C%257C%2520i%252B%252B%2520%253E%252012%29%2520%257BclearInterval%28interval%29%253B%257D%257D%252C%25201000%29%253B%257D%257D%29%28%29


Rate it:


Tags:

Comments

Comments so far. Add yours.