Version 7.7.1 Default Project View is Gantt Chart, How to Change

How can we change the default view for projects back to DetailView from Gantt when click in list view or after saving the project? It is a cool idea, but doesn’t work well in our organization.

Thanks,
sieberta

OK, I have done this but it isn’t upgrade safe, and I’m not knowledgeable enough to make it upgrade safe… here are the changes:

/modules/Project/tpls/ListViewGeneric.tpl

This was view_GanttChart before…

{capture assign=action}{if $act}{$act}{else}DetailView{/if}{/capture}

/modules/Project/metadata/editviewdefs.php

 'buttons_footer' => 
        array (
          0 => 
          array (
		  // ADS Changed to DetailView... not sure this one is necessary
            'customCode' => '<input title="{$APP.LBL_SAVE_BUTTON_TITLE}" id ="SAVE_HEADER" accessKey="{$APP.LBL_SAVE_BUTTON_KEY}" class="button primary" onclick="SUGAR.projects.fill_invitees();document.EditView.action.value=\'Save\'; document.EditView.return_action.value=\'DetailView\'; {if isset($smarty.request.isDuplicate) && $smarty.request.isDuplicate eq "true"}document.EditView.return_id.value=\'\'; {/if} formSubmitCheck();"type="button" name="button" value="{$APP.LBL_SAVE_BUTTON_LABEL}">',		  
//            'customCode' => '<input title="{$APP.LBL_SAVE_BUTTON_TITLE}" id ="SAVE_HEADER" accessKey="{$APP.LBL_SAVE_BUTTON_KEY}" class="button primary" onclick="SUGAR.projects.fill_invitees();document.EditView.action.value=\'Save\'; document.EditView.return_action.value=\'view_GanttChart\'; {if isset($smarty.request.isDuplicate) && $smarty.request.isDuplicate eq "true"}document.EditView.return_id.value=\'\'; {/if} formSubmitCheck();"type="button" name="button" value="{$APP.LBL_SAVE_BUTTON_LABEL}">',
          ),

/modules/Project/Save.php
Watch out for this one because you have to change the action and the word “project_id” to “record”.

if ($sugarbean->is_template){
    header("Location: index.php?action=ProjectTemplatesDetailView&module=Project&record=$return_id&return_module=Project&return_action=ProjectTemplatesEditView");
}
else{
	//customize default retrun view to make it to redirect to GanttChart view
	// ADS changed this back to DetailView 
	$_REQUEST['return_url'] = "index.php?module=Project&action=DetailView&record=" . $return_id;
	// $_REQUEST['return_url'] = "index.php?module=Project&action=view_GanttChart&project_id=" . $return_id;
    handleRedirect($return_id,'Project');
}