Home Forums Plugin Support WP Project Manager Pro Past Due Task Hook

This topic is: not resolved

Tagged: , , ,

This topic contains 6 replies, has 3 voices, and was last updated by  Zoltan 4 years, 5 months ago.

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #29713

    Kristin
    Member
    Post count: 27

    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.

    #29756

    towhid
    Participant
    Post count: 4505

    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. ๐Ÿ™‚

    #29798

    Kristin
    Member
    Post count: 27

    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) {
                       	
                        ?>

    #29827

    towhid
    Participant
    Post count: 4505

    Hello Kristin,

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

    Thank You. ๐Ÿ™‚

    #33353

    Zoltan
    Member
    Post count: 3

    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

    #33510

    Kristin
    Member
    Post count: 27

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

    #33514

    Zoltan
    Member
    Post count: 3

    Ok, I understand. I have to do it for myself… ๐Ÿ™‚

Viewing 7 posts - 1 through 7 (of 7 total)

The topic ‘Past Due Task Hook’ is closed to new replies.