This is the home of the Jira Scripting Suite space.

Navigate space

Recently Updated

  • No labels

6 Comments

  1. Unknown User (careflight)

    This looks like an interesting plugin.  Perhaps a link to the plugin page?

  2. Unknown User (skloehr)

    Please remove this post. I added it to the scripting samples post.

  3. Unknown User (jrubial)

    Hello,

    I'm new with JSS I´m trying to create a sub-task in a post-function in JIRA 4.3.4 and jython 2.5.0, I based the following example:

    from com.atlassian.jira.util import ImportUtils
    from com.atlassian.jira import ManagerFactory
    from org.ofbiz.core.entity import GenericValue
    from com.atlassian.jira import ComponentManager
    from com.atlassian.jira.issue import Issue

    issueManager = ComponentManager.getInstance().getIssueManager()
    issueFactory = ComponentManager.getInstance().getIssueFactory()
    authenticationContext = ComponentManager.getInstance().getJiraAuthenticationContext()
    subTaskManager = ComponentManager.getInstance().getSubTaskManager();
     
    issueObject = issueFactory.getIssue()
    issueObject.setProject(issue.getProjectObject()) --------------------> Have I missed something here??
    issueObject.setIssueTypeId("5") # default sub-task issue type
    issueObject.setParentId(issue.getId())
    issueObject.setFixVersions(issue.getFixVersions())
    issueObject.setAffectedVersions(issue.getAffectedVersions())
    issueObject.setPriority(issue.getPriority())
     
    issueObject.setSummary("Realisierung")
    issueObject.setAssignee(issue.getAssignee())
    subTask = issueManager.createIssue(authenticationContext.getUser(), issueObject)
    subTaskManager.createSubTaskIssueLink(issue.getGenericValue(), subTask, authenticationContext.getUser())

    The problem is that when I run the workflow transaction I get this error:

    ERROR

    root cause: Traceback (most recent call last): File "<string>", line 13, in <module> TypeError: setproject (): 1st arg can not be Coerced to org.ofbiz.core.entity.GenericValue

    Help please

  4. Unknown User (wflespeak6)

    issue.getProjectObject() yields a project object.

    Then you can call getGeneric Value()

    So it should probably look like:

    issueObject.setProject(issue.getProjectObject().getGenericValue())

  5. Unknown User (wfles@peak6.com)

    I am trying to use jss with atlassian active objects and a plugin I wrote using AO.  When I go to import my class it states "Import Error".  Is the classpath only looking at /opt/jira/atlassian-jira/WEB-INF/lib, and not type 2 plugins (/opt/jira-data/plugins/installed-plugins)?  Is there any way to modify the search path?

  6. Unknown User (diegobowen)

    Hello everyone, I so so new...I need to create a new issue on a transition.  The reason why I want to do that instead of creating a sub-task is because I want the issue to show up in the filters and functional area work queue. I was able to use the script above however are there any javadoc or api doc that I can reference to find out how to create an issue?