Results 1 to 7 of 7

Thread: calls - date_end - change to datetime

  1. #1
    mikesolomon is offline Sugar Community Member
    Join Date
    Feb 2008
    Location
    UK
    Posts
    1,467

    Default calls - date_end - change to datetime

    I would like to change date_end in calls from date to datetime

    I tried changing it in vardefs and in the calls table but when I create a new call it still shows as a date field in edit view

    Is there a way to do this?

  2. #2
    andopes's Avatar
    andopes is offline A Sugar Hero | Help Forum Moderator
    Join Date
    Jul 2006
    Location
    São Paulo - Brazil
    Posts
    8,335

    Default Re: calls - date_end - change to datetime

    Hi, Mike.

    Did you run quick repair and rebuild?
    This perform the necessary changes to cached files.

    Cheers
    André Lopes
    DevToolKit / Project of the Month - June 2009
    Lampada Global Services- Open Source Solutions
    Avenida Ipiranga, 318
    Bloco B - CJ 1602
    São Paulo, SP 01046-010
    Brazil
    Office: +55 11 3237-3110
    Mobile: +55 11 7636-5859
    e-mail: andre@lampadaglobal.com

    Lampada Global delivers offshore software development and support services to customers around the world.
    Lampada is proud to be a SugarCRM Gold Partner, revolutionizing Customer Relationship Management.

    I DO NOT answer questions through PM and Email. If you need some help post your question into SugarForum.

  3. #3
    mikesolomon is offline Sugar Community Member
    Join Date
    Feb 2008
    Location
    UK
    Posts
    1,467

    Default Re: calls - date_end - change to datetime

    Quote Originally Posted by andopes
    Hi, Mike.

    Did you run quick repair and rebuild?
    This perform the necessary changes to cached files.

    Cheers
    yup did that - it changed the field in the database to datetime but on the form in shows as a datefield

  4. #4
    andopes's Avatar
    andopes is offline A Sugar Hero | Help Forum Moderator
    Join Date
    Jul 2006
    Location
    São Paulo - Brazil
    Posts
    8,335

    Default Re: calls - date_end - change to datetime

    Hi, Mike.

    Which version are you using?
    Did the database table get changed after repairing?
    Inside your editviewdefs.php there is a attribute

    'type' => 'Date'

    Inside the date_end field definition?

    Can you post the content of your editviewdefs.php and vardefs.php?
    Only the code related to that field

    Best regards
    André Lopes
    DevToolKit / Project of the Month - June 2009
    Lampada Global Services- Open Source Solutions
    Avenida Ipiranga, 318
    Bloco B - CJ 1602
    São Paulo, SP 01046-010
    Brazil
    Office: +55 11 3237-3110
    Mobile: +55 11 7636-5859
    e-mail: andre@lampadaglobal.com

    Lampada Global delivers offshore software development and support services to customers around the world.
    Lampada is proud to be a SugarCRM Gold Partner, revolutionizing Customer Relationship Management.

    I DO NOT answer questions through PM and Email. If you need some help post your question into SugarForum.

  5. #5
    mikesolomon is offline Sugar Community Member
    Join Date
    Feb 2008
    Location
    UK
    Posts
    1,467

    Default Re: calls - date_end - change to datetime

    Quote Originally Posted by andopes
    Hi, Mike.

    Which version are you using?
    Did the database table get changed after repairing?
    Inside your editviewdefs.php there is a attribute

    'type' => 'Date'

    Inside the date_end field definition?

    Can you post the content of your editviewdefs.php and vardefs.php?
    Only the code related to that field

    Best regards
    getting there slowly

    I had a look at editviewdefs.php and changed it:

    array (
    'name' => 'date_end',
    'type' => 'datetimecombo',
    'label' => 'LBL_DATE_END',
    ),

    adding 'type' => 'datetimecombo' made it appear correctly on the form

    unfortunately when it save the time is being saved as 00:00

    But I think I'm on the right track

  6. #6
    mikesolomon is offline Sugar Community Member
    Join Date
    Feb 2008
    Location
    UK
    Posts
    1,467

    Default Re: calls - date_end - change to datetime

    When I investigated closer I found that in calls date_end was always being set to date_start irrespective of what I entered

    I fixed the problem with a logic hook

    $bean->date_end= $_REQUEST['date_end'];

    Andre - thanks for the help

  7. #7
    mikesolomon is offline Sugar Community Member
    Join Date
    Feb 2008
    Location
    UK
    Posts
    1,467

    Default Re: calls - date_end - change to datetime

    New problem

    If I change the layout using studio the form reverts to a date field

    to fix it I have to go back into custom/modules/Calls/metadata/editviewdefs.php and add 'type' => 'datetimecombo',

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. View Change Log
    By markoa in forum Developer Help
    Replies: 0
    Last Post: 2007-10-13, 08:55 AM
  2. Change the default duration of calls
    By Iggi in forum General Discussion
    Replies: 2
    Last Post: 2007-06-08, 03:23 PM
  3. Replies: 3
    Last Post: 2006-12-19, 12:46 AM
  4. Replies: 3
    Last Post: 2006-08-10, 01:18 AM
  5. Pro - Calls on the fly - General call/task features
    By cbierwerth in forum Feature Requests
    Replies: 1
    Last Post: 2006-06-28, 02:29 PM

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
  •