Upgraded from Jira 4.0.1 to Jira 5.1.2 - error when reopening closed issue - Unable to update custom field

Dave Prigg January 9, 2013

error : Unable to update custom field 'customfield_10371' ....

The interesting thing about this error is that the custom field listed is not valid for this issue type.

I have upgraded to Jira Suite Utilities to version 1.3.2.

From the log: com.opensymphony.workflow.WorkflowException: Unable to update custom field customfield_10371 - <custom field name> in issue [ERX-*****].
at com.googlecode.jsu.workflow.function.UpdateIssueCustomFieldPostFunction.executeFunction(UpdateIssueCustomFieldPostFunction.java:94)
at com.googlecode.jsu.workflow.function.AbstractPreserveChangesPostFunction.execute(AbstractPreserveChangesPostFunction.java:59)
at com.opensymphony.workflow.AbstractWorkflow.executeFunction(AbstractWorkflow.java:1050)
at com.opensymphony.workflow.AbstractWorkflow.transitionWorkflow(AbstractWorkflow.java:1446)
at com.opensymphony.workflow.AbstractWorkflow.doAction(AbstractWorkflow.java:564)
at com.atlassian.jira.workflow.OSWorkflowManager.doWorkflowActionInsideTxn(OSWorkflowManager.java:894)
at com.atlassian.jira.workflow.OSWorkflowManager.doWorkflowAction(OSWorkflowManager.java:850)
at com.atlassian.jira.bc.issue.DefaultIssueService.transition(DefaultIssueService.java:449)
at com.atlassian.jira.web.action.issue.CommentAssignIssue.doExecute ...

.

9 answers

1 accepted

0 votes
Answer accepted
Dave Prigg January 21, 2013

The work around to remove the restriction of the issue types and make it valid for all issues allowed the Post function to work. We will also test the script runner suggested by Renjith

0 votes
Darren Houldsworth January 16, 2013

Thanks Renjith, we will give the Script Runner a try.

;D

0 votes
Renjith Pillai
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 16, 2013

The only way I can think of is again the Script Runner which can have an if condition to update the field only if the issue type is a specific one. Otherwise I am afraid that you should have different workflows.

0 votes
Dave Prigg January 15, 2013

The workaround that Darren mentioned above (i.e. making the field valid for all issue types) fixes the problem with post function failing. However, we would still like to know if there is a better way to manage this with workflows rather than having 2 workflows that are almost the identical.

0 votes
Darren Houldsworth January 13, 2013

The problem here is that the custom field is only valid for 2 issue types (we have 7 issue types). For an invalid issue type, it tries to set the value on the post function which is why it fails. It didn't fail in 4.0.1, but it does in 5.1.2 now.

I guess we need two separate workflows, one for issues types with customfield_10371, and one for issue types without that custom field, then the workflow scheme is used to decide which workflow for which issue type.

The problem now is maintenance. We essentially have two identical workflows that only differ by a single post function.

Or is there a better way to manage the workflows?

Thanks!

;D

0 votes
Darren Houldsworth January 13, 2013

The problem here is that the custom field is only valid for 2 issue types (we have 7 issue types). For an invalid issue type, it tries to set the value on the post function which is why it fails. It didn't fail in 4.0.1, but it does in 5.1.2 now.

I guess we need two separate workflows, one for issues types with customfield_10371, and one for issue types without that custom field, then the workflow scheme is used to decide which workflow for which issue type.

The problem now is maintenance. We essentially have two identical workflows that only differ by a single post function.

Or is there a better way to manage the workflows?

Thanks!

;D

0 votes
Dave Prigg January 10, 2013

Thanks Louis, The issue type is not valid for this custom field. In addition, I found that there is a post function that appears to set a default value during the reopen. After seeing the post function I expected this to fail in JIRA 4.0.1 also but it did not. Something may have changed with the Jira Suite Utilities plugin.

0 votes
Renjith Pillai
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 10, 2013
  • Tried integrity checker?
  • Does this happen with safe mode enabled?
0 votes
Luis Mayora
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 10, 2013

It seems to me that you have to check the customfield id and make sure the customfield is valid for that issue type

Suggest an answer

Log in or Sign up to answer