This topic contains 6 reply and 3 voices, and was last updated by Zoltan 4 years, 8 months ago
Viewing 6 Posts - 1 through 6 (of 6 total)
Author Posts
November 5, 2014 at 12:30 am 29713
Zoltan Could you ask a developer if there is an existing hook to identify past due tasks? I want to set a style to be highlighted if the task is past due. Thanks for any direction you can provide. c.
November 5, 2014 at 3:02 pm 29756
towhid towhid

Hello Kristin,

I have talked with our developer team. They said currently we do not have this hook. But you can customize on your responsibility.

Please follow this link for task class – “wp-project-manager-pro/class/task.php” function name is: current_user_task() and View Page – “wp-project-manager-pro/views/task/my-task.php”

Please let me know if you have faced any difficulty.

Thank You. 🙂

November 6, 2014 at 1:03 am 29798
Kristin Kristin

I ended up writing a function to compare task date with the last 24 hours to see if it was expired and then echo’d a CSS class into “cpm-due-date” span. The bottom part is for our multiuser assign piece I finished. We can now assign tasks to multiple users. SUPER NICE!!!

<?php 
                		//
                		//
                		// Check for due date and compare to todays date set a variable for CSS in the date due field
                    	$due_date = get_post_meta( $task->ID, '_due', true );
          
                    	if((time()-(60*60*24)) < strtotime($due_date)){
                    		//echo "your safe sucka";
                    		
                    	}else{  	
                    		$cssduedate = "past-due";
                    	 	//echo "over due";
                    	}
                    //	
                    // Loop to look for all users assigned to task          
                    //
                    foreach ($task->assigned_to as $userID) {
                   	
                    ?>

November 6, 2014 at 12:22 pm 29827
towhid towhid

Hello Kristin,

You have done a great job. Next update we will fix this issue.

Thank You. 🙂

January 3, 2015 at 9:56 pm 33353
Zoltan Zoltan

Hi Kristin,
can you share the code with us, pls? I need exactly the same function (assign task to multiple user), but if you can share it, I don’t have to write it. 🙂
Thanks, Zoltan

January 7, 2015 at 1:47 am 33510
Kristin Kristin

It’s a good bit of code over several files.

January 7, 2015 at 2:58 am 33514
Zoltan Zoltan

Ok, I understand. I have to do it for myself… 🙂

Viewing 6 Posts - 1 through 6 (of 6 total)