Hello, I've recently started experimenting with the Workflow editor and I'm trying to write a workflow with a new approach to time tracking as the existing examples aren't quite sufficient for our needs. I'm almost there, but have run into one roadbloack that I can't figure out on my own.

Can anybody tell me if it's possible to construct or parse a date variable from a string representation of a date value? I've not been able to find any documentation or references to this anywhere.
Comment actions Permalink
Hello Gary,

Sorry for not responding earlier.

Please clarify your case. In general, it's possible to construct the date variable (i.e. you can take the "issue created" date and execute some actions with it), and parse (i.e. it's possible to make a String type custom field with 23.01.2012 date format) and then parse it and change this String every time you need to update the estimation field (Estimation is just a case).
So, it's possible, but it'll be better to know the use-case, then we will be able to find the better way.

Thank you.
Waiting for the details from you.
Comment actions Permalink
Hey Andrey,

Thanks for getting back to me. So I was attempting to implement a more flexible time tracker than the one provided out of the box to allow multiple users to set independent timers on a single issue. My approach was as follows:
  1. Create a user[*] field to track all the team members who might be working on any issue
  2. Create a string field to hold a delimited string of the start time for each clocked-in user
  3. When a member "clocks in" (selecting themselves in the user list), record the current time (as in the standalone work timer) along with their user id.
  4. When they clock out (by de-selecting themselves), retrieve the start date from the string and perform the same time period calculation.

I've managed to get all other steps in that process working as desired, but my cunning plan falls over at the last hurdle, because I can't construct a date variable from the string value I previously stored. What you described with the "issue created" field isn't sufficient for this purpose as that effectively retrieves an existing date value, whereas I need to create a new instance, injecting my own string value. Hope that makes sense?

Please sign in to leave a comment.