RTx::EmailCompletion and rt 3.8 and scriptaculous

Hello,

I’ve got a problem with RTx::EmailCompletion and rt 3.8 and scriptaculous.

RTx-EmailCompletion need scriptaculous to works so I’ve put it in my
initial release.
Now rt 3.8 has scriptaculous too and I would like to change my
Makefile.PL to deploy scriptaculous if and only if rt release is less
than 3.8.

Someone know how I can do that ?

Hi Nicolas,

Something like this (taken from RT-Extension-TicketAging):

{ # check RT version
my @v = split /./, “$RT::VERSION”;
unless (($v[0]>=3 && $v[1]>=8) || $v[0]>3) {
die “Extension needs RT 3.8.0 at least, you have $RT::VERSION”;
}
}

Or similar? Not 100% sure.

Kühne + Nagel (AG & Co.) KG, Geschäftsleitung: Hans-Georg Brinkmann (Vors.), Uwe Bielang (Stellv.), Bruno Mang, Dirk Blesius (Stellv.), Alfred Manke, Christian Marnetté (Stellv.), Mark Reinhardt (Stellv.), Jens Wollesen, Rainer Wunn, Sitz: Bremen, Registergericht: Bremen, HRA 21928, USt-IdNr.: DE 812773878, Persönlich haftende Gesellschaft: Kühne & Nagel A.G., Sitz: Contern/Luxemburg Geschäftsführender Verwaltungsrat: Klaus-Michael Kühne-----Ursprüngliche Nachricht-----
Von: rt-devel-bounces@lists.bestpractical.com [mailto:rt-devel-bounces@lists.bestpractical.com] Im Auftrag von Nicolas Chuche
Gesendet: Mittwoch, 20. August 2008 12:49
An: rt-devel
Betreff: [Rt-devel] RTx::EmailCompletion and rt 3.8 and scriptaculous

Hello,

I’ve got a problem with RTx::EmailCompletion and rt 3.8 and scriptaculous.

RTx-EmailCompletion need scriptaculous to works so I’ve put it in my initial release.
Now rt 3.8 has scriptaculous too and I would like to change my Makefile.PL to deploy scriptaculous if and only if rt release is less than 3.8.

Someone know how I can do that ?
List info: http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-devel

{ # check RT version
my @v = split /./, “$RT::VERSION”;
unless (($v[0]>=3 && $v[1]>=8) || $v[0]>3) {
die “Extension needs RT 3.8.0 at least, you have $RT::VERSION”;
}
}

The problem isn’t really in this part. I’ve read that I can use
$RT::VERSION in my Makefile.PL

My problem is how to :

  1. deploy all my javascript found in ./html/NoAuth/ if $RT::VERSION < 3.8
  2. deploy only ./html/NoAuth/js/emailcompletion.js if $RT::VERSION >= 3.8

I know I must modify the last line of my Makefile :

install ::
$(NOECHO) $(PERL) -MExtUtils::Install -e “install({q(html),
q(/opt/rt3/share/html), q(lib), q(/opt/rt3/local/lib)})”

But don’t know how to do this with Module::Install.