Recurring tasks

Open to all! Ask other shopowners for help.
heatherbell
Senior Contributor
Posts: 2540
Joined: Mon Oct 07, 2019 4:39 am
Phoenix Version:
Has thanked: 35 times
Been thanked: 243 times

Re: Recurring tasks

Post by heatherbell »

Dev Tools gives a warning.
Maybe the issue is on Line 35 /admin/includes/modules/dashboard/d_tasks.php
Screenshot 2023-11-21 073854.png
You do not have the required permissions to view the files attached to this post.

Tags:


Join The Code Co-op to get access to your library in the Code Co-op Forum
User avatar
burt
Core Team
Posts: 4550
Joined: Tue Oct 29, 2019 9:37 am
Phoenix Version: v1.1.0.8
Has thanked: 252 times
Been thanked: 412 times

Re: Recurring tasks

Post by burt »

It's a really nice concept and idea. I've not yet had time to install but I will try today and give some feedback.
ecartz
Core Team
Posts: 3084
Joined: Tue Nov 05, 2019 6:02 pm
Phoenix Version:
Has thanked: 4 times
Been thanked: 208 times

Re: Recurring tasks

Post by ecartz »

heatherbell wrote: Tue Nov 21, 2023 7:47 am Maybe the issue is on Line 35 /admin/includes/modules/dashboard/d_tasks.php
The warning is a bit misleading. The actual problem is that the label tag isn't closed. Should be

Code: Select all

		  $output .= '<label for="task-checkbox-' . $task['task_id'] . '"><a tabindex="0" role="button" data-toggle="popover" data-placement="bottom" data-trigger="focus" title="' . $task['task_title'] . '" data-content="' . $task['task_description'] . '">' . $shown_title . '</a></label>&emsp;';
The "> added. The label not being closed is probably causing other issues. Maybe preventing that link from working?
heatherbell
Senior Contributor
Posts: 2540
Joined: Mon Oct 07, 2019 4:39 am
Phoenix Version:
Has thanked: 35 times
Been thanked: 243 times

Re: Recurring tasks

Post by heatherbell »

Multiple errors caused by /includes/hooks/admin/login/updateTasks.php when trying to log into Admin.
User avatar
Kofod95
Senior Contributor
Posts: 748
Joined: Sat Feb 06, 2021 7:38 pm
Phoenix Version: 1.0.8.20
Has thanked: 99 times
Been thanked: 179 times

Re: Recurring tasks

Post by Kofod95 »

Denzel wrote: Tue Nov 21, 2023 7:13 am [...] I like those Tooltips, but they stay after opening a link ;)
Think I found a solution for that - version 1.0.2 uploaded (or at least it will be shortly)
Denzel wrote: Tue Nov 21, 2023 7:13 am The only thing I can think of now is to display the remaining time in the task panel until the task is due again (maybe days left?).
Not a bad idea - I'll see if I can get that included now or if someone else does it or if it'll have to wait :)
heatherbell wrote: Tue Nov 21, 2023 7:23 am It would be helpful to have a ReadMe. Think that is a must have for all Addons.
You are right. I will write one and include it in the package.
heatherbell wrote: Tue Nov 21, 2023 7:23 am It would be good to enable assigning Tasks to people where more than 1 person is administrating the website and showing that on the Dashboard module. E.g. adding a configuration for "F.A.O." (For Attention Of) with an input for a Name or maybe a drop down of Administrators but allowing for "one man bands", that is, show nothing if nothing input.
Should all be able to see all tasks on the dashboard, or should it hide the tasks that are assigned to someone else?
Further, is it enough with one assigned, or would it be better if it could assign the same task to multiple persons? Maybe also with some sort of configuration to decide whether the task needs to be solved once among the assigned people or if everyone should solve it (the latter would be the same as creating the same task over for every person that needs to do it).
Let me know your thoughts and I'll see what could be done

ecartz wrote: Tue Nov 21, 2023 10:55 am The "> added.
Well caught, thank you! Fixed that stupid mistake...
heatherbell wrote: Tue Nov 21, 2023 2:39 pm Multiple errors caused by /includes/hooks/admin/login/updateTasks.php when trying to log into Admin.
Fixed, thank you. I was just a bit too trigger-happy last night, as Denmark was losing to Northern Ireland and my temper got the better of me ;)

Thank you all for your feedback and testing!
It's very much appreciated!

//Daniel
I'm not smart, but sometimes even a blind chicken can find a corn.
Here are a lot of corns: Phoenix user guide
heatherbell
Senior Contributor
Posts: 2540
Joined: Mon Oct 07, 2019 4:39 am
Phoenix Version:
Has thanked: 35 times
Been thanked: 243 times

Re: Recurring tasks

Post by heatherbell »

Kofod95 wrote: Tue Nov 21, 2023 9:18 pm Should all be able to see all tasks on the dashboard, or should it hide the tasks that are assigned to someone else?
Further, is it enough with one assigned, or would it be better if it could assign the same task to multiple persons? Maybe also with some sort of configuration to decide whether the task needs to be solved once among the assigned people or if everyone should solve it (the latter would be the same as creating the same task over for every person that needs to do it).
Now that sounds like a rabbit hole but who knows what you might find there just for fun and learning!
For the vast majority of Phoenix Cart use cases, this addon is more than fine.
My comment was only as food for thought and not feature request ;)
However, just to answer your question, consider that all Tasks would have to be visible to the Boss.
Add to that, there is a common workplace scenario of a Task assigned to a tired Tom but being performed by a helpful Harry which should be recorded for the purpose of task review by the Boss.
Further down the rabbit hole, have you thought about extending this addon to a kanban style to show workflow? :shock: :o

BTW - tested the latest edit/update and previous issues have gone. 👍
Maybe change Description and Popover to enable HTML like Title?
screen221123-1.png
You do not have the required permissions to view the files attached to this post.
User avatar
Pierre_P
Contributor
Posts: 144
Joined: Fri Mar 12, 2021 5:06 am
Phoenix Version: v1.1.0.6
Has thanked: 21 times
Been thanked: 11 times

Re: Recurring tasks

Post by Pierre_P »

heatherbell wrote: Wed Nov 22, 2023 5:53 am Now that sounds like a rabbit hole but who knows what you might find there just for fun and learning!
For the vast majority of Phoenix Cart use cases, this addon is more than fine.
My comment was only as food for thought and not feature request ;)
However, just to answer your question, consider that all Tasks would have to be visible to the Boss.
Add to that, there is a common workplace scenario of a Task assigned to a tired Tom but being performed by a helpful Harry which should be recorded for the purpose of task review by the Boss.
Further down the rabbit hole, have you thought about extending this addon to a kanban style to show workflow?
Nice work!
Assigning task to different users and recording which user done the task will be great addition.
For multiple admin users not all admins performs the same tasks.
Like Heather put it also the tired Tom issue
;)
User avatar
burt
Core Team
Posts: 4550
Joined: Tue Oct 29, 2019 9:37 am
Phoenix Version: v1.1.0.8
Has thanked: 252 times
Been thanked: 412 times

Re: Recurring tasks

Post by burt »

After uploading files, trying to log into Admin results in [Phoenix Fatal];
[Wed Nov 22 09:27:09.283319 2023] [php7:warn] [pid 9712:tid 1788] [client ::1:55805] PHP Warning: DB: [1146] Table 'slug.tasks' doesn't exist from <SELECT task_id, task_recurrence, task_completed FROM tasks WHERE task_done = 1> in \www\10821-slug\includes\system\versioned\1.0.8.1\database_core.php on line 44
This is using newly downloaded files from 1st post; recurringTasks_1_0_2.zip

Changing /includes/hooks/admin/login/updateTasks.php:16 to

Code: Select all

if(mysqli_num_rows($GLOBALS['db']->query("SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA='". DB_DATABASE . "' AND TABLE_NAME LIKE 'tasks'")) > 0) {
solves it.
I am not here to build for you.
I am here to build with you. Let's help each other.
User avatar
burt
Core Team
Posts: 4550
Joined: Tue Oct 29, 2019 9:37 am
Phoenix Version: v1.1.0.8
Has thanked: 252 times
Been thanked: 412 times

Re: Recurring tasks

Post by burt »

I'm just going to give thoughts off the top of my head. Some might be useable, some not.

1. Get rid of recurrence ratio, and simply have it as "how often to recur (days)". Allowing user to insert any number here. Maybe someone needs to do something every 2 days? Might be too much of a recode in the logic. Then again how granular to go ? Maybe something needs doing every hour!

2. Entirely get rid of the "pressing the button beneath" and "Remove" button. Too easy to accidentally click. Keep the delete action though and when someone wants to nuke it, they could be pointed at the relevant URL (ie they type in the browser bar).

3. Not sure if this is my installation (localhost, not real webhost) but the checkbox in the dashboard module, seems to do nothing. Changing /includes/hooks/admin/index/tasks.php:15 to

Code: Select all

public function listen_injectBodyEnd() {
solves it.

4. Make newly installed dashboard module default to 6 width (I think it's 4 in the module)

5. I also swapped some code around (dashboard module) for a "to my eyes" easier to read display;
tasks.jpg
Let me know if you want that changed code, it's nothing much changed.
You do not have the required permissions to view the files attached to this post.
User avatar
Kofod95
Senior Contributor
Posts: 748
Joined: Sat Feb 06, 2021 7:38 pm
Phoenix Version: 1.0.8.20
Has thanked: 99 times
Been thanked: 179 times

Re: Recurring tasks

Post by Kofod95 »

burt wrote: Wed Nov 22, 2023 9:31 am Changing /includes/hooks/admin/login/updateTasks.php:16
Wow. That was quite a mistake... Thank you! For some reason, I'm terrible at testing my own stuff - I catch next to nothing...

Thanks for the other reply as well - I'll get back to it tomorrow. I'm out of time today.
The same goes for the two previous replies; I'll get back tomorrow - thank you for the inputs and please don't hold anything back!

//Daniel
I'm not smart, but sometimes even a blind chicken can find a corn.
Here are a lot of corns: Phoenix user guide


Join The Code Co-op to get access to your library in the Code Co-op Forum
Post Reply