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

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

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

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

  • Tried integrity checker?
  • Does this happen with safe mode enabled?

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.

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

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

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.

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.

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

;D

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Thursday in Jira

5 ways you can make the most of Jira Software and Bitbucket Cloud

As part of the Bitbucket product team I'm always interested in better understanding what kind of impact the use of our tools have on the way you work. In a recent study we conducted of software devel...

66 views 0 5
Read article

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you