Skip to content

Single Task: Due Date and Priority not shown. #92

@ruudvh

Description

@ruudvh

When viewing a single task, the due date and priority is not shown.

The issue is here:
(Around line 15 in content-single-task.php)

<?php if ( $due_date = cp_get_the_task_due_date() ) {
  echo '<div>' . __( 'Due date: ', 'collabpress' ) . $due_date . '</div>';
} ?>
<?php if ( ( $priority = cp_get_the_task_priority() ) != 'None' ) {
   echo '<div>' . __( 'Priority: ', 'collabpress' ) . $priority . '</div>';
} ?>

The function cp_get_the_task_due_date() and cp_get_the_tak_priority() seem not to be functioning properly.

To fix it, replace it with the following:

<?php if ( $due_date = cp_get_task_due_date_mysql( cp_get_the_task_ID() ) ) {
   echo '<div>' . __( 'Due date: ', 'collabpress' ) . $due_date . '</div>';
} ?>
<?php if ( ( $priority = cp_get_task_priority( cp_get_the_task_ID() ) ) != 'None' ) {
   echo '<div>' . __( 'Priority: ', 'collabpress' ) . $priority . '</div>';
} ?>

The only thing it does is skip a step. The functions cp_get_the_task_due_date() and cp_get_the_tak_priority() actually call the functions cp_get_task_due_date_mysql() and cp_get_task_priority().

Please note this is a quick fix, and might not be the ideal solution.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions