We have a interesting issue related to the workflow comments. We are using lion bridge workflow for the items. When the workflow command is executed and comment box is filled with comments. Data is saved in the SQL Db but the Key is stored as "comment" While retrieving the workflow history to view the comments, It is trying to fetch from the key "Comments" hence no comments are shown. if I update the data in the SQL column to "Comments" it comes up in the History. Does anyone know what could be the issue or from where is the comment box save picking up the value for the "Key" Attached the screenshot below which shows the json values in the SQL.
2 Answers
Sitecore's workflow uses /sitecore/templates/System/Workflow/Standard Comment Template/Comment/Comments
field to store the key value and when display it in workflow history it uses below config from Sitecore.config file -
<getWorkflowCommentsDisplay help="Processors must accept PipelineArgs of type Sitecore.Pipelines.GetWorkflowCommentsDisplay.GetWorkflowCommentsDisplayArgs">
<processor type="Sitecore.Pipelines.GetWorkflowCommentsDisplay.ExtractFields,
Sitecore.Kernel" singleInstance="false">
<Fields hint="list:AddField">
<Comments>Comments</Comments>
</Fields>
</processor>
</getWorkflowCommentsDisplay>
Ideally this field name /sitecore/templates/System/Workflow/Standard Comment Template/Comment/Comments
and this value <Comments>Comments</Comments>
in config should be same.
To fix this you can do any of the below two options -
- Change the config value to
comment
as you already have comments added in the table, no major impact but need to take care during the upgrade as it is not OOTB Sitecore value. - Update the template field value to
Comments
but you also need to run SQL command to fix this for already added comments which are showingcomment
as key.
-
Thank you for the response. Below is the field name in the Sitecore for the Template /sitecore/templates/System/Workflow/Standard Comment Template/Comment/Comments And the showconfig shows the field is pointing to Comments and that makes sense. I am trying to find why is it storing the key value as comment where as field name is Comments– MeghanCommented Aug 4, 2022 at 14:42
LionBridge responded "Dev team confirmed that this issue is a bug in the connector and they are going to fix it in a future release. "
But as a workaround we can use the Solution recommended by @Mahendra