How do solve this ? Help pls

Discussion in 'PHP' started by 8707, Mar 16, 2010.

  1. #1
    if ($focus->column_fields['ticketstatus'] == "Closed")
    {
    	if ($focus->column_fields['cf_469'] =="" )
    	{
    		$focus->column_fields['cf_469'] = getUserFullName($current_user->id); 
    		
    	}
    	if ($focus->column_fields['cf_629'] =="")
    	{
    		$focus->column_fields['cf_629'] = date('Y-m-d H:i'); 
    	}
    }
    elseif ($focus->column_fields['ticketstatus'] == "Resolved")
    {
    	if ($focus->column_fields['cf_469'] =="")
    	{
    		$focus->column_fields['cf_469'] = getUserFullName($current_user->id); 
    	}
    	if ($focus->column_fields['cf_629'] =="")
    	{
    		$focus->column_fields['cf_629'] = date('Y-m-d H:i'); 
    	}
    }
    else 
    {
    	$focus->column_fields['cf_629'] = ""; 
    	$focus->column_fields['cf_469'] = ""; 
    	$focus->column_fields['cf_630'] = "";
    }
    Code (markup):
    Hi all,

    When status = resolved, cf_469 will capture current username and cf_629 will capture current date/time. But when status change to "closed", cf_469 and cf_629 is not empty, so it will not capture the current username and date.

    So, i want to ask that how to automatic capture the username and date when status change from resolve to closed?
     
    8707, Mar 16, 2010 IP
  2. bartolay13

    bartolay13 Active Member

    Messages:
    735
    Likes Received:
    14
    Best Answers:
    1
    Trophy Points:
    98
    #2
    technically you want to refresh the page when an event occur?
     
    bartolay13, Mar 16, 2010 IP
  3. 8707

    8707 Peon

    Messages:
    9
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I need to click save button first!
     
    8707, Mar 16, 2010 IP
  4. bartolay13

    bartolay13 Active Member

    Messages:
    735
    Likes Received:
    14
    Best Answers:
    1
    Trophy Points:
    98
    #4
    are you pertaining to the form post/get??? your instructions are not that clear based on your code example.
     
    bartolay13, Mar 16, 2010 IP