It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Post function on Create transition not working Edited

My post function on the create transition is not firing, or if it is firing isn't updating the issue. What I am trying to do is, if the issue created is a story, to move the issue immediately forward to a certain part of the workflow. I've tested the post function on transitions other than the create transition and it works fine. I have also tried re-ordering the post functions with the script going first, last, in-between. 

I've also added two post functions that might be interfering with it.

  1. Creates the issue originally.
  2. Set issue status to the linked status of the destination workflow step.
  3. Stores updates to an issue (no change history is created).
  4. Re-index an issue to keep indexes in sync with the database.
  5. Fire a Issue Created event that can be processed by the listeners.

#Jython code

from com.atlassian.jira.component import ComponentAccessor

if (issue.getIssueType().name == "Story"):
     currentUser = ComponentAccessor.getJiraAuthenticationContext().getLoggedInUser()
     issueService = ComponentAccessor.getIssueService()
     issueInputParameter = issueService.newIssueInputParameters()
     transitionValidationResult = issueService.validateTransition(currentUser, issue.getId(),101,            issueInputParameter)
     if transitionValidationResult.isValid():
          issueService.transition(currentUser, transitionValidationResult)

3 answers

Hi guys,

Any update, We are also facing the same problem that the script works in the other transition but create transition.

 

Thanks,

Sibi.K

Did anybody find a resolution to this?

 

Thanks

Mike

Suggest an answer

Log in or Sign up to answer
TAGS

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you