This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package examples | |
import com.atlassian.jira.bc.issue.IssueService | |
import com.atlassian.jira.component.ComponentAccessor | |
import com.atlassian.jira.event.issue.IssueEvent | |
import com.atlassian.jira.event.type.EventDispatchOption | |
IssueEvent event = event | |
def issue = event.issue |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.atlassian.bitbucket.event.repository.RepositoryCreatedEvent | |
import com.atlassian.bitbucket.event.repository.RepositoryPushEvent | |
import com.atlassian.bitbucket.scm.git.GitAgent | |
import com.atlassian.bitbucket.scm.git.command.GitCommandBuilderFactory | |
import com.atlassian.event.api.EventPublisher | |
import com.atlassian.sal.api.component.ComponentLocator | |
import com.onresolve.scriptrunner.canned.bitbucket.bulkedit.StringCommandOutputHandler | |
import com.onresolve.scriptrunner.canned.bitbucket.util.BitbucketBaseScript | |
import com.onresolve.scriptrunner.runner.ScriptRunnerImpl | |
import groovy.transform.BaseScript |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package examples.answers | |
import com.atlassian.jira.component.ComponentAccessor | |
import com.atlassian.jira.issue.Issue | |
import com.atlassian.jira.issue.MutableIssue | |
import com.onresolve.scriptrunner.runner.customisers.ContextBaseScript | |
import groovy.transform.BaseScript | |
@BaseScript ContextBaseScript context |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.atlassian.jira.bc.project.ProjectAction | |
import com.atlassian.jira.component.ComponentAccessor | |
import com.atlassian.jira.user.UserProjectHistoryManager | |
import com.atlassian.jira.util.I18nHelper | |
import com.atlassian.jira.util.velocity.VelocityRequestContextFactory | |
import com.atlassian.plugin.web.api.model.WebFragmentBuilder | |
def historyManager = ComponentAccessor.getComponent(UserProjectHistoryManager) | |
def user = ComponentAccessor.jiraAuthenticationContext.loggedInUser |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function ($) { | |
$(function () { | |
AJS.dialog2.on("show", function (e) { | |
var targetId = e.target.id; | |
if (targetId == "my-own-dialog") { | |
var someDialog = AJS.dialog2(e.target); | |
$(e.target).find("#dialog-close-button").click(function (e) { | |
e.preventDefault(); | |
someDialog.hide(); | |
someDialog.remove(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.atlassian.jira.component.ComponentAccessor | |
import com.atlassian.jira.issue.customfields.manager.OptionsManager | |
import com.atlassian.jira.issue.customfields.option.Option | |
def optionsManager = ComponentAccessor.getComponent(OptionsManager) | |
def customFieldManager = ComponentAccessor.getCustomFieldManager() | |
def cf = customFieldManager.getCustomFieldObjectByName("CascadingSelect") // <- change name of field | |
Closure formatOption |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package examples.docs.util | |
import java.util.regex.Pattern | |
// modify path to workflow to clean | |
def workflowIn = new File("/var/tmp/my-workflow.xml") | |
// and path of cleaned file to write | |
def workflowOut = new File("/var/tmp/cleaned-workflow.xml") | |
def parser = new XmlParser() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.onresolve.examples.xhtml | |
import com.atlassian.confluence.content.render.xhtml.* | |
import com.atlassian.confluence.content.render.xhtml.migration.UrlResourceIdentifier | |
import com.atlassian.confluence.content.render.xhtml.model.resource.DefaultEmbeddedImage | |
import com.atlassian.confluence.content.render.xhtml.model.resource.identifiers.AttachmentResourceIdentifier | |
import com.atlassian.confluence.content.render.xhtml.model.resource.identifiers.ResourceIdentifier | |
import com.atlassian.confluence.content.render.xhtml.storage.embed.StorageEmbeddedImageMarshaller | |
import com.atlassian.confluence.content.render.xhtml.storage.embed.StorageEmbeddedImageUnmarshaller | |
import com.atlassian.confluence.content.render.xhtml.storage.resource.identifiers.DelegatingResourceIdentifierMarshaller |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package examples | |
import com.atlassian.jira.component.ComponentAccessor | |
import com.atlassian.jira.issue.link.IssueLinkManager | |
def issueManager = ComponentAccessor.getIssueManager() | |
def issueLinkManager = ComponentAccessor.getComponent(IssueLinkManager) | |
log.debug("is subtask: ${issue.isSubTask()}") | |
if (issue.isSubTask()) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package examples | |
import com.atlassian.jira.component.ComponentAccessor | |
import com.atlassian.jira.issue.link.IssueLinkManager | |
log.debug("is subtask: ${issue.isSubTask()}") | |
if (issue.isSubTask()) { | |
log.debug("issue id: ${issue.id}") | |
log.debug("parent: ${issue.parentObject}") | |
def issueManager = ComponentAccessor.getIssueManager() |