persistent error in ccm logs
Hi,
I see following error consistently in the ccm log. It looks like every time the workitem is saved the error gets logged. I have a calculated value provider (with dependencies defined). When the dependent field changes, the value provider gets triggered and returns calculated value without any issue. However, all other times (when WI is changed and no change to dependent field), following error getting logged. Not sure why the value provider is getting triggered even if there is no change to dependent field. Thanks for your help!
2019-04-25 10:30:56,242 [WebContainer : 6 @@ 10:30
<com.ibm.team.workitem.newWorkItem@de747484-63ef-48d5-8452-9b93f665a9ce> /ccm/service/com.ibm.team.workitem.common.internal.rest.IWorkItemRestService/workItemDTO2] ERROR com.ibm.team.workitem.common - Error invoking value provider 'Outage Duration' associated with the attribute 'Outage Duration' in the project area with id '_GE1mYAytEea_MomVQeRYaQ'. You can link to the project area definition using a URL similar to https://thehostname:9443/jazz/process/project-areas/_GE1mYAytEea_MomVQeRYaQ, where the host name, port and jazz context are configured for your installation. Contact your project area administrator for assistance.
java.lang.ClassCastException: java.lang.String incompatible with java.lang.Number
at com.ibm.team.workitem.shared.common.internal.valueProviders.ScriptAttributeValueProvider.convert(ScriptAttributeValueProvider.java:218)
at com.ibm.team.workitem.shared.common.internal.valueProviders.ScriptAttributeValueProvider.getValue(ScriptAttributeValueProvider.java:72)
at com.ibm.team.workitem.common.internal.attributeValueProviders.AttributeValueProviderRegistry$SafeValueProvider.getValue(AttributeValueProvi
Accepted answer
- Open the project area with the ID '_GE1mYAytEea_MomVQeRYaQ' (read the error message).
- Get the name of that project area.
- Open the project aread administration view in the Eclipse client.
- Open the project area process configuration for work item
- Open the attribute customization
- Fix the 'Outage Duration' attribute customization - likely a calculated value.
Comments
Thanks Ralph!
#1 As I mentioned in my question, The calculated value provider works fine (when the dependent filed value changes) and doesn't log any errors. So I am not sure if this is issue with script.
# 2 The issue is it logs the errors all other time when the work item is saved ( and dependent value did not change).
I added a print statement in the beginning of the script and that is also not getting logged. So I am not sure if script is even getting triggered in # 2 scenario.
See https://jazz.net/wiki/bin/view/Main/AttributeCustomization when stuff gets triggered. Debug the code.
Usually it is the code that is not correct for whatever reason. So it is much more likely there is a bug in the provider.
You would not believe how many even syntactically incorrect JavaScript value providers I have seen in the past. E.g. you have to always return a value. A lot of examples do not.
You want to use consle.log and the log is maybe not the log you expect.
Also there seems to be a conversion error. So I am 100% confident the script is broken.
Thanks Ralph! Apparently, it was return value (inside one of the if statement) that was creating the issue.