RT::Ex...tTicket(3pm)
πΈ NAME πΈ
RT::Extension::RepeatTicket β repeat tickets based on schedule π
okay bestie, this is the manual page for RT::Extension::RepeatTicket, filed under User Contributed Perl Documentation in your 3pm section. It's the "set it and forget it" of RT tickets, fr fr. Let's get into it π¦
β¨ DESCRIPTION β¨
The RepeatTicket extension lets you set up recurring tickets so brand new tickets get automatically created on a schedule. Those new tickets get populated with the subject and the initial content of the original ticket in the recurrence. no cap. π
Once you activate the plugin by adding it to your RT_SiteConfig.pm file, every ticket gets a Recurrence tab on both the create and edit pages. To set up a repeating ticket you just click the checkbox to "Enable Recurrence" and fill out the schedule for the new tickets. iconic. β¨
New tickets get created:
- when you initially save the recurrence, if new tickets are needed, and
- when your daily cron job runs the
rt-repeat-ticketscript.
π INSTALLATION π
okay so here's the whole glow-up sequence, in order:
perl Makefile.PLmakemake installβ may need root permissions πmake initdbβ only run this the first time you install this module.
If you run this twice, you may end up with duplicate data in your database. not cute. π If you are upgrading this module, check for upgrading instructions in case changes need to be made to your database.
- Edit your
/opt/rt4/etc/RT_SiteConfig.pmβ and here's where the vibes split by version:- If you are using RT 4.2 or greater, add this line:
Plugin('RT::Extension::RepeatTicket');
- For RT 4.0, add this line:
Set(@Plugins, qw(RT::Extension::RepeatTicket));
- or add
RT::Extension::RepeatTicketto your existing@Pluginsline.
- Clear your mason cache
rm -rf /opt/rt4/var/mason_data/obj
- Add
bin/rt-repeat-ticketto the daily cron job. - Restart your webserver π«Ά
π CONFIGURATION π
$RepeatTicketCoexistentNumber
$RepeatTicketCoexistentNumber decides how many tickets can be in an active status for a recurrence at any one time. A value of 1 means one ticket at a time can be active. New tickets will not be created until the current active ticket is resolved or set to some other inactive status. You can also set this value per recurrence, overriding this config value. The extension default is 1 ticket.
$RepeatTicketLeadTime
$RepeatTicketLeadTime becomes the ticket's Starts value and sets how far in advance of a ticket's Due date you want the ticket to be created. Basically, this is how long you want to give people to work on the ticket. π°οΈ
For example, if you create a weekly recurrence scheduled on Mondays and set the lead time to 7 days, each Monday a ticket will be created with the Starts date set to that Monday and a Due date of the following Monday. math is mathing β¨
The value you set in RT_SiteConfig.pm becomes the system default, but you can set this value on each ticket as well. The extension default is 14 days.
$RepeatTicketSubjectFormat
By default, repeated tickets have the same subject as the original ticket. You can modify this subject by setting a format with the $RepeatTicketSubjectFormat option. This option accepts formats in the same form as formats for RT searches. The placeholders take values from the repeated ticket, not the original ticket, so you can use the format to help differentiate the subjects in repeated tickets. π
For example, if you wanted to put the due date in the subject, you could set the format to:
Set($RepeatTicketSubjectFormat, '__Due__ __Subject__');
You'll want to use values that you don't expect to change since the subject won't change if the ticket value (e.g., Due) is changed.
Since this uses RT formats, you can create a custom format by creating a new RT ColumnMap. You can see the available formats by looking at the columns available in the Display Columns portlet on the RT ticket search page. π
rt-repeat-ticket
The rt-repeat-ticket utility evaluates all of your repeating tickets and creates any new tickets that are needed. With no parameters, it runs for "today" each day. You can also pass a --date value in the form YYYY-MM-DD to run the script for a specific day.
bin/rt-repeat-ticket --date 2012-07-25
This can be handy if your cron job doesn't run for some reason and you want to make sure no repeating tickets have been missed. Just go back and run the script for the days you missed. You can also pass dates in the future which might be handy if you want to experiment with recurrences in a test environment. π§
π¦ USAGE π¦
Initial Tickets
The initial ticket you create for a recurrence stores the schedule and other details for the recurrence. If you need to change the recurrence in the future β to make it more frequent or less frequent or anything else β make the changes on the original ticket. To help you find this initial ticket, which may have been resolved long ago, a custom field is created on each ticket in the recurrence with link called "Original Ticket." π
When setting up the recurrence, you can use the original ticket as an actual work ticket. When doing this, you'll need to set the Starts and Due dates when you create the ticket. Scheduled tickets created subsequently will set these values based on the recurrence. Resolving the original ticket does not cancel the recurrence. periodt.
Start Value
You can set a Start date for a new recurrence. If you don't, it defaults to the day you create the recurrence. β
Cancelling Recurrences
You can cancel or end a recurrence in two ways:
- Go to the original ticket in the recurrence and uncheck the Enable Recurrence checkbox.
- Set ending conditions on the recurrence with either a set number of recurrences or an end date.
Recursive Recurrences
Creating recurrences on recurrences isn't supported and may do strange things. π
π FAQ π
I'm not seeing new recurrences. Why not?
A few things to check:
- Do you have
rt-repeat-ticketsscheduled in cron? Is it running? - Do you have previous tickets still in an active state? Resolve those tickets or increase the concurrent active tickets value.
- Is it the right day? Remember to subtract the lead time value to determine the day new tickets should be created.
- If you set a start date and another criteria like day of the week, the new ticket will be created on the first time that day of the week occurs after the start date you set (if the start date isn't on that day of the week).
I want to enable the repeat function only on some queues
To do this, instead of applying the "Original Ticket" custom field globally, you can apply it to the chosen queues and that's it. easy. β¨
some users can't see or use this feature successfully.
Make sure those users have "SeeCustomField" and "ModifyCusotmField" rights granted for "Original Ticket" custom field. π
π METHODS π
Run( RT::Attribute $attr, DateTime $checkday )
Repeat the ticket if $checkday meets the repeat settings. It also tries to repeat more to meet config RepeatTicketCoexistentNumber.
Return ids of new created tickets.
Repeat ( RT::Attribute $attr, DateTime $checkday_1, DateTime $checkday_2, ... )
Repeat the ticket for the check days that meet repeat settings.
Return ids of new created tickets.
MaybeRepeatMore ( RT::Attribute $attr )
Try to repeat more tickets to meet the coexistent ticket number.
Return ids of new created tickets.
SetRepeatAttribute ( RT::Ticket $ticket, %args )
Save %args to the ticket's RepeatTicketSettings attribute.
Return ( RT::Attribute, UPDATE MESSAGE )
π AUTHOR π
Best Practical Solutions, LLC <modules@bestpractical.com>
π BUGS π
All bugs should be reported via email to
bug-RT-Extension-RepeatTicket@rt.cpan.org
or via the web at
rt.cpan.org
http://rt.cpan.org/Public/Dist/Display.html?Name=RT-Extension-RepeatTicket
π LICENSE AND COPYRIGHT π
This software is Copyright (c) 2014 by Best Practical Solutions
This is free software, licensed under:
The GNU General Public License, Version 2, June 1991
and that's the whole page bestie π«Ά this one came from perl v5.32.1, dated 2021-02-07, and yes it's literally titled RT::Ex...tTicket(3pm) in the footer because the manpage formatter is dramatic like that. slay, go set up your recurrences π
β¨
π¦ where this page comes from
- debian bookworm: rt4-extension-repeatticket 1.11-1 Β· GPL-2.0-only
- ubuntu jammy: rt4-extension-repeatticket 1.11-1 Β· GPL-2.0-only
- ubuntu noble: rt4-extension-repeatticket 1.11-1 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms