Results 1 to 3 of 3

Thread: Tasks dates & times

  1. #1
    Triffid is offline Member
    Join Date
    Jan 2006
    Posts
    5

    Default Tasks dates & times

    I had a terrible time tracing this bug, for some reason the dates were not displaying in format d/m/Y

    There are 2 seperate issues.
    Due date
    For some reason the due-date of a task was converted twice from db to display format
    this happens in Task.php around line 551
    Code:
            $dd = $timedate->to_display_date($date_due, false);
    change this to:
    Code:
    $dd = $date_due;
    and this issue will be fixed.

    Now the 2nd issue concerns the display of start date and/or due date without their times.
    If this happens the date will display as format YYYY/MM/DD instead of the required format, this is because the fetched row will miss the time(s) thus the conversion of the date will not be executed.

    You have 2 solutions to this problem:
    1. Remove the rel_field from date_due and date_start in /modules/Tasks/vardefs.php
    I'm not sure what the effect will be when the users will be in different timezones, SUGAR team comment ?

    2. Change the Sugarbean.php :
    around line 1711 find:
    Code:
    if(!empty($this->$rel_field)) 
    {
    $this->$rel_field=from_db_convert($this->$rel_field, 'time');
    $mergetime = $timedate->merge_date_time($this->$field,$this->$rel_field);
    $this->$field = $timedate->to_display_date($mergetime);
    $this->$rel_field = $timedate->to_display_time($mergetime);
    }
    insert the following immediately after the last "}"
    Code:
    else 
    {
    $this->$field = $timedate->to_display_date($this->$field, false);
    }
    Problem fixed

    I'm testing sugar OS version 4.5.1e

  2. #2
    kbrill's Avatar
    kbrill is offline SugarCRM PS Engineer
    Join Date
    Jul 2004
    Location
    St Louis, MO
    Posts
    3,183

    Default Re: Tasks dates & times

    If you have not yet, please submit this to the bug report tool at http://www.sugarcrm.com/crm/sugarbugs.html and read and sign the contributers agreement at http://www.sugarforge.org/content/co...-agreement.php. We can then look into how your changes affect other time zones and such, but it looks good from what I read.
    Kenneth Brill - Help Forum Moderator

    I do not respond to 'Private Messages'. Please email me directly instead

    When asking for help, PLEASE give us your Server Information and Version Numbers as asked for on the 'Post New Message' screen as well as any JavaScript errors shown at the bottom of the browser window.
    Help us Help You

  3. #3
    roblaus's Avatar
    roblaus is offline Sugar Community Member
    Join Date
    Dec 2006
    Location
    Vienna / Austria
    Posts
    2,850

    Default Re: Tasks dates & times

    tx. Solution 1 fixed the problem with due date 1.1.2000 in the task list. BTW - it was ok in 4.5.1e, returned in f...

    rgds
    rl
    __________________________
    Robert Laussegger
    http://www.iscongroup.net

    Bei Fragen: support@iscon.at
    Die deutschen Sprachdateien für SugarCRM und das deutsche Handbuch gibt es hier: http://goo.gl/kPsAz
    Ab sofort auch mit 6.4.2

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Serious issue with sugarcrm 3.5.1.c
    By wp.rauchholz in forum Help
    Replies: 17
    Last Post: 2005-12-01, 07:22 AM
  2. Access to Tasks
    By km in forum Help
    Replies: 1
    Last Post: 2004-11-05, 04:34 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •