Results 1 to 5 of 5

Thread: History Layout (Change date modifed for due date)

  1. #1
    vwpower is offline Junior Member
    Join Date
    Jul 2006
    Posts
    2

    Default History Layout (Change date modifed for due date)

    When I go inside an account on the buttom you can look ath te history tasks.
    The order of fileds are:

    Subject--status--contact------datemodified---assigned user

    I just want yo change de Datemodified for the Due date field.


    I have knoledge of php.
    Whant files I need to change and what do I need to change

    Thanks


    version=SugarSuite-Full-4.2.1
    php 4.3

  2. #2
    cywolf's Avatar
    cywolf is offline Sugar Community Member
    Join Date
    Oct 2005
    Location
    Toronto, Canada
    Posts
    223

    Default Re: History Layout (Change date modifed for due date)

    Not all of the objects that show up in the History subpanel have a due date. Emails and Notes for instance.
    Andrew Whitehead
    The Long Reach Corporation
    http://infoathand.com

  3. #3
    stevec is offline Sugar Community Member
    Join Date
    Oct 2005
    Location
    London
    Posts
    1,100

    Default Re: History Layout (Change date modifed for due date)

    You can use 'alternatives' though for those types.

    Here's a rough idea on what you need to do.

    (I'm assuming you mean start date as only tasks have due dates)

    Make a backup and do this development on a test system. You aren't going to make any database changes so you could set up Apache and php on another machine and set up the config.php file to point to the real database - provided the database is set up to receive connections from remote machines with the user you are using.


    Anyway, look at the file modules/Accounts/layout_defs.php

    You'll find each sub-panel defined. For history, you'll see that 'header_definition_from _subpanel' points to meetings. This means that it will use meetings labels for the columns.

    Now for the real work, for each of the tables types described in the collection list for history (meetings, calls, emails etc) in the above file, edit the associated files module/<modulename>/subpanels/ForHistory.php

    eg. modules/meetings/subpanel/ForHistory.php

    In the list_fields array, you'll see each of the columns that are pulled in for this table/module - ie. meetings.

    You can add here - or you can even move them into different orders.

    You'll see date_modified looks like:

    Code:
            'date_modified'=>array(
                             'vname' => 'LBL_LIST_DATE_MODIFIED',
                             'width' => '10%',
                    ),
    which is fairly self explanatory.

    You can replace it with:

    Code:
     
            'date_start'=>array(
                             'vname' => 'LBL_LIST_DATE',
                             'width' => '10%',
                    ),
    for start date.



    Once this is done, you have to do the same to all other modules in the collection list by editing their ForHistory.php file. Note, as cywolf said, some do not have this field - but as you are pulling the column titles from meetings (see above), you can still pick another field to display under this title. So for notes and emails you could still use modified date. And you may want to pick due date for tasks. Be aware that some of these fields are date/times and some are dates only - this will be reflected in the sub panel. If times are important, you'll need to add an extra column for these too.

    Note - if you want to be clever, you could rename this column something custom rather than start date. maybe something like 'last action'. To do this, edit the ForHistory.php file for the module being referenced for the column title - in this case meetings - and alter the 'vname' for the appropriate column. Eg.:

    Code:
                    'date_start'=>array(
                    	'vname' => 'LBL_CUSTOM_ACTION_DATE',
                             'width' => '10%',
                    ),
    And edit the default language file - include/language/en_us.lang.php - adding a definition for that label to the end: Eg.:


    Code:
     'LBL_CUSTOM_ACTION_DATE' => 'Action Date',

  4. #4
    jsteinitz is offline Sugar Community Member
    Join Date
    Jun 2006
    Posts
    11

    Default Re: History Layout (Change date modifed for due date)

    I'm interested in changing the modified date column to created date but just for notes only. Maybe this isn't possible-- anyway, following SteveC's excellent instructions, I made the following change to module/notes/subpanel/ForHistory.php


    'date_modified' => array(
    'vname' => 'LBL_LIST_DATE_MODIFIED',
    'width' => '10%,
    ),


    (**** WAS CHANGED TO:*****)



    'date_entered'=>array(
    'vname' => 'LBL_LIST_DATE_MODIFIED',
    'width' => '10%,
    ),

    The result is that no date shows under history for notes-- that is, the field is blank. Can you give me an idea if what I'm trying to do is possible? Possible solutions?


    Thanks much!

  5. #5
    qhussain is offline Junior Member
    Join Date
    Dec 2006
    Posts
    3

    Default Re: History Layout (Change date modifed for due date)

    I got this working by adding 'alias' => 'date_modified',

    So.. the new code would be
    'date_entered'=>array(
    'vname' => 'LBL_LIST_DATE_MODIFIED',
    'alias' => 'date_modified',
    'width' => '10%,
    ),

Thread Information

Users Browsing this Thread

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

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
  •