RT Possibilites?

I have a request for a queue with the look of rt a little different. Thing
is only people using that queue want the change. Is there a way to make
different mason files show up for specific queues? Has this been done?

Main point is how complex is it to have it done?

Thanks
John

<>< Proverbs 3:5 “Trust in the Lord with all your heart and lean not on
your own understanding;”

I have a request for a queue with the look of rt a little different. Thing
is only people using that queue want the change. Is there a way to make
different mason files show up for specific queues? Has this been done?

Interesting. It certainly can be done.

What you want to be doing is to have your collection of files for Queue
’foo’. For simplicity, give them the extension ‘.foo’.

Then, you can change your main pages to include files based on the queue
name, eg:

<& /Elements/TitleBoxEnd.$queuename &>

( This is a quick example, and I’m skipping over a lot of stuff, such as
how you’re setting $queuename etc ).

If you wanted to be more tricky, you could have your magic include file,
like:

<& /Elements/DefInclude, queue => $queuename, include =>
  '/Elements/TitleBoxEnd &>

Where /Elements/DefInclude looked for the requested_file.$queuename, or
the requested_file in the former’s absence.

Main point is how complex is it to have it done?

Its not that complex, it would just be annoying to set this up (in
changing all the files that did includes in the appropriate manner).

                         Bruce Campbell                            RIPE
               Systems/Network Engineer                             NCC
             www.ripe.net - PGP562C8B1B             Operations/Security

Thanks that’s good idea Bruce. It will help me start on it anyway.

Thanks for the help.
John

At 02:01 PM 1/17/2003, you wrote:>On Fri, 17 Jan 2003, John Gedeon wrote:

I have a request for a queue with the look of rt a little different. Thing
is only people using that queue want the change. Is there a way to make
different mason files show up for specific queues? Has this been done?

Interesting. It certainly can be done.

What you want to be doing is to have your collection of files for Queue
’foo’. For simplicity, give them the extension ‘.foo’.

Then, you can change your main pages to include files based on the queue
name, eg:

    <& /Elements/TitleBoxEnd.$queuename &>

( This is a quick example, and I’m skipping over a lot of stuff, such as
how you’re setting $queuename etc ).

If you wanted to be more tricky, you could have your magic include file,
like:

    <& /Elements/DefInclude, queue => $queuename, include =>
      '/Elements/TitleBoxEnd &>

Where /Elements/DefInclude looked for the requested_file.$queuename, or
the requested_file in the former’s absence.

Main point is how complex is it to have it done?

Its not that complex, it would just be annoying to set this up (in
changing all the files that did includes in the appropriate manner).


Bruce Campbell RIPE
Systems/Network Engineer NCC
www.ripe.net - PGP562C8B1B Operations/Security


rt-users mailing list
rt-users@lists.fsck.com
http://lists.fsck.com/mailman/listinfo/rt-users

Have you read the FAQ? The RT FAQ Manager lives at http://fsck.com/rtfm

<>< Proverbs 3:5 “Trust in the Lord with all your heart and lean not on
your own understanding;”

Would it be possible to have the directory structure like such

WebRT/html/
Default/
Ticket/
User/ …
Queue1/
include only files I changed
Queue2/
include only files I changed

and have html_mason look at for the file in the queue’s directory and if
not found use the one in the Default?
I would want this to also work for the .html files (IE so i could rearrage
the forms or change some of the form names on the outside, like owner to
assigned to)
But I would want html mason to hide the Default or Queue1 part of the url
from everything else.

so a link like http://www.example.com/Ticket/History.html?id=42
would take them to the queue specific view of that ticket which would have
the files in
WebRT/html/Queue2/Ticket/History.html

Is that possible?

John

At 02:01 PM 1/17/2003, Bruce Campbell wrote:>On Fri, 17 Jan 2003, John Gedeon wrote:

I have a request for a queue with the look of rt a little different. Thing
is only people using that queue want the change. Is there a way to make
different mason files show up for specific queues? Has this been done?

Interesting. It certainly can be done.

What you want to be doing is to have your collection of files for Queue
’foo’. For simplicity, give them the extension ‘.foo’.

Then, you can change your main pages to include files based on the queue
name, eg:

    <& /Elements/TitleBoxEnd.$queuename &>

( This is a quick example, and I’m skipping over a lot of stuff, such as
how you’re setting $queuename etc ).

If you wanted to be more tricky, you could have your magic include file,
like:

    <& /Elements/DefInclude, queue => $queuename, include =>
      '/Elements/TitleBoxEnd &>

Where /Elements/DefInclude looked for the requested_file.$queuename, or
the requested_file in the former’s absence.

Main point is how complex is it to have it done?

Its not that complex, it would just be annoying to set this up (in
changing all the files that did includes in the appropriate manner).


Bruce Campbell RIPE
Systems/Network Engineer NCC
www.ripe.net - PGP562C8B1B Operations/Security


rt-users mailing list
rt-users@lists.fsck.com
http://lists.fsck.com/mailman/listinfo/rt-users

Have you read the FAQ? The RT FAQ Manager lives at http://fsck.com/rtfm

<>< Proverbs 3:5 “Trust in the Lord with all your heart and lean not on
your own understanding;”

There are a number of ways to do this. The one that requires the least
messing about (as far as I can tell) would be to subclass Mason’s resolver.
The resolver is the object that takes a component path and finds the
component, among other things.

See http://masonbook.com/book/chapter-12.mhtml#TOC-ANCHOR-4 for more info.

The idea would be to have the resolver determine if the component exists in
a Queue specific directory. If there is a special Queue version, return
that component. If there isn’t, return the normal component. The big
question is, “How does the resolver know what queue the request is for?” I
think the resolver is initialized once and reused for multiple requests (in
a mod_perl environment). So you’ll need to check the Request object
($HTML::Mason::Commands::m) to get the queue to look for. You’ll
You’ll need to update the RT::Web::Interface module to use your new
resolver.

The 1.1x versions of Mason are written with subclassing in mind, so it
shouldn’t be too hairy.

The other options I could think of required making changes to every file in
the RT web interface. This seemed like a bad idea.

I thought a bit about using multiple component roots. This is how the local
component directory is set up. The problem is that each component root is
checked in the order it is listed, and there doesn’t seem to be a way for a
component to decline to handle the request and force further searching of
the component root list.

Good luck.

–MarkFrom: John Gedeon [mailto:jgedeon@qualcomm.com]
Sent: Friday, January 17, 2003 4:56 PM
To: rt-users@fsck.com
Subject: Re: [rt-users] RT Possibilites?

Would it be possible to have the directory structure like such

WebRT/html/
Default/
Ticket/
User/ …
Queue1/
include only files I changed
Queue2/
include only files I changed

and have html_mason look at for the file in the queue’s directory and if
not found use the one in the Default?
I would want this to also work for the .html files (IE so i could rearrage
the forms or change some of the form names on the outside, like owner to
assigned to)
But I would want html mason to hide the Default or Queue1 part of the url
from everything else.

so a link like http://www.example.com/Ticket/History.html?id=42
would take them to the queue specific view of that ticket which would have
the files in
WebRT/html/Queue2/Ticket/History.html

Is that possible?

John

At 02:01 PM 1/17/2003, Bruce Campbell wrote:

I have a request for a queue with the look of rt a little different.
Thing

is only people using that queue want the change. Is there a way to make
different mason files show up for specific queues? Has this been done?

Interesting. It certainly can be done.

What you want to be doing is to have your collection of files for Queue
’foo’. For simplicity, give them the extension ‘.foo’.

Then, you can change your main pages to include files based on the queue
name, eg:

    <& /Elements/TitleBoxEnd.$queuename &>

( This is a quick example, and I’m skipping over a lot of stuff, such as
how you’re setting $queuename etc ).

If you wanted to be more tricky, you could have your magic include file,
like:

    <& /Elements/DefInclude, queue => $queuename, include =>
      '/Elements/TitleBoxEnd &>

Where /Elements/DefInclude looked for the requested_file.$queuename, or
the requested_file in the former’s absence.

Main point is how complex is it to have it done?

Its not that complex, it would just be annoying to set this up (in
changing all the files that did includes in the appropriate manner).


Bruce Campbell
RIPE
Systems/Network Engineer
NCC
www.ripe.net - PGP562C8B1B
Operations/Security


rt-users mailing list
rt-users@lists.fsck.com
http://lists.fsck.com/mailman/listinfo/rt-users

Have you read the FAQ? The RT FAQ Manager lives at http://fsck.com/rtfm

<>< Proverbs 3:5 “Trust in the Lord with all your heart and lean not on
your own understanding;”

rt-users mailing list
rt-users@lists.fsck.com
http://lists.fsck.com/mailman/listinfo/rt-users

Have you read the FAQ? The RT FAQ Manager lives at http://fsck.com/rtfm