Results 1 to 6 of 6

Thread: [HELP] Completed Tasks

  1. #1
    takkischitt is offline Senior Member
    Join Date
    May 2010
    Posts
    32

    Default [HELP] Completed Tasks

    Is there any way to remove completed Tasks from the Task List without actually deleting the task? i.e. so it remains in the history of the associated account.

  2. #2
    davidboris is offline Sugar Community Member
    Join Date
    May 2010
    Posts
    1,113

    Default Re: [HELP] Completed Tasks

    Hello,

    You can override function create_new_list_query to eliminate the data you want from the list view of tasks without deleting the tasks.
    Thumbs up.

    Skype ID - david__boris

    SugarForge Projects:

    WYSIWYG now in studio!(Version 1.1 is out now!)

    Sugar Feeds on your personalized home pages like iGoogle, My Yahoo!, etc.

    Fab Tools! > Dashlet Not Followed Opportunities for past six Months

  3. #3
    takkischitt is offline Senior Member
    Join Date
    May 2010
    Posts
    32

    Default Re: [HELP] Completed Tasks

    Quote Originally Posted by davidboris View Post
    Hello,

    You can override function create_new_list_query to eliminate the data you want from the list view of tasks without deleting the tasks.
    thanks, how would I go about that?

  4. #4
    blitz2190 is offline Senior Member
    Join Date
    Jul 2009
    Posts
    105

    Default Re: [HELP] Completed Tasks

    this topic shows how to modify the where clause of the list view query, the first post worked for me
    http://www.sugarcrm.com/forums/showthread.php?t=58494

  5. #5
    takkischitt is offline Senior Member
    Join Date
    May 2010
    Posts
    32

    Default Re: [HELP] Completed Tasks

    Quote Originally Posted by blitz2190 View Post
    this topic shows how to modify the where clause of the list view query, the first post worked for me
    http://www.sugarcrm.com/forums/showthread.php?t=58494
    Hi thanks for the reply, but I really don't have a clue about coding really so unless someone can take me through the process.....?

  6. #6
    blitz2190 is offline Senior Member
    Join Date
    Jul 2009
    Posts
    105

    Default Re: [HELP] Completed Tasks

    create a file called view.list.php in custom/modules/Tasks/views (if folder does not exist create it)

    with contents

    PHP Code:
    <?php
    if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');

    require_once(
    'include/MVC/View/views/view.list.php');

    class 
    TasksViewList extends ViewList{
         function 
    TasksViewList()
         {
             
    parent::ViewList();
         }
         
         
    /*
          * Override listViewProcess with addition to where clause to exclude project templates
          */
        
    function listViewProcess()
        {
            
    $this->processSearchForm();
                    

            
    // RETRIEVE TASKS WHERE THEY ARE NOT COMPLETED
            
    if ($this->where != "")
                
    $this->where .= ' and status <> "Completed" ';
            else
                
    $this->where .= 'status <> "Completed"';

            
            
    $this->lv->searchColumns $this->searchForm->searchColumns;
            
            if(!
    $this->headers)
                return;
                
            if(empty(
    $_REQUEST['search_form_only']) || $_REQUEST['search_form_only'] == false)
            {
                
    $this->lv->setup($this->seed'include/ListView/ListViewGeneric.tpl'$this->where$this->params);
                
    $savedSearchName = empty($_REQUEST['saved_search_select_name']) ? '' : (' - ' $_REQUEST['saved_search_select_name']);
                echo 
    get_form_header($GLOBALS['mod_strings']['LBL_LIST_FORM_TITLE'] . $savedSearchName''false);
                echo 
    $this->lv->display();
            }
        }

    }

    ?>
    ALWAYS test on a copy of your install first not the live server

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Listing completed tasks
    By lucianamssouza in forum Help
    Replies: 3
    Last Post: 2009-11-10, 12:40 AM
  2. Viewing completed Tasks
    By stuartlambert in forum Help
    Replies: 8
    Last Post: 2008-04-08, 01:58 AM
  3. Replies: 1
    Last Post: 2007-01-19, 07:10 PM
  4. Hiding completed tasks
    By nkendrick in forum Help
    Replies: 1
    Last Post: 2006-03-23, 10:06 AM
  5. Tasks views should not display completed tasks
    By andrewstuart in forum Feature Requests
    Replies: 5
    Last Post: 2005-01-12, 04:31 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
  •