Results 1 to 7 of 7

Thread: Date and Time field

  1. #1
    npolite is offline Sugar Community Member
    Join Date
    May 2008
    Posts
    20

    Default Date and Time field

    Hello,


    We are running Sugar 5.0.0.g. Our customers would like to see on our cases a resolution date and time field. Currently when I create the date field, that is all that is displayed with no option to allow time. Has this been implemented in a newer version? If not does anyone know what files I need to modify to get this to work?

    Thanks,
    Nick

  2. #2
    npolite is offline Sugar Community Member
    Join Date
    May 2008
    Posts
    20

    Default Re: Date and Time field

    Can anyone help out?

    Thx

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

    Default Re: Date and Time field

    Have a look at http://www.sugarcrm.com/forums/showt...light=datetime

    Either create the field in module builder or edit vardefs to add it
    Mike Solomon
    Development Manager
    Ivy Ltd
    www.ivy.ltd.uk]www.ivy.ltd.uk

    php version 5.2.6
    MySql 5.1.59

  4. #4
    npolite is offline Sugar Community Member
    Join Date
    May 2008
    Posts
    20

    Default Re: Date and Time field

    Thanks for the help. I'm having problems locating which vardefs to modify for the Cases. What I have is a resolution_date_c field which I have created. But when I grep for it no vardefs.php are returned.The Casevardefs that are returned are in the cache so won't they get overwritten?

    grep -R resolution_date_c *
    cache/modules/Home/Casevardefs.php: 'resolution_date_c' =>
    cache/modules/Home/Casevardefs.php: 'name' => 'resolution_date_c',
    cache/modules/Home/Casevardefs.php: 'id' => 'Casesresolution_date_c',
    cache/modules/ModuleBuilder/Casevardefs.php: 'resolution_date_c' =>
    cache/modules/ModuleBuilder/Casevardefs.php: 'name' => 'resolution_date_c',
    cache/modules/ModuleBuilder/Casevardefs.php: 'id' => 'Casesresolution_date_c',
    cache/modules/Cases/Casevardefs.php: 'resolution_date_c' =>
    cache/modules/Cases/Casevardefs.php: 'name' => 'resolution_date_c',
    cache/modules/Cases/Casevardefs.php: 'id' => 'Casesresolution_date_c',
    cache/modules/Cases/DetailView.tpl:{if $fields.resolution_date_c.acl > 0}
    cache/modules/Cases/DetailView.tpl:{$fields.resolution_date_c.value}
    cache/modules/Cases/form_SideQuickCreate_Cases.tpl:addToValidate('form _SideQuickCreate_Cases', 'resolution_date_c', 'date', false,'{/literal}{sugar_translate label='LBL_RESOLUTION_DATE' module='Cases'}{literal}' );
    cache/smarty/templates_c/%%D8^D8F^D8F13C84%%DetailView.tpl.php:<?php if ($this->_tpl_vars['fields']['resolution_date_c']['acl'] > 0): ?>
    cache/smarty/templates_c/%%D8^D8F^D8F13C84%%DetailView.tpl.php:<?php echo $this->_tpl_vars['fields']['resolution_date_c']['value']; ?>
    cache/smarty/templates_c/%%96^961^961E3BE0%%form_SideQuickCreate_Cases.tpl. php:addToValidate(\'form_SideQuickCreate_Cases\', \'resolution_date_c\', \'date\', false,\''; echo smarty_function_sugar_translate(array('label' => 'LBL_RESOLUTION_DATE','module' => 'Cases'), $this); echo '\' );
    cache/smarty/templates_c/%%8F^8FF^8FF5FFF2%%EditView.tpl.php:<?php if ($this->_tpl_vars['fields']['resolution_date_c']['acl'] > 1 || ( $this->_tpl_vars['showDetailData'] && $this->_tpl_vars['fields']['resolution_date_c']['acl'] > 0 )): ?>
    cache/smarty/templates_c/%%8F^8FF^8FF5FFF2%%EditView.tpl.php:<td valign="top" id='resolution_date_c_label' width='12.5%' class="dataLabel" NOWRAP>
    cache/smarty/templates_c/%%8F^8FF^8FF5FFF2%%EditView.tpl.php:<?php if ($this->_tpl_vars['fields']['resolution_date_c']['acl'] > 1): echo smarty_function_counter(array('name' => 'panelFieldCount'), $this);?>
    cache/smarty/templates_c/%%8F^8FF^8FF5FFF2%%EditView.tpl.php:<?php $this->assign('date_value', $this->_tpl_vars['fields']['resolution_date_c']['value']); ?>
    cache/smarty/templates_c/%%8F^8FF^8FF5FFF2%%EditView.tpl.php:<input autocomplete="off" type="text" name="<?php echo $this->_tpl_vars['fields']['resolution_date_c']['name']; ?>
    cache/smarty/templates_c/%%8F^8FF^8FF5FFF2%%EditView.tpl.php:" id="<?php echo $this->_tpl_vars['fields']['resolution_date_c']['name']; ?>
    cache/smarty/templates_c/%%8F^8FF^8FF5FFF2%%EditView.tpl.php:" id="<?php echo $this->_tpl_vars['fields']['resolution_date_c']['name']; ?>
    cache/smarty/templates_c/%%8F^8FF^8FF5FFF2%%EditView.tpl.php:inputField : "<?php echo $this->_tpl_vars['fields']['resolution_date_c']['name']; ?>
    cache/smarty/templates_c/%%8F^8FF^8FF5FFF2%%EditView.tpl.php:button : "<?php echo $this->_tpl_vars['fields']['resolution_date_c']['name']; ?>
    cache/smarty/templates_c/%%8F^8FF^8FF5FFF2%%EditView.tpl.php:<?php echo $this->_tpl_vars['fields']['resolution_date_c']['value']; ?>
    cache/smarty/templates_c/%%8F^8FF^8FF5FFF2%%EditView.tpl.php:addToValidate( \'EditView\', \'resolution_date_c\', \'date\', false,\''; echo smarty_function_sugar_translate(array('label' => 'LBL_RESOLUTION_DATE','module' => 'Cases'), $this); echo '\' );
    custom/modules/Cases/metadata/editviewdefs.php: 'name' => 'resolution_date_c',
    custom/modules/Cases/metadata/detailviewdefs.php.suback.php: 'name' => 'resolution_date_c',
    custom/modules/Cases/metadata/editviewdefs.php.suback.php: 'name' => 'resolution_date_c',
    custom/modules/Cases/metadata/detailviewdefs.php: 'name' => 'resolution_date_c',
    custom/portal/modules/Cases/metadata/editviewdefs.php: 'field' => 'resolution_date_c',
    custom/working/modules/Cases/metadata/editviewdefs.php: 'name' => 'resolution_date_c',
    custom/working/portal/modules/Cases/metadata/editviewdefs.php: 'field' => 'resolution_date_c',
    custom/history/modules/Cases/metadata/detailviewdefs.php_1229979276: 'name' => 'resolution_date_c',

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

    Default Re: Date and Time field

    I would delete the custom field u have created and directly add it cases vardefs
    or better add it by the extension method in custom/extension/modules/cases/vardefs
    Mike Solomon
    Development Manager
    Ivy Ltd
    www.ivy.ltd.uk]www.ivy.ltd.uk

    php version 5.2.6
    MySql 5.1.59

  6. #6
    npolite is offline Sugar Community Member
    Join Date
    May 2008
    Posts
    20

    Default Re: Date and Time field

    Thanks for the help Mike but there is no custom/extension/modules folder underneath /sugarcrm/htdocs/sugarcrm/custom. The closest I can find is sugarcrm-5.0.0/htdocs/sugarcrm/custom/Extension/application/Ext

  7. #7
    eggsurplus's Avatar
    eggsurplus is offline Sugar Community Member
    Join Date
    Dec 2005
    Location
    Minnesota
    Posts
    2,343

    Default Re: Date and Time field

    Mike means custom\Extension\modules\Cases\Ext\Vardefs

    Just create any php file you want like npolite.php in that folder and create your custom field there. Do a quick repair/rebuild afterwards (maybe twice to be safe) to ensure that the changes propagate through.

    npolite.php:
    PHP Code:
    <?php

    $dictionary
    ['Case']['fields']['my_date_field'] = array (
        
    'name' => 'my_date_field',
    ........................................., 
    etc
    );

    ?>

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. date/time field not appearing in workflow
    By ctigroup in forum Developer Help
    Replies: 0
    Last Post: 2008-06-26, 10:01 AM
  2. Replies: 2
    Last Post: 2007-08-09, 07:44 AM
  3. Date & Time custom field
    By JimMurple in forum Developer Help
    Replies: 1
    Last Post: 2007-04-11, 11:59 AM
  4. Replies: 0
    Last Post: 2006-09-13, 11:04 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
  •