Feature #1176
openRecurring Tasks
0%
Description
Can we implement recurring tasks in Redmine? We have predefined set of tasks which runs over a long period. Is it possible to generate tasks using a frequency (say weekly, monthly etc.)?
I see that we are able to duplicate a task using Copy feature. Will it be difficult to implement a "Repeat" feature?
Files
Related issues
Updated by Carl Nygard over 16 years ago
The nice thing about the RoR and redmine is that the model is separate from the interface. That means you can write your own little scripty thing to (let's say) copy a default template issue to a new issue. Then a simple crontab entry to run your special script periodically would be all you need to implement your feature for yourself.
As a starting point, look through the code (probably app/controllers/issues_controller.rb) for the function that copies an issue, and duplicate those bits in your script.
Updated by Anthony Topper about 16 years ago
While script plus Cron suggestion is great, I still say that I would appreciate seeing recurring tasks appear in Redmine.
Updated by Toni Kerschbaum about 15 years ago
+1
I know Redmine is targeted towards project management, but this feature would be a great addition overall.
Updated by Arnaud Lesauvage almost 15 years ago
+1
We use Redmine as a task management tool (we also use it for project management of course), and this would be a great feature.
Updated by Romain Dorgueil almost 15 years ago
+1 for me too.
I use redmine for project management, and there are recurring tasks that are needed to manage project iterations well (like code review planning).
Updated by Michael Koch almost 15 years ago
+1
this is much needed, especially as many of us use Redmine for task tracking. Has anyone looked further into making this part of the "new issue" page?
Updated by David Le Dieu over 14 years ago
Carl Nygard wrote:
The nice thing about the RoR and redmine is that the model is separate from the interface. That means you can write your own little scripty thing to (let's say) copy a default template issue to a new issue. Then a simple crontab entry to run your special script periodically would be all you need to implement your feature for yourself.
As a starting point, look through the code (probably app/controllers/issues_controller.rb) for the function that copies an issue, and duplicate those bits in your script.
The above sounds like a simple, clear workaround - 'cept I'm not a script bunny so don't know where to start - can anyone get me started so I can generate a weekly, monthly, yearly task for someone (as an example)? Pretty please :-)
Updated by Greg DePratt about 14 years ago
this would be great for renewing software licenses - would like this feature
Updated by David Le Dieu about 14 years ago
Has anyone had any success getting this to work at all? If so I'd dearly appreciate hearing about your solution
Updated by Dan Klassen about 14 years ago
+1 for me as well. If I have some time in the next few months I may be able to take a look and write a plugin for this though.
Updated by David Le Dieu about 14 years ago
Beers for Dan for putting his hand up :-)
Updated by Pedro Gutierrez about 14 years ago
+1
I agree that it can easily be made with a script.
However, this feature might deserve to be considered a built in Redmine functionality.
Otherwise, users would need to annoy the system administrator everytime they need it.
Updated by David Le Dieu about 14 years ago
To those gurus who believe this can easily be done with a script - could you please put an example here so others can find it? Maybe a task that has to happen every month for 2 years beginning Jan 2011, falling on the same calender date - say the 8th of each month, with the same assigned to, category, priority, status and the ability to copy the data in a custom field.
I have 18 daily tasks, 46 weekly, 37 monthly, 42x3 monthly, 26x6 monthly and 52 yearly tasks that have to be scheduled for a 2 year period to show in a gantt chart as part of a proposal as you can imagine I am going nuts getting everything scheduled in time for submission - so any pointers at this point would be very helpful.
Regards
David
Updated by Pedro Gutierrez about 14 years ago
David Le Dieu wrote:
To those gurus who believe this can easily be done with a script - could you please put an example here so others can find it? Maybe a task that has to happen every month for 2 years beginning Jan 2011, falling on the same calender date - say the 8th of each month, with the same assigned to, category, priority, status and the ability to copy the data in a custom field.
I have 18 daily tasks, 46 weekly, 37 monthly, 42x3 monthly, 26x6 monthly and 52 yearly tasks that have to be scheduled for a 2 year period to show in a gantt chart as part of a proposal as you can imagine I am going nuts getting everything scheduled in time for submission - so any pointers at this point would be very helpful.
Regards
David
You're right David, this case is NOT that easy.
Sorry if I diminished the complexity of the issue
Updated by David Le Dieu about 14 years ago
DOH! I was so hoping you were going to say - 'Der! - just do this ....'. Never mind. I wasn't having a go at you Pedro, just hoped it was easy :-)
Updated by David Le Dieu about 14 years ago
And don't let me discourage you from putting an example of a simple scheduling scenario so at least I have somewhere to start :-)
Updated by Enderson Maia about 14 years ago
David Le Dieu wrote:
To those gurus who believe this can easily be done with a script - could you please put an example here so others can find it? Maybe a task that has to happen every month for 2 years beginning Jan 2011, falling on the same calender date - say the 8th of each month, with the same assigned to, category, priority, status and the ability to copy the data in a custom field.
Try to use this gem, recurrence.
Here's the example you asked.
require 'recurrence' r = Recurrence.new( :every => :month, :on => 8, :interval => :monthly, :starts => '2011-01-01', :until => '2012-12-31' ) r.events.each do |date| #TODO Code do create new issues. puts date.to_s end
Updated by Maxim Antufyev almost 14 years ago
+1000
We chose Redmine for overall activities planning in our IT dept.
Would be nice to have repetitive task scheduling
Updated by Sebastian Buckpesch over 13 years ago
+1
would be a very useful feature... Hope to see it on the roadmap of version 1.2...
Updated by Hans Bangkok over 13 years ago
+1 for me, even if it were just an enhancement to the copy feature without structural changes required to link recurring items together as a set.
Updated by Peter Toonen over 13 years ago
+1 this would be nice to have, nearly every project we run features recurring tasks and it's a pain to add them manually.
Updated by Evan Daniel over 13 years ago
+1. I'm busy trying to figure out whether I need to do something else, but I'd really rather keep it all in one system.
Updated by Stefan Nesbitt about 13 years ago
+17.3
Although it's just occurred to me that I may be able to get my existing google calender task notifications routed direct to redmine via the email interface.
Updated by Michael Kling almost 13 years ago
+1 - got the task to synchronice redmine issues with a calendar. as told before, adding this with a script is "easy" (it can be done from outside), but for synchronisation also the deletion and the change of the interval has to be concidered.
anyway i think i have to do something on my own. if i come up with something which can be used somehow i will post it here.
Updated by x xiao almost 13 years ago
+1
this is a great feature, plus add this.
Updated by Anonymous almost 13 years ago
Just to add some thought for how this might be done, I've seen it done a number of ways in other systems.
I think the most straightforward way is to have the recurrence properties in the currently open issue, and have it so that when that issue is closed, the user is prompted (or not prompted) to have the system auto-create (copy) the next recurrence of it. That way the whole object model can stay pretty much as is with just a small amount of automation added on close of the issue.
Of course this causes other problems with the issues not showing up on future calendars because they haven't been created yet, etc. But I think anything that would be able to accommodate that would effectively require modifications to how events are rendered in all the various views. Though I believe recurrence is handled mainly during render for iCal applications, so maybe it's not as crazy as I think at first glance...
Does anyone know if there's any current work that's moving in one direct or another on this?
Updated by Tony Marschall almost 13 years ago
There is a plugin providing parts of this issue: http://www.redmine.org/plugins/periodictasks
Updated by Frank Helk over 12 years ago
+1 btw (with icing ...)
Tony Marschall wrote:
There is a plugin providing parts of this issue: http://www.redmine.org/plugins/periodictasks
... in a very early stage of development.
Besides of that it works on project level (tab within project) and creates issues from predefined templates (more precise: values for the most prominent ticket fields). The ticket creation is done by a cron job that calls rake.
I think it would be more elegant to do that on ticket level, and to do the repeating checks within the redmine core. That would imply some options in the administation corner (allow, check frequency, permissions, etc.), too.
Over all it would be a great addition to have periodic tasks in redmine, especially when it's used for task management.
Updated by Frank Helk over 12 years ago
I have contemplated a bit about the issue, and I would like to share some thoughts about an (IMHO) easy way to implement this ... along with some icing on the top =:-) I beg pardon for not coding that by myself, but I'm just a user/administrator with no knowledge in ruby programming.
At first, I think there could be two nice things combined:
- Cyclic creation of tickets from "templates", and
- Scheduled resurrection of rejected/closed/delayed tickes.
Now to the way to implement this ... BTW it's a rough outline - I may have missed something :)
Database additions¶
I suggest to manage the "template" tickes within the regular ticket space. This could be accomplished by an additional table that holds the additional data needed for cyclic creation or resurrection of tickets. Entries in this table would be linked to the ticket they belong to, thereby marking the related tickets as "to be resurrected in the future" or to be treated as ticket template for cyclic creation.
This seems to me as a natural way to do that ... for resurrection it's obvious, for recreation just create the initial ticket as first run, and define the parameters of recreation. That way the "template" ticket is a regular ticket as well, in any case. And it obsoletes all needs for the management of separate ticket templates ...
UI additions¶
Ticket¶
I suggest to add a part "cyclic recreation / resurrection" to the ticket UI, similar to the ticket relations area. In that part the following options should appear:
( ) active ( ) Resurrect issue by changing status to [listbox] on [datepicker] ( ) only once ( ) and repeat every [number field] [listbox w. "days", "weeks", "months", "quarters", "years", etc.] after, ( ) until [datepicker] ( ) Recreate (copy) ticket w/o comments on [datepicker], ( ) only once ( ) and repeat every [number field] [listbox w. "days", "weeks", "months", "quarters", "years", etc.] after, ( ) until [datepicker]
Maybe resurrect/recreate could be chosen by a listbox, the needed options could be displayed as needed by script, and the cycle options could be more fine tunable.
Project¶
In the project UI an additional tab is needed, where the tickets "to recreate" could be managed. It contains a list where those tickets just could be opened, recreation deactivated/deleted, cycle edited, etc. The "to resurrect" tickets probably could be managed there as well.
Creation of those resurrection/recreation tasks will only be done from the ticket edit/create masks by setting the appropriate options.
Administration¶
- Permission for managing recreation of tickets
- Permission for letting tickets resurrect
- System setting for recreation/resurrection check cycle (maybe - e.g. a static cycle of "once a day just after midnight" would be sufficient)
- Workflow: Allowed transitions for resurrection, i.e. to prevent or allow "auto close" or "auto reject" actions. Only applicable when editing tickets, things already set will be left as is. Implemented as additional workflow matrix for "scheduled status changes"
Core system additions¶
In the core of redmine a thread is needed that does cyclic checks if issues are to be recreated/resurrected. This part could be possibly implemented as cron job (or similar), but that would complicate the installation an be different depending on the underlying OS. So I would prefer coding into the Redmine core.
- If a ticket matches the condition "resurrect", the status will be changed, and an automatic comment will be created. The appropriate data (timestamp, next scheduled date, etc.) will be saved in the "cyclic tickets" table. If "only once" is used, the resurrection will be deactivated, or maybe autodeleted.
- If a ticket matches the condition "recreate", the ticket will be duplicated with an addition to the description, which states "autocreated", and a "follows" relation to the base ticket. The appropriate data (timestamp, next scheduled date, etc.) will be saved in the "cyclic tickets" table. If "only once" is used, the recreation will be deactivated. Recreation contains all fields that appear on a new ticket for that project, along with the "watched by" links and useful ticket relations (mostly "related to"). No duplication of comments and - obvious - the replication settings. Unsure about duplication of attachments ... that could lead to trouble - I think that the "follows" relation to the base ticket (that will hold "followed by" relations to all recreated tickets) will be sufficient to find related attachments.
In every case where action ist taken, the full bunch of appropriate email messages is to be released ... just to mention ...
Updated by Preethi Sriram over 12 years ago
- File repeat_issue repeat_issue added
- File 20120214222640_create_issue_schedules.rb 20120214222640_create_issue_schedules.rb added
I have attached a patch for repeating an issue as a scheduled task. This is integrated into issue functionality, works like duplicate and has a table/model/controller/view to manage issue schedules. It works with cron job to run the scheduled issues. Repeat will also copy notes and attachments from the issue to be repeated.
1) Icon for repeat will appear next to duplicate and will display interval number,units, next run date when clicked at bottom of issue edit page.
2) On save a new issue schedule will be added to issue_schedules table (migration script attached with patch to create model/view/controller for issueschedules).
3) There is a link "view issue schedules" on right menu of issues under "Gantt". The Issue Schedules page provides functionality to edit/delete and view all issues scheduled.
I have not incorporated permissions based on role and the repeat functionality works with the same permission as duplicate or update.
crontab should have an entry
0 1 * * * cd /var/www/<redminedir>; rake redmine:check_issueschedule RAILS_ENV=“production”
Test rake task as
rake redmine:check_issueschedule RAILS_ENV=“production”
Updated by Andrey Alexandrov over 12 years ago
In your patch you use lib/tasks/task_scheduler.rake file from revision 8667 but there is no such file in this revision.
Maybe it would be better to write plugin based on this patch?
All right, i try to use this patch and it don't works at all.
As i can see you create new table issue_schedules but i cant find any insert to that table in your patch. And when i press "repeat" i can't see any fields at the bottom of issue edit page.
Maybe your patch need to be fixed?
Updated by Frank Helk over 12 years ago
Andrey Alexandrov wrote:
Maybe it would be better to write plugin based on this patch?
I presume that plugins are more suitable for special and somewhat uncommon additions to redmine, like special export options or interfacing to another software ...
The recurring tasks feature is IMHO a core functionality that's long missing, so I think it should be merged into the core. Besides of that,
- plugins tend to be outdated by default,
- get left orphaned by their developers often and
- lack attention by the wide public, which tends to be bad for their quality.
Core functionalities are constantly maintained and tested, which would be adequate for a core functionalities.
Updated by Preethi Sriram about 12 years ago
I must have forgotten to add repeatschedule parital file to the patch. Unfortunately my old machine on which I developed crashed last weekend. When I recover the hard disk, I will attach the file. But I think it will be a good idea to create a plugin.
Sorry for the inconvenience.
Updated by Simon Richelle almost 12 years ago
+1 !!!
Is there any functional implementation?
Updated by Brian Lacy almost 12 years ago
I'd be very interested in hearing an update on this feature!
It's requested frequently by my team members..
Updated by Adrian Rotaru over 11 years ago
+999,999,999.999
Nobody in the last 4 years??? :(
Would be a very cool feature!
Updated by Bruno Spyckerelle over 11 years ago
It would be very usefull indeed.
Hope to see this soon !
Updated by Dipan Mehta over 11 years ago
+1. We are seeing it positively that redmine can be extended for use not only in software development but for operations management! Also, another good use case for this feature for the periodic test and audit processes.
It is a good to have feature.
Updated by Esteban Toribio over 11 years ago
+1 I agree, we do need this plugin.
Updated by Anonymous over 11 years ago
+1
Is there any good reason why this feature is not on the roadmap after two years and so many votes? Would appreciate any info.
Updated by Jean-Baptiste Barth over 11 years ago
Xavier Stervinou wrote:
Is there any good reason why this feature is not on the roadmap after two years and so many votes? Would appreciate any info.
Yes, here's the good reason: there are 3800 open issues and 4-5 active contributors, so things take time. Everybody adding "+1" is not much useful. On the other hand, I see Frank and Preethi made great proposals. Try to discuss that instead : imagine the edge cases, what would be needed, how to implement this with the minimum complexity, and what would be the minimum viable feature.
Actually I think it could be perfectly implemented as a plugin and integrated later in the core when it's stable in the plugin. If people really need this feature I think they can begin a plugin and propose it here.
The other solution being scripting everything from scratch, it's pretty easy to do with the API nowadays. A cron task:
00 08 01 * * redmine /opt/script/redmine_recurring_task_month.sh
And the redmine_recurring_task_month.sh script:
#!/bin/bash curl -H "application/xml" -H "X-Redmine-Api-Key: abcdef123456789" -X POST http://my-redmine-url.local/issues.xml -d '<?xml version="1.0"?> <issue> <project_id>my-project</project_id> <subject>Recurring task each 1st day of each month</subject> <priority_id>4</priority_id> <description>This is your recurring task: you have to do bla bla bla</description> </issue>'
Not integrated with the UI but it should do the trick for most people (including me..).
Updated by Anonymous about 11 years ago
There's a plugin : [[http://www.redmine.org/plugins/periodictasks]]
Updated by Frank Helk about 11 years ago
Nathan M wrote:
There's a plugin : [[http://www.redmine.org/plugins/periodictasks]]
From the mentioned page:
Registered on: 2011-09-27 (mehr als 1 Jahr) Current version: 0.1.0 Compatible with: Redmine 1.0.x, 1.1.x, 1.2.x, 1.3.x (...) Changelog 0.1.0 (2011-09-27)
With Redmine 2.3.x floating around that seems a little bit ... outdated & neglected, if not entirely abandoned.
Besides of that I think that recurring tasks should be part of the Redmine core. I've discussed that plugin, my vision of a recurring tasks feature and some pro/contra of this as plugin already a year ago in this ticket's comments #44 (#1176-44), #46 (#1176-46) and #!49 (#1176-49).
Updated by Terence Mill about 11 years ago
I can propose this plugin, seems to work on redmine 2.3.1
https://github.com/jperelli/Redmine-Periodic-Task.git
Updated by Frank Helk almost 11 years ago
Terence Mill wrote:
I can propose this plugin, seems to work on redmine 2.3.1
https://github.com/jperelli/Redmine-Periodic-Task.git
Hmmm - is this an update of the plugin formerly found here ?
I'll try it ASAP, but I still think that recurring tasks should be a core feature.
Updated by Frank Helk almost 11 years ago
Frank Helk wrote:
Nathan M wrote:
There's a plugin : [[http://www.redmine.org/plugins/periodictasks]]
I've managed to try that out while doing my update tests on our system ....
Looks like it is mostly the same plugin as on http://www.redmine.org/plugins/periodictasks (updated to Redmine 2.x, but nothing changed on the rough edges), and this ticket's comments 44, 46 and 49 still apply.
I could live with the cron'd rake task, but I would still prefer not to create new ticktes from scratch but to revive (by simple status change and reassignment) or to clone existing tickets with a defineable status and with a choice which fields (std and custom) to clone. This looks more easy to me than the way of the plungin. Besides of that the plugin's way wouln't allow scheduled reviving of tickets, which would be a nice way to do recurring tasks without inflate the ticket count: Just imagine a task like monthly checking of some meter readings and writing 'em down in the ticket - that would be extremely nice if there's not a ticket for every reading.
If the plugin's way would be followed, at least all fields of the ticket must be definable, including the description.
And just an additional inspiration: If a ticket gets a scheduled clone, it could get an automatic parent -> child relation inserted ... would be nice to have and not possible with the plungin's way.
And last but not least - I still would strongly prefer that to be a core function. I expect it to be used frequently, and it would be a recurring pain if the plugin gets neglected and the funcionalty gets broken in case of a Redmine update (a common problem of plugins that naturally could not be circumvented ...)
Updated by Kyle Janse van Rensburg almost 11 years ago
+1 to have this part of the core!
Updated by WMI Admin over 10 years ago
# | Plugin Name | Compatibility | URL |
---|---|---|---|
1. | Periodic Tasks | 1.0.x, 1.1.x, 1.2.x, 1.3.x | http://www.redmine.org/plugins/periodictasks |
2. | Carousel | 1.4.x | http://www.redmine.org/plugins/redmine_carousel |
3. | Redmine-Periodic-Task forked from myneid/Redmine-Periodic-Task | ? | https://github.com/jperelli/Redmine-Periodic-Task |
4. | Recurring Tasks | 2.5.x, 2.4.x, 2.3.x, 2.2.x, 2.1.x, 2.0.x | http://www.redmine.org/plugins/recurring-tasks |
We need built-in functionality. Can we pay for this ?
Updated by Teresa N over 10 years ago
I wrote a plugin a while ago and just pushed it out -- http://www.redmine.org/plugins/recurring-tasks and https://github.com/nutso/redmine-plugin-recurring-tasks. It allows you to take any existing issue and make it recur on a fixed or relative schedule (e.g. every 7 days or 7 days after each completion). Feedback welcome.
Updated by Toshi MARUYAMA almost 9 years ago
- Has duplicate Feature #20821: Repeat a task added
Updated by Frank Helk over 8 years ago
Still interested ... is there anyone of the developers with that on the to-do list ?
Updated by Ivan Cenov over 8 years ago
Idea. Not very good but it seems working.
This could be done with cron activated application, that sends REST command to change the state of the task. Par example state 'active'. Someone works on the issue and puts it in 'passive' state.
Updated by Frank Helk over 8 years ago
That would work at least for reactivating a task repeatedly.
For generating new tasks, a cron job that sends mail to import into redmine would do, too.
Even while both attempts would work roughly, they kave a certain drawback: They need administrator action on OS level for every task involved, and a separate cron job for each task. Over the time that would grow to an administration nightmare.
I strictly prefer a solution as core function within Redmine, and I think it would be a well appreciated feature.
Updated by Ivan Cenov over 8 years ago
Yes, you are right. A solution as a core function is the best.
Updated by Frank Helk over 8 years ago
Definitely ....
unfortunately that project seems not to receive much attention in the Redmine dev team ... the very idea lingers aruond for 7 years now, and my rough outline of a solution is already old enough for pre-school (4 years). =:(
Updated by Teresa N over 8 years ago
Check out https://github.com/nutso/redmine-plugin-recurring-tasks
Other contributors and I have kept it working with new Redmine versions and new features for a couple years now.
Current featureset:- Any Redmine issue can have one or more associated recurrence schedules.
- Supported recurrence schedules are:
- Every x days/weeks/months/years, e.g. every 1 day or every 3 months
- The nth day of every x months, e.g. the 3rd of every month
- The nth-to-last day of every x months, e.g. the 5th-to-last day of every 4 months
- The nth week day of every x months, e.g. the 3rd Thursday of every 2 months
- The nth-to-last week day of every x months, e.g. the 2nd-to-last Saturday of every 1 month
- All recurrence schedules can be set to recur on a fixed or flexible schedule.
- Fixed: recurs whether the previous task completed or not
- Flexible: recurs only if the previous task was complete
- View/Add/Edit/Delete issue recurrence permissions controlled via Redmine's native Roles and Permissions menu
Updated by Giuseppe Cuttone over 8 years ago
Hi Teresa, thanks a lot for your work. I have only a question.
Does it run with 3.2.0 Redmine version?
In the official page (https://www.redmine.org/plugins/recurring-tasks) only say:
"Compatible with Redmine 3.0.x".
Once again thanks very much.
I hope your answare.
Updated by Roland Giesler over 6 years ago
Has this plugin (https://www.redmine.org/plugins/recurring-tasks) been abandoned?
It doesn't work in Redmine 3.4, but I also don't see a repetitive task feature in 3.4 yet...
Comment?
Updated by Frank Helk over 6 years ago
Roland Giesler wrote:
Has this plugin (https://www.redmine.org/plugins/recurring-tasks) been abandoned?
It doesn't work in Redmine 3.4, but I also don't see a repetitive task feature in 3.4 yet...
Comment?
That's the point from which I'm constantly preaching that such a basic feature needs to be realized in the Redmine core instead of knitting up a plugin.
Every new Redmine release could easily break the functionality of a plugin, and plugins easily tend to be negleted or abandoned. Therefore I usually rely only on core functionality. If I rely on a plugin, I might suddenly find myself lost alone in the deep desert while the trek swiftly moves on ...
But since this feature request is close up for its 10th anniversary now w/o anybody making a step towards realizing it, I doubt that there's enough (if any) interest in the the developing team on that issue.
YooHooo ? Dev Team ? Any statement about it ?
BTW: I've created a very crude workaround utilizing cron, sendmail and a mailserver to create cyclic tasks via Redmine's email import capability ... but that's a hell to service since I have to get to the machine as root and edit Linux shell scripts and template files to add, delete or modify cyclic repeated tickets. The only pro: It works with core functionality. <sic>