News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Tasks Manager

Started by Diego Andrés, February 19, 2022, 11:18:08 PM

Previous topic - Next topic

Diego Andrés

Link to the mod




Tasks Manager
Developed by Diego Andrés
Sponsored by Database Dreams




Introduction
Tasks Manager lets you configure projects along with assigning individual or multiple tasks to each project. You can create categories and statuses for both projects and categories and filter through them.

Features
  • Projects
    • Categories
    • Statuses
    • Types
    • Set starting and ending dates
  • Tasks
    • Categories
    • Statuses
    • Set starting and ending dates
    • Set estimates for completion
    • Booking log
  • Settings
    • Permissions
    • Pagination settings
    • Filter settings

Localization
English
Russian by Bugo
Turkish by gevv


Crowdin
Changelog
GitHub

SMF Tricks - Free & Premium Responsive Themes for SMF.

mickjav

Found A Couple of Things

  • The End Date Does not allow for the same date as the start date, There are a number of tasks that have less then 9 hrs so these can/should be completed On same day
  • Please See image would it be possible to remove the history list for the date fields?

You cannot view this attachment.

Diego Andrés

1.0.1 - 21 February 2022
- Remove auto-complete from date inputs.
- Return to filter when editing tasks.
- Improved filter language.
- Allow to use the same date for projects and tasks.

SMF Tricks - Free & Premium Responsive Themes for SMF.

mickjav

Thanks I'll update tomorrow.

If anybodies interested in seeing a working version check it out here
Task manager

mickjav

Hi The "Return to filter when editing tasks" Returns me to the home page Instead of the tasks List.

I've also updated the Test forum

all the best mick

mickjav

I've also edited the database as below

description varchar(500) Found when adding some descriptions 255 was not enough
additional_details varchar(1000) When Adding Additional Resources: Links It cut them short.

regards mick

Diego Andrés

Fixed

1.0.2 - 22 February 2022
- Increased width of tasks and projects name/title.
- Fixed occasional missing language string.
- Fixed redirect link after editing a task.

I'll work on v1.1 at some point so any suggestions or feedback I'll just add it to that

SMF Tricks - Free & Premium Responsive Themes for SMF.

mickjav



mickjav

Made A Few Edits  ;D I'm still new to PHP/MYSQL So hope what I've done Isn't too bad lol

Not sure if this is right place To post this

Task Manager


Find In Themes/default/languages/TasksManager/.english.php

$txt['TasksManager_projects_view_tasks'] = 'View tasks';
Add Below:
$txt['TasksManager_projects_Total_tasks'] = 'Tasks';
Create Link Of Project Name

Find In Sources/TasksManager/Projects.php
'function' => function($row)
{
$title = '<h6>' . $row['project_title'] . '</h6>';

Replace With
'function' => function($row) use ($txt, $scripturl)
{
$dlink ='<a href="' . $scripturl . '?action=tasksmanager;area=tasks;sa=index;project=' . $row['project_id'] . '">' . $row['project_title'] . '</a>';
$title = '<h6>' . $dlink . '</h6>';

Get count of Tasks For each project
Find Around Line 619
SELECT
p.project_id, p.project_title, p.project_picture, p.view_type,
p.category_id, p.start_date, p.end_date, p.description, p.additional_details,
p.type_id, p.status_id, c.category_name, t.type_name, s.status_name
FROM {db_prefix}taskspp_projects AS p
LEFT JOIN {db_prefix}taskspp_project_categories AS c ON (c.category_id = p.category_id)
LEFT JOIN {db_prefix}taskspp_project_types AS t ON (t.type_id = p.type_id)
LEFT JOIN {db_prefix}taskspp_project_status AS s ON (s.status_id = p.status_id) ' . (!empty($query) ?
$query : '') . '
ORDER BY {raw:sort}
LIMIT {int:start}, {int:limit}',

Replace with
SELECT
p.project_id, p.project_title, p.project_picture, p.view_type,
p.category_id, p.start_date, p.end_date, p.description, p.additional_details,
p.type_id, p.status_id, c.category_name, t.type_name, s.status_name, Count(d.task_id) As tasks
FROM {db_prefix}taskspp_projects AS p
LEFT JOIN {db_prefix}taskspp_tasks AS d ON (d.project_id = p.project_id)
LEFT JOIN {db_prefix}taskspp_project_categories AS c ON (c.category_id = p.category_id)
LEFT JOIN {db_prefix}taskspp_project_types AS t ON (t.type_id = p.type_id)
LEFT JOIN {db_prefix}taskspp_project_status AS s ON (s.status_id = p.status_id) ' . (!empty($query) ?
$query : '') . '
GROUP BY p.project_id
ORDER BY {raw:sort}
LIMIT {int:start}, {int:limit}',

Update The Status Column
Find
// Tasks Link
$status .= '<br /><a href="' . $scripturl . '?action=tasksmanager;area=tasks;sa=index;project=' . $row['project_id'] . '">' . $txt['TasksManager_projects_view_tasks'] . '</a>';

Replace With

// Count Tasks
$status .= '<br /><strong>'. $txt['TasksManager_projects_Total_tasks'] . ':</strong> '  . $row['tasks'];





mickjav

Made Another Update Thanks to @Arantor for his help solving the last issue and as Always @Diego Andrés for his magic i was able to use.

As Always View The Results Here

NOTE THIS ASSUMES YOU HAVE USED MY LAST UPDATE?

Find In Themes/default/languages/TasksManager/.english.php

$txt['TasksManager_projects_Total_tasks'] = 'Tasks';
Replace with
$txt['TasksManager_projects_Total_tasks'] = 'Total Tasks';
Find In Sources/TasksManager/Projects.php

$status .= '<br /><strong>'. $txt['TasksManager_projects_Total_tasks'] . ':</strong> '  . $row['tasks'];
Add Below:
// Minutes
$minutes = (!empty($row['minutes_worked']) ? ($row['minutes_worked'] % 60) : 0);

// Actual hours
$hours = $row['hours_worked'] + floor($row['minutes_worked'] / 60);

$status .= '<br /><strong>'. $txt['TasksManager_tasks_time_booked'] . ':</strong> ' . (!empty($hours) || !empty($minutes) ? sprintf('%02d', $hours). ':' . sprintf('%02d', $minutes) : $txt['TasksManager_no_total_time']);

Find Around Line 628
SELECT
p.project_id, p.project_title, p.project_picture, p.view_type,
p.category_id, p.start_date, p.end_date, p.description, p.additional_details,
p.type_id, p.status_id, c.category_name, t.type_name, s.status_name, Count(d.task_id) As tasks
FROM {db_prefix}taskspp_projects AS p
LEFT JOIN {db_prefix}taskspp_tasks AS d ON (d.project_id = p.project_id)
LEFT JOIN {db_prefix}taskspp_project_categories AS c ON (c.category_id = p.category_id)
LEFT JOIN {db_prefix}taskspp_project_types AS t ON (t.type_id = p.type_id)
LEFT JOIN {db_prefix}taskspp_project_status AS s ON (s.status_id = p.status_id) ' . (!empty($query) ?

Replace With
SELECT
p.project_id, p.project_title, p.project_picture, p.view_type,
p.category_id, p.start_date, p.end_date, p.description, p.additional_details,
p.type_id, p.status_id, c.category_name, t.type_name, s.status_name, COUNT(DISTINCT d.task_id) As tasks,
SUM(ts.hours_worked) AS hours_worked, SUM(ts.minutes_worked) AS minutes_worked
FROM {db_prefix}taskspp_projects AS p
LEFT JOIN {db_prefix}taskspp_tasks AS d ON (d.project_id = p.project_id)
LEFT JOIN {db_prefix}taskspp_timesheet AS ts ON (ts.task_id = d.task_id)
LEFT JOIN {db_prefix}taskspp_project_categories AS c ON (c.category_id = p.category_id)
LEFT JOIN {db_prefix}taskspp_project_types AS t ON (t.type_id = p.type_id)
LEFT JOIN {db_prefix}taskspp_project_status AS s ON (s.status_id = p.status_id) ' . (!empty($query) ?






mickjav

I'm not able to do it myself as looked at it and really not sure enough on what I would be doing to tackle it  ;D

I would like to Move the Modify And Delete columns into One Column this would give a little bit more real estate for Admins.

Hopefully it will make it into a edit for the next version  8)

https://www.databasedreams.co.uk/support/index.php?action=tasksmanager

mick

Diego Andrés

1.1 - 03 March 2022
Translation Russian translation provided by Bugo
New Feature Added 'Who" action integration.
Improvement Merged delete and modify columns.
Improvement It now uses the topics table to assign tasks.
New Feature Added total tasks counter to projects.
New Feature Added total time booked from tasks to projects.
Bug Fix Fixes issues with some queries.
Improvement Code cleanup.

SMF Tricks - Free & Premium Responsive Themes for SMF.

mickjav

Have Updated Which looks good But have found that It seems to remove all Topic links from Tasks but have checked the table and they are still there??

All The Best mick

Chart Tracker Elite Tasks

mickjav

Just noticed The Book Time: Tasks Lists Seems To Use "Amount of items to show in the filters" But This will cause problems, I had to adjust "Amount of items to show in the filters" So I could select what I needed??

Can you do the list like, I expect to have hundreds of tasks for different projects some of which I may have to revisit from time to time

Project 1
--Task 1
--Task 2
Project 2
-- Task 1
-- Task 2

act

mick

Diego Andrés

Quote from: mickjav on March 06, 2022, 08:05:07 AMHave Updated Which looks good But have found that It seems to remove all Topic links from Tasks but have checked the table and they are still there??

All The Best mick


It now uses the topics table to remove the extra query in the topic page.
The topic column has been removed from tasks.

SMF Tricks - Free & Premium Responsive Themes for SMF.

Diego Andrés

Quote from: mickjav on March 06, 2022, 08:50:10 AMJust noticed The Book Time: Tasks Lists Seems To Use "Amount of items to show in the filters" But This will cause problems, I had to adjust "Amount of items to show in the filters" So I could select what I needed??

You mean you want to be displaying the whole list A-Z when adding a new entry?

SMF Tricks - Free & Premium Responsive Themes for SMF.

mickjav

If you have left the default 20 Entries And are filtering by Name Then if you have say 35 Tasks in your tasks table it may only show those tasks that start with the letters A-S and if you want to add time for a task that begins with T you can't as it wont be in the list

mickjav

Sorry just trying to understand You said you Had to Run A Query I prusume to check that the topic existed?

which You changed for this LEFT JOIN {db_prefix}topics AS t ON (t.tasks_task_id = tk.task_id)


That's still going to cause the system to work hard to build that query but Less than before I.E this site has 480k topics.

Why not Update the Topic Delete function so it checks for a linked topic in the tasks table that would remove the overhead completely?

As I said just trying to understand :)

tmachu

Really useful and nice mod, I will definitely use it, thanks Diego Andrés.

Advertisement: