Skip to main content


 

Symptoms


This is to request that the default System > Workflow > Comments object output a detailed timestamp on the K2 Workflow list item page (as accessed through a list item's elipse menu).

The default Workflow Comments object outputs the day of year format date, and the request is for this output to be detailed or long date format, so to include the time of day when the respective comment was made.

This is important for users as workflows can happen within one day and without detailed time information, one cannot clearly make out approval or task execution sequences within one day. Moreover, all other timestamps on this dynamic reporting page are in detailed format, so the feature request would make all timestamps look the same.
 

Diagnoses


'Created Date' column of the 'System.SharePoint 2013 Integration.K2 Workflow Comments View' list view has a default layout Date and Time format of 'Short Date' instead of 'Full date/time' like the workflow reporting controls above it on the Reporting form.
 

Resolution

You can work around this by duplicating the workflow comments view, generating your own reporting form, and replacing the default (uneditable) comments view with your own. See steps below:

- In K2 Designer, click 'Show' in the bottom left and select 'Views' and 'System Objects'
- Expand the 'All Items' -> 'System' -> 'SharePoint 2013 Integration' category
- Right click 'K2 Workflow Comments View' and 'Save As' and give it a custom title or prefix
- Select the category of the list where your generated reports form is located and save
- Edit the saved view and change the Layout of the 'Created Date' column to give it 'Full date/time' formatting, then save

- Edit the reports form (titled: Reports
- I would recommend studying the generated rules that apply to the 'K2 Workflow Comments View' so that you can recreate the original behavior as desired
- Delete the 'K2 Workflow Comments View' and replace it with your newly saved copy (this will delete the rules associated with the comments view)
- Edit the 'On Reports, when Workflow Instances Grid is Clicked' rule
- Add a new 'Execute a View method' rule targeting your comments view and execute the 'Get List' method
- Configure the rule and for the 'Process Instance ID' field, drag in the ' Reports' -> 'Controls' -> 'Workflow Instances Grid' control
- Add any other former or custom functionality that you like (like hiding the view if there are no comments)
- Save the form and test it out




 
Be the first to reply!

Reply