Recurring tasks

Open to all! Ask other shopowners for help.
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

Recurring tasks

Post by Kofod95 »

Structure is helpful in many cases, but sometimes it's hard to fit everything in your head.
For that reason, I've made this little add-on to create recurring tasks.
It concists of a new admin page to create, edit and delete recurring tasks, a dashboard module to show tasks that needs to be done and an admin/login-hook to make the tasks active, when they are due.

If anyone finds it useful, feel free to use it, alter it or whatever you may want.
I would really appreciate some feed-back on it, if someone decides to try it or even use it!
Things I really want to know is:
  • Is it easy to use?
  • Does it work as expected?
  • Can you break it with actions that you would be likely to do? (I know at least one easy way to make it produce errors, but that is easily solveable and I wouldn't expect anyone to take those actions)
  • Do you miss some instructions (fx should the page tell about the dashboard-module or should something be clarified further)?
  • Should some things work in another way?
  • How can it be improved?
It's packaged with the Zipur-bundler, so use that to install or just ignore the file "update.php". The SQL will be installed from the new admin-page (admin/tasks.php - link is placed under "Tools")
You do not have the required permissions to view the files attached to this post.
Last edited by Kofod95 on Fri Nov 24, 2023 9:13 pm, edited 4 times in total.
I'm not smart, but sometimes even a blind chicken can find a corn.
Here are a lot of corns: Phoenix user guide

Tags:


Join The Code Co-op to get access to your library in the Code Co-op Forum
Denzel
Member
Posts: 87
Joined: Sat Oct 31, 2020 7:22 pm
Phoenix Version:
Has thanked: 9 times
Been thanked: 15 times

Re: Recurring tasks

Post by Denzel »

Very nice :) Just a few days before, there was a notice/task add in my mind... First try is doing well, only some optical improvements possible:

- Task with Link +Description looks like this on dashboard:
Unbenannt.PNG

- Task infobox may have the ratio in clear text and no <tr> for the empty fields (or just saying Link:)
Unbenannt2.PNG

A functional think: Maybe a "renew"-button would be useful for tasks without ratio, as they stay in the db anyway.

All done - Good job! ;)
Regards,
Denzel
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 »

Denzel wrote: Mon Nov 20, 2023 4:08 pm - Task with Link +Description looks like this on dashboard:
Thank you! Seems I forgot to try out a last minute change... Will correct and upload a bug-fix.
Denzel wrote: Mon Nov 20, 2023 4:08 pm - Task infobox may have the ratio in clear text and no <tr> for the empty fields (or just saying Link:)
Yea, I got the id's of the ratios so stuck in my head that I auto-translated them... I was sure I had made the program translate, but clearly not. Thank you for giving a blind man vision (not litteraly)!
Good idea to just hide the link when not present; I'll add that! 👍
Denzel wrote: Mon Nov 20, 2023 4:08 pm A functional think: Maybe a "renew"-button would be useful for tasks without ratio, as they stay in the db anyway.
Didn't think of that! Honestly, I think I just forgot about the "once"-tasks, so they aren't deleted on completion. An option to renew might be better than deleting - One can always delete themselves later on, so thank you for that suggestion!

And thank you very much for taking the time to give some feedback - it's much appreciated!

//Daniel
Last edited by Kofod95 on Mon Nov 20, 2023 6:52 pm, edited 1 time in total.
I'm not smart, but sometimes even a blind chicken can find a corn.
Here are a lot of corns: Phoenix user guide
14Steve14
Senior Contributor
Posts: 921
Joined: Fri Oct 25, 2019 7:01 pm
Phoenix Version: v1.0.9.1
Has thanked: 17 times
Been thanked: 103 times

Re: Recurring tasks

Post by 14Steve14 »

@Kofod95 Just installed this with no problems. Everything works as I m=imagine that it would. I can see lots of tasks that could do with a reminder as I do forget to do some things. The reminders are a good idea and I assume that the text can be edited after to allow the user to see where they got, and what else could be done.

I do like the idea of a RENEW button.

I will have a fiddle with this as see if anything could be improved. So far though, it does what it says it will.
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 »

14Steve14 wrote: Mon Nov 20, 2023 6:13 pm [...] I assume that the text can be edited after to allow the user to see where they got, and what else could be done.
Yes, changing the task shouldn't change it's status, unless, of course the recur-ratio is changed. Which makes me aware of a flaw I need to fix, as a task that used to be yearly never would recur, if changed to another ratio... Editing a task should probably reset the completion to zero to make sure it will recur, even if that means one might have to check it immediately after editing. Thank you for bringing that to my attention!
14Steve14 wrote: Mon Nov 20, 2023 6:13 pm I do like the idea of a RENEW button.
Good, thank you! I'll add that along with something to make it clearer on tasks.php which tasks are set as "once" (they are sorted together, but it might be hard to tell them apart with no clear indications of what belongs where)
14Steve14 wrote: Mon Nov 20, 2023 6:13 pm I will have a fiddle with this as see if anything could be improved. So far though, it does what it says it will.
Thank you very much for that and for taking the time to test it out and comment! I really appreciate it, and it makes it easier for me to improve what needs improving 😊

//Daniel
I'm not smart, but sometimes even a blind chicken can find a corn.
Here are a lot of corns: Phoenix user guide
Omar_one
Senior Contributor
Posts: 676
Joined: Fri Oct 25, 2019 5:06 pm
Phoenix Version: v1.0.8.16
Has thanked: 100 times
Been thanked: 56 times

Re: Recurring tasks

Post by Omar_one »

Kofod95 wrote: Mon Nov 20, 2023 11:47 am a dashboard module to show tasks that needs to be done and an admin/login-hook to make the tasks active,
Thank you @Kofod95 for this module ..
it's not a bug but if someone didn't install the dashboard module,
will got a blank login page because the updateTasks.php hook ask for the enabled dashboard module

Code: Select all

if(MODULE_ADMIN_DASHBOARD_TASKS_STATUS == 'True') {  
and here is the error

Code: Select all

PHP Fatal error:  Uncaught Error: Undefined constant "MODULE_ADMIN_DASHBOARD_TASKS_STATUS" in /home/xxxx/public_html/includes/hooks/admin/login/updateTasks.php:16
Stack trace:
#0 /home/xxxx/public_html/includes/system/versioned/1.0.8.1/hooks.php(150): hook_admin_login_updateTasks->listen_injectSiteStart(Array)
#1 /home/xxxx/public_html/admin/includes/template_top.php(23): hooks->cat('injectSiteStart')
#2 /home/xxxx/public_html/admin/login.php(56): require('/home/hattufi/p...')
#3 {main}
  thrown in /home/xxxx/public_html/includes/hooks/admin/login/updateTasks.php on line 16

Br
Omar
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 »

Omar_one wrote: Mon Nov 20, 2023 7:30 pm it's not a bug but if someone didn't install the dashboard module,
will got a blank login page because the updateTasks.php hook ask for the enabled dashboard module
Oh yea, thank you!
I'll add a check to make sure it's defined. That was an oversight on my end.

Thank you as well for taking the time to test and comment! It's 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
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 »

Bugfix released in original post (1.0.1)
Changes:
  • Corrected display in dashboard-module when a link is added to the task
  • The recurrence-ratio has been given meaningful text instead of numbers
  • The table-row for links is hidden when no link is added
  • A button to renew tasks has been added to the infoBox of tasks that are completed (and a new action-file makes it do what it says)
  • Editing a task will reset the time of completion to zero to prevent a task getting lost if the ratio is changed
  • The recurrence ratio is now shown in the table listing all tasks
  • The login hook now checks for the data it needs instead of reading for a constant that may not be defined or may be a false positive
Thanks for the feedback so far! Please don't hestitate to bring up more things, if you think of some!

//Daniel
I'm not smart, but sometimes even a blind chicken can find a corn.
Here are a lot of corns: Phoenix user guide
Denzel
Member
Posts: 87
Joined: Sat Oct 31, 2020 7:22 pm
Phoenix Version:
Has thanked: 9 times
Been thanked: 15 times

Re: Recurring tasks

Post by Denzel »

Hi Daniel,

looks very good! I like those Tooltips, but they stay after opening a link ;) 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?).

Regards,
Denzel
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 »

Using your latest edit/update.

It would be helpful to have a ReadMe. Think that is a must have for all Addons.

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.


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