- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-13-2015 09:00 AM
Hi, I am a relative newbie to this so we are trying to set a value of the resolved date of an incident by workflow along with some other textual values for resolution information etc.
In workflow editor we go to the set value screen and use the drop down to select the Resolved field where we have entered the expression "javascript:gs.nowDateTime()". I have just been checking on some incidents and it appears not be working consistently if at all. The workflow has run and got beyond this action (usually then to terminate).
I have trawled the wiki but found nothing to confirm or otherwise that this is the correct or best way of doing this I would appreciate any advice.
Many thanks in advance..
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-17-2015 04:44 AM
Hi Wilson,
You can use 'Set Values' activity in your workflow to set all the values.
Example-
In the 'Set Values' activity in your workflow you can use below-
Set -
Resolved - javascript:gs.nowDateTime()
Resolved By - javascript:gs.getUserID()
and so on.
Thanks,
Tanaji

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-13-2015 09:47 AM
Hi Wilson,
You mean it is working for few tickets and not for others. Please confirm.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-14-2015 12:40 AM
Hi Pradeep
I have foound an example of 2 incidents using the same workflow and one has a resolved date and the other has not. The one that does not have a resolved date was actually updated later than the other ticket so if the previous ticket worked so should a later one (I would think).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-14-2015 05:27 AM
I think I amy have figured this out now. The workflow you modify does not update any currently running workflows, it will only come into play on workflow initiated after the update.This would explain why I am seeing some incidents with resolved dates and some without. The important date is actually the start date of the workflow relative to when the workflow was updated.
We also need to update the Resolved by field so for the record we are using the following
Resolved: javascript:gs.nowDateTime()
Resolved By: javascript:gs.getUserID()
Theere are a few other fields to populate such as Cloure Summary, Closure Notes and a couple of fields for the resolution categorization (2 levels). The State must of course be set to Resolved.
Thanks for anyone taking a look but I believe this explains my issue.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-14-2015 05:34 AM
Hello Wilson,
Use the advanced option and write a script in the activity :
current.resolved=gs.nowDateTime();
current.resolved_by=gs.getUserID();
Hope, this will resolve your issue.
Thanks,
Subhankar