Card Form: Troubles with date calculations

  • Profile Image
    andrewo
    Asked on February 08, 2018 at 03:47 PM

    Hello,


    I am trying to get a date calculation working, but haven't had any luck.


    I have a "Due Date" field that I want to calculate based on a couple of different conditions.

    Basically, if Urgent < 4, set Due Date to 'today's date + 2 days'

    if Urgent > 3 set Due Date to 'today's date'

    I can get dateString() to work, but I am using this field with the Trello integration that needs mm/dd/yyyy as the format.

    I have a hidden field called 'Today's Date' that is a Date Picker field that defaults to the current date.  'Today's Date' + 2 doesn't seem to put anything in the Due Date field.

    What am I missing?


    Thanks,


    Andrew

  • Profile Image
    Marvih
    Answered on February 08, 2018 at 05:38 PM

    Let me do a test first. I will get back to you ASAP.

  • Profile Image
    Marvih
    Answered on February 08, 2018 at 06:35 PM

    It seems that inserting data to Calendar/Date fields using Conditions doesn't work.

    I will escalate this issue to our Developers.


    Sorry for the inconvenience, we will reply on this thread once this issue is fixed.

  • Profile Image
    Marvih
    Answered on February 08, 2018 at 06:37 PM

    Let me see if it is possible to Modify the date format on Trello so you can use the dateString().

  • Profile Image
    andrewo
    Answered on February 09, 2018 at 08:46 AM

    Thanks for escalating the issue.  Any idea how long something like this would take to implement (an hour, a week, 6 months, ...)?

    We're hoping to launch this form shortly and would love if the Trello integration was working with the due dates.

    I also tried putting the calculation in a text field, but Today's Date (that shows as 02/09/2018) gets put into the text field as 20180209 and Today's Date + 2 just gives 201802092.

  • Profile Image
    Sabbir
    Answered on February 09, 2018 at 09:55 AM

    Our back end team is already on it. We will let you know on this thread as soon as there is an update on this.

  • Profile Image
    janberk
    Answered on February 23, 2018 at 03:28 AM

    Hi, as I've checked your form it looks like you have removed the mentioned calculation. So I've created it on my end, and it works.

    1. I've added a Star Rating field and two Date Time field to my form.
    2. I've added an "Update / Calculate Field" condition.
    3. I've configured the condition as seen below;

    1519374486Screen Shot 2018-02-23 at 11.2

    It sets the second date fields value + 2 days if the star rating value is greater than 3. If you have further issues please let us know.

  • Profile Image
    andrewo
    Answered on February 26, 2018 at 11:09 AM

    Thanks for the reply.  My test is not working though.  I have a calculation of 1 + TodaysDate and I get this in the submission.


    TodaysDate = 2018-02-26

    DueDate = 1899-11-30


    Shows up in Trello as Nov 29, 1899.

  • Profile Image
    Marvih
    Answered on February 26, 2018 at 01:50 PM

    I assume this is the correct form you are referring http://www.jotformpro.com/form/80365893064968

    Since you are inserting/copying data to a Hidden field, kindly try changing Clear Hidden Field Values to "Dont Clear".

    15196708731236.png

    Please also try changing the Value on your condition, instead of "4" change it to "4/5" since the urgency result is in Fraction.

    15196708661237.png

    And the change the IF "ANY" condition to IF "ALL" to make sure there will be no conflict with your conditions.

    15196710111238.png


  • Profile Image
    andrewo
    Answered on February 26, 2018 at 02:03 PM

    Tried all of your suggestions with the same results.


    Please do not link to the form in your responses.


    Thank you.

  • Profile Image
    david
    Answered on February 26, 2018 at 03:20 PM

    I checked all your conditions and they are still set to 4/5 5/5 etc. 

    1519676202Capture.PNG

    When the conditions are updated to 4 and 5 instead of 4/5 and 5/5, they do function correctly.

    Here is a copy of the form with the changes made and the date field shown:

    https://form.jotform.com/80565672921967

    The conditions do properly update the field.

  • Profile Image
    andrewo
    Answered on February 26, 2018 at 03:36 PM

    They were set to 4 and 5.  The previous response suggested setting them to 4/5 and 5/5.

    "Please also try changing the Value on your condition, instead of "4" change it to "4/5" since the urgency result is in Fraction."

    It is showing 2/27/2018 in the field, but when submitted I still get 1899-11-30.


    Type Phone
    Date and time 2018-02-28
    Trello Card Title andrew test - Phone
    Where
    Building:  Upper School
    Details test
    Urgency 4/5
    Name andrew test
    Email a@a.com
    Today's Date 2018-02-26
    Due Date 1899-11-30
  • Profile Image
    Mike
    Answered on February 26, 2018 at 06:24 PM

    The 4 and 5 are correct values.

    I was able to reproduce the issue with the incorrect submitted date. We will ask our developers to take a look. We will keep you updated.

  • Profile Image
    janberk
    Answered on February 27, 2018 at 02:39 AM

    I'm sorry, I got it now. There was a bug that copies the value of calculation to the first date field. It should be solved now.

    If you have further issues please let us know.

  • Profile Image
    andrewo
    Answered on February 27, 2018 at 09:01 AM

    Thank you.  It looks like the dates are being submitted as mm/dd/yyyy, but the Trello due date says it was due the previous day at 7:00pm.


    Example: Submitting today's date 02/27/2018 as the due date and Trello says it is overdue and it was due yesterday at 7:00pm.  Not sure if this is a problem on Trello's end or JotForm's.

  • Profile Image
    gizem
    Answered on February 27, 2018 at 11:22 AM

    I have tested the problem you have experienced. I can say that it worked as expected.

    In my test: The due date was calculated on 28 February. Then I checked my card on Trello. The date seems to be passed to there correctly.

    Please check it again. If the problem still persists, let us know.

  • Profile Image
    andrewo
    Answered on February 27, 2018 at 12:12 PM

    Still the same thing.  A user just submitted a form.  The submission e-mail says that 

    DueDate = 2018-03-02

    Trello shows due Mar 1 at 7:00pm.

    1519751520Screenshot 2018-02-27 12.07.05

  • Profile Image
    david
    Answered on February 27, 2018 at 01:30 PM

    I have moved the Trello issue to a thread of its own.  I will address that issue in the following thread shortly:

    https://www.jotform.com/answers/1398845-Trello-Integration-Due-date-is-being-set-a-day-before-the-date-submitted

    I was able to reproduce it on my end.