[rt-devel] RT::Extension::RepliesToResolved (was Module::Install)

Tim Cutts tjrc at sanger.ac.uk
Fri Oct 19 14:16:06 EDT 2012


On 19 Oct 2012, at 17:04, Kevin Falcone <falcone at bestpractical.com> wrote:

> On Fri, Oct 19, 2012 at 04:37:15PM +0100, Tim Cutts wrote:
>> 
>> I've implemented all the things that Ruslan mentioned he hadn't had time to do:
>> 
>> * Configurable time limit.  There's a default, and you can also do it per queue.
>> * Automatic link creation to the previous ticket.  The type of link is configurable, also on a per-queue basis.
>> * Alter the subject line of the new ticket to remove the old RT tag.
> 
> I think the one other thing I'd like to handle in this is more
> Statuses than just Resolved (especially with lifecycles) but that does
> raise the question of whether the name wants to change or not.

Might be sensible to make it any inactive status for the lifecycle in question.  Easy enough to do. 

>> The configuration is a hash, looking like this:
>> 
>> Set(%RepliesToResolved,
>>   default => {
>>     # 7 day time limit, create MemberOf link
>>     'reopen-timelimit' => 7,
>>     'link-type' => 'MemberOf',
>>   },
>>   'some-queue' => {
>>     # Always create new ticket, create a refers-to link
>>     'reopen-timelimit' => 0,
>>     'link-type' => 'RefersTo',
>>   },
>>   'exception-queue' => {
>>     # Traditional RT behaviour; disable the extension for this queue
>>     'reopen-timelimit' => undef,
>>   },
>> );
> 
> If you don't specify default, does it just punt on queues that aren't
> specified,
> or if you only want this behaviour on one queue do you have
> to say default => { 'reopen-timelimit' => undef }

The latter.  The default behaviour, at the moment, is the extension behaves as Ruslan originally coded it, if you supply an empty configuration (i.e. Set(%RepliesToResolved, ()); it behaves as though you'd configured:

default => { 'reopen-timelimit' => 0, 'link-type' => undef }

but if you don't have an RT_SiteConfig.pm entry for the config at all, you get the default from RepliesToResolved_Config.pm, which is:

Set(%RepliesToResolved,
   default => {
     'reopen-timelimit' => 7,
     'link-type' => 'MemberOf',
   },
);

I'm happy for any of this to change - they're just what I thought would be useful defaults based on conversations with my own users.

Regards,

Tim



-- 
 The Wellcome Trust Sanger Institute is operated by Genome Research 
 Limited, a charity registered in England with number 1021457 and a 
 company registered in England with number 2742969, whose registered 
 office is 215 Euston Road, London, NW1 2BE. 


More information about the rt-devel mailing list