Issue with DUEDATE and copy postfunction

Issue #393 resolved
Adolfo Casari created an issue

Hi Fidel,

I am using this postfunction to copy a date to duedate:

The following text parsed in basic mode will be copied to Due date: %{Inicio plan Liberacion Produccion}

but I am noticing that duedate is actually 1 day behind "Inicio plan Liberacion Produccion".

I checked in the database and for example in one Issue I get:

2016-08-22 01:00:00.0 = DueDate 2016-08-23 00:00:00.0 = Inicio plan Liberacion Produccion

Thanks,

Comments (5)

  1. Adolfo Casari reporter

    I've been checking more issues and the problem is random. Some work, some don't.

    In another one that don't work,

    DueDate=2016-08-21 19:00:00.0 Inicio plan Liberacion Produccion=2016-08-22 00:00:00.0

  2. Fidel Castro Armario repo owner

    Hi Adolfo,

    I explain how "Copy a parsed text to a field" post-function works: it generates a text representation of the date in "Inicio plan Liberacion Produccion" custom field, and then that string value is transformed into a date value in order to be stored into "Due date".

    I think that the problem is caused by the fact that the string representation of the value of "Inicio plan Liberacion Produccion" is done using current user's timezone, but the timezone used for casting the string value into a date value is the default timezone of the server.

    Can you please tell me the timezone of the user who is executing the transition, and the default timezone of the server?

    Anyway, I recommend you to use "Mathematical and date-time expression calculator" post-function for copying date-time values, since it copies the date-time values directly, instead of using an intermediate string representation.

  3. Adolfo Casari reporter

    You're right, I checked 2-3 users that have this issue and they have in their profiles a different timezone from the server. This explain why it works OK for some and not for others.

    Anyways I will change the postfunction to avoid this situation.

    Thanks for your support.

  4. Log in to comment