Post-function on Create Issue transition appears to not work

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform Notice: Data Center - This article applies to Atlassian products on the Data Center platform.

Note that this knowledge base article was created for the Data Center version of the product. Data Center knowledge base articles for non-Data Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Symptoms

You have added a post-function to the Create Issue transition of a workflow e.g set issue field or assign to current user and it doesn't seems to be working.

Diagnosis

On observation, this post-function is ordered under the "Creates the issue originally" post-function in the list as shown below.

Exception in the logs

https-openssl-nio-443-exec-57 url: /secure/CreateIssueDetails.jspa; user: test.test@test.com ERROR test.test@test.com 422x3832786x5 t/secure/CreateIssueDetails.jspa [c.g.j.workflow.function.UpdateIssueCustomFieldPostFunction] Unable to update field customfield_15519 - Watchers List in issue [MARCH-3887].java.lang.IllegalArgumentException: User 'test.test@test.com' not found.    at ch.beecom.jira.jsu.util.field.FieldTypeConverter.convertValueToUser(FieldTypeConverter.java:1104)    at ch.beecom.jira.jsu.util.field.FieldTypeConverter.lambda$convertValueToMultipleUsers$6(FieldTypeConverter.java:1130)    at ch.beecom.jira.jsu.util.field.FieldTypeConverter.convertAsDelimitedStringToTypedList(FieldTypeConverter.java:1083)    at ch.beecom.jira.jsu.util.field.FieldTypeConverter.convertValueToMultipleUsers(FieldTypeConverter.java:1132)    at ch.beecom.jira.jsu.util.field.FieldTypeConverter.convertToRightObject(FieldTypeConverter.java:299)    at ch.beecom.jira.jsu.workflow.function.updateissuecustomfield.UpdateIssueCustomFieldPostFunction.performUpdateIssueField(UpdateIssueCustomFieldPostFunction.java:269)    at ch.beecom.jira.jsu.workflow.function.updateissuecustomfield.UpdateIssueCustomFieldPostFunction.executeFunction(UpdateIssueCustomFieldPostFunction.java:175)    at ch.beecom.jira.jsu.workflow.function.AbstractPreserveChangesPostFunction.executeFunction(AbstractPreserveChangesPostFunction.java:46)    at ch.beecom.jira.jsu.workflow.precondition.AbstractPreconditionAwareFunction.execute(AbstractPreconditionAwareFunction.java:69)    at com.opensymphony.workflow.AbstractWorkflow.executeFunction(AbstractWorkflow.java:1014)    at com.opensymphony.workflow.AbstractWorkflow.transitionWorkflow(AbstractWorkflow.java:1407)    at com.opensymphony.workflow.AbstractWorkflow.initialize(AbstractWorkflow.java:606)    at com.atlassian.jira.workflow.OSWorkflowManager.createIssue(OSWorkflowManager.java:754)    at com.atlassian.jira.issue.managers.DefaultIssueManager.createIssue(DefaultIssueManager.java:578)    at com.atlassian.jira.issue.managers.DefaultIssueManager.createIssue(DefaultIssueManager.java:487)    at com.atlassian.jira.issue.managers.RequestCachingIssueManager.createIssue(RequestCachingIssueManager.java:195)


Cause#1

Any post-functions placed after the "Creates issue originally" function will not have updates to the issue persisted to the database.

For this to work, it is required that your post-function comes before the "Creates the issue originally" post-function in the order of postfunctions as shown below.

Cause#2


Resolution#1

Re-order the post-functions such that the new post-function comes before the "Creates the issue originally" post-function.
( hovering over the post-functions would expose arrow shaped icons that you can use to change the order of the post-functions) 

Older JIRA versions actually automatically created the new post-function under the 'Create the issue originally' post-function, but newer JIRA versions automatically positioned the postfunction correctly.

Resolution#2

Modify the custom field value  in PostFunction with a user that exists and is active in JIRA

Notes

This behaviour is being reviewed at  JRASERVER-33182 - Getting issue details... STATUS

Last modified on Nov 15, 2024

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.