Results 1 to 5 of 5

Thread: How to change default start time in tasks

  1. #1
    ptemplin7 is offline Sugar Community Member
    Join Date
    Jun 2007
    Location
    Puget Sound Washington
    Posts
    380

    Question How to change default start time in tasks

    Hi,
    We want to get rd of the 1 am start time for a task and set the default to a more reasonable value like 8 am. I have found the variable but where is the default value set..

    Thanks for the help.
    Paris
    Paris Templin, CEO

    Templin Computing LLC- Washington State based IT and Onlne Backup Specialiosts. We specialize in providing CRM and backup solutions to small and medium businesses.

    http://www.templincomputing.net

  2. #2
    rafael.q.g@hotmail.com's Avatar
    rafael.q.g@hotmail.com is offline Sugar Community Member
    Join Date
    Jun 2011
    Location
    Florianópolis - Brazil
    Posts
    782

    Default Re: How to change default start time in tasks

    You could try to open the ProjectTask class defined under /modules/ProjectTask/ and extend the constructor method. Into the constructor add some code like:
    $this->start_time= "<date value>";
    Rafael Queiroz Gonçalves
    Advanced OMG UML Certified Professional
    Sun Certified Enterprise Architect for the Java Platform
    Sun Certified Programmer for the Java 2 Platform
    IBM Certified Advanced Application Developer - Lotus Notes and Domino
    IBM Certified Application Developer - IBM WebSphere Portlet Factory
    Computer Science Mastering / UFSC - PPGCC

  3. #3
    kuske's Avatar
    kuske is offline Sugar Community Member
    Join Date
    Oct 2007
    Location
    Germany
    Posts
    2,597

    Default Re: How to change default start time in tasks

    Hi Rafael, can you please explain that in detail?
    Where exactly can the start date be set?
    Did you test that?
    I tried you suggestion and I did not succeed...
    Harald Kuske
    Pre-Sales Engineer Central Europe

    SUGARCRM Deutschland GmbH
    Erika-Mann-Str. 53, 80636 Munich, Germany
    Email: hkuske@sugarcrm.com
    Home: http://www.sugarcrm.com


  4. #4
    rafael.q.g@hotmail.com's Avatar
    rafael.q.g@hotmail.com is offline Sugar Community Member
    Join Date
    Jun 2011
    Location
    Florianópolis - Brazil
    Posts
    782

    Default Re: How to change default start time in tasks

    Hi kuske,

    Yes I already tried that, not especifically for project tasks, but for others modules.
    I looked exactly where the code has to be added:

    Open the file: /modules/ProjectTasks/ProjectTask.php

    Look for the contructor method, which is this one:
    PHP Code:
    function ProjectTask($init=true)
        {
            
    parent::SugarBean();
            if (
    $init) {
                
    // default value for a clean instantiation
                
    $this->utilization 100;
        
                global 
    $current_user;
                if(empty(
    $current_user))
                {
                    
    $this->assigned_user_id 1;
                    
    $admin_user = new User();
                    
    $admin_user->retrieve($this->assigned_user_id);
                    
    $this->assigned_user_name $admin_user->user_name;
                }
                else
                {
                    
    $this->assigned_user_id $current_user->id;
                    
    $this->assigned_user_name $current_user->user_name;
                }
                
                global 
    $current_user;    
                if(!empty(
    $current_user)) {
                    
    $this->team_id $current_user->default_team;    //default_team is a team id
                
    } else {
                    
    $this->team_id 1// make the item globally accessible
                
    }        
            }
        } 
    Then add this line in the method body:
    PHP Code:
    $this->date_start= <value>; 
    Rafael Queiroz Gonçalves
    Advanced OMG UML Certified Professional
    Sun Certified Enterprise Architect for the Java Platform
    Sun Certified Programmer for the Java 2 Platform
    IBM Certified Advanced Application Developer - Lotus Notes and Domino
    IBM Certified Application Developer - IBM WebSphere Portlet Factory
    Computer Science Mastering / UFSC - PPGCC

  5. #5
    ptemplin7 is offline Sugar Community Member
    Join Date
    Jun 2007
    Location
    Puget Sound Washington
    Posts
    380

    Question Re: How to change default start time in tasks

    Thanks for the pointers.

    Where exactly would you add the line if you are in the Tasks create (not the project tasks!)

    I looked around but not sure where to add the line. It obvious that the $time_start is the variable to set but where to do that?
    thanks Paris
    Paris Templin, CEO

    Templin Computing LLC- Washington State based IT and Onlne Backup Specialiosts. We specialize in providing CRM and backup solutions to small and medium businesses.

    http://www.templincomputing.net

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Start time in Calls
    By glynd in forum Help
    Replies: 0
    Last Post: 2009-10-09, 10:22 AM
  2. Start date and Time
    By njoy in forum Help
    Replies: 0
    Last Post: 2006-08-21, 04:19 PM
  3. default users - change time zone?
    By cgchris99 in forum General Discussion
    Replies: 2
    Last Post: 2006-06-01, 09:00 PM
  4. change default meeting time from 1 to 2 hours
    By groc in forum General Discussion
    Replies: 0
    Last Post: 2005-09-20, 07:43 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
  •