Re: [rt-users] Gmail website replies to tickets, Outlook creates new ones
Please share the code? I think you may be missing a chomp after fetching your subject header in your variable. This took a good amount of my time debugging why my thing wasn't working. -- Nilesh On 01-Nov-2016 10:20 PM, "Alex Hall" <ah...@autodist.com> wrote: > Hey list, > I've been messing with Email_Local.pm for the last day, but I can't get it > to work correctly. I need to make the regex used to detect ticket replies > not require a space before the pound sign. I'm starting to suspect that > Outlook isn't removing that space, but rather replacing it with some > Unicode character no one can see, because I can't get this to work. I first > tried > /\[$test_name\s*\#(\d*)\s*\]/i > but that didn't work. So I replaced the first \s* with .* (period > asterisk) to tell it to match zero or more characters, no matter what they > are. That, too, fails to work. What I change here seems to have no effect. > Am I missing a file, other than RT/Interface/Email.pm? Is there some other > setting or bit of code where this regex is defined and use, or is this file > the only one? Thanks. > > On Mon, Oct 31, 2016 at 10:22 AM, Alex Hall <ah...@autodist.com> wrote: > >> You're right. After looking at what showed up on RT, not what was in the >> subject fields of the two clients, I have the problem. I think. >> >> It seems that Outlook is removing the space before the # (pound sign) in >> the subject tag. That is: >> Re: [Graphics #400] >> turns into >> Re: [Graphics#400] >> >> Looks like I get to play with the subject tag regex. >> >> Sent from my iPhone >> >> > On Oct 31, 2016, at 10:16, Nilesh <m...@nileshgr.com> wrote: >> > >> > You should inspect the headers in both cases. If they contain >> in-reply-to, you >> > can use that to solve the problem. >> > >> > My problem originally was people in Cc replying to a mail sent to RT >> (and by >> > default, people in CC do not get auto reply email). This was >> successfully solved >> > by the in-reply-to patch. https://gist.github.com/nilesh >> gr/637cdacd1aa7710343aed >> > e20cabb66a6 >> > >> > Just save that file in local/lib/RT/Interface/Email_Local.pm and >> restart RT. >> > >> > -- >> > Nilesh >> > >> >> On Mon, 2016-10-31 at 19:36 +0530, Nilesh wrote: >> >> I don't think Re matters. As long as subject tag is intact it should >> get >> >> parsed correctly. >> >> -- >> >> Nilesh >> >> >> >>> On 31-Oct-2016 7:35 PM, "Alex Hall" <ah...@autodist.com> wrote: >> >>> I looked more closely at the difference. Outlook is stripping off the >> "Re: " >> >>> part of the message subject in the reply, whereas Gmail leaves it on. >> That's >> >>> the only difference I can find, but it must matter. I guess this is >> more an >> >>> Outlook question now, unless there's something I can change in RT to >> make it >> >>> not care about the Re: part of a reply? >> >>> >> >>> Sent from my iPhone >> >>> >> >>>> On Oct 31, 2016, at 09:52, Nilesh <m...@nileshgr.com> wrote: >> >>>> >> >>>>> On 31-Oct-2016 7:10 PM, "Alex Hall" <ah...@autodist.com> wrote: >> >>>>> >> >>>>> Hey all, >> >>>>> I made a custom template with mailto: links in it, that comes from >> norep >> >>>> l...@example.com. The mailto: links populate the to: and subject: >> fields of >> >>>> the new message as they should, and when the new email is sent, a >> comment >> >>>> appears on the ticket. At least, if the user does this from the Gmail >> >>>> website (our domain mail is handled by Gmail). If the user is on >> Outlook, >> >>>> however, the "reply" gets turned into a new ticket. I can't see what >> the >> >>>> difference is, since the mailto: link is the same. We're on Outlook >> 2007, >> >>>> at least the few stations I've asked so far use 2007. Has anyone >> ever seen >> >>>> this before? Any troubleshooting suggestions? Thank you. >> >>>>> >> >>>>> -- >> >>>>> Alex Hall >> >>>>> Automatic Distributors, IT department >> >>>>> ah...@autodist.com >> >>>>> >> >>>>> - >> >>>>> RT 4.4 and RTIR training sessions, and a new workshop day! >> https://bestp >> >>>> ractical.com/training >> >>>>> * Los Angeles - Q1 2017 >> >>>> Have you verified that the subject tag isn't getting stripped? >> >>>> There are two ways to identify a reply - one via the subject and >> other via >> >>>> in-reply-to header which most clients insert. In-reply-to isn't >> parsed by >> >>>> RT, so a custom code is needed for that. >> >>>> I got it from someone on this list and have implemented as a local >> >>>> customization. >> >>>> -- >> >>>> Nilesh >> >>> >> >>> - >> >>> RT 4.4 and RTIR training sessions, and a new workshop day! >> https://bestpract >> >>> ical.com/training >> >>> * Los Angeles - Q1 2017 >> > > > > -- > Alex Hall > Automatic Distributors, IT department > ah...@autodist.com > - RT 4.4 and RTIR training sessions, and a new workshop day! https://bestpractical.com/training * Los Angeles - Q1 2017
Re: [rt-users] Overriding files in lib/RT?
To extend you should either add code in Email_Local.pm or Email_Overlay.pm. If you name it as Email.pm then you have to copy all code from existing module and modify it. I'm not sure about differences between Overlay and Local but I think that difference is for OO vs adding some functionality. -- Nilesh On 31-Oct-2016 9:45 PM, "Matt Zagrabelny" <mzagr...@d.umn.edu> wrote: > Hi Alex, > > On Mon, Oct 31, 2016 at 11:09 AM, Alex Hall <ah...@autodist.com> wrote: > > Hey list, > > How would I override /opt/rt4/lib/RT/Interface/Email.pm? > > Overlays. > > https://docs.bestpractical.com/rt/4.4.1/RT/StyleGuide. > html#EXTENDING-RT-CLASSES > > It looks like there is also an outdated wiki article: > > https://rt-wiki.bestpractical.com/wiki/ObjectModel > > -m > - > RT 4.4 and RTIR training sessions, and a new workshop day! > https://bestpractical.com/training > * Los Angeles - Q1 2017 > - RT 4.4 and RTIR training sessions, and a new workshop day! https://bestpractical.com/training * Los Angeles - Q1 2017
Re: [rt-users] Gmail website replies to tickets, Outlook creates new ones
Looks like I typed something wrong and that link leads to a 404. The correct link is: https://gist.github.com/nileshgr/637cdacd1aa7710343aede20cabb66a6 On Mon, Oct 31, 2016 at 7:46 PM, Nilesh <m...@nileshgr.com> wrote: > You should inspect the headers in both cases. If they contain in-reply-to, > you > can use that to solve the problem. > > My problem originally was people in Cc replying to a mail sent to RT (and > by > default, people in CC do not get auto reply email). This was successfully > solved > by the in-reply-to patch. https://gist.github.com/nileshgr/ > 637cdacd1aa7710343aed > e20cabb66a6 > > Just save that file in local/lib/RT/Interface/Email_Local.pm and restart > RT. > > -- > Nilesh > > On Mon, 2016-10-31 at 19:36 +0530, Nilesh wrote: > > I don't think Re matters. As long as subject tag is intact it should get > > parsed correctly. > > -- > > Nilesh > > > > On 31-Oct-2016 7:35 PM, "Alex Hall" <ah...@autodist.com> wrote: > > > I looked more closely at the difference. Outlook is stripping off the > "Re: " > > > part of the message subject in the reply, whereas Gmail leaves it on. > That's > > > the only difference I can find, but it must matter. I guess this is > more an > > > Outlook question now, unless there's something I can change in RT to > make it > > > not care about the Re: part of a reply? > > > > > > Sent from my iPhone > > > > > > On Oct 31, 2016, at 09:52, Nilesh <m...@nileshgr.com> wrote: > > > > > > > On 31-Oct-2016 7:10 PM, "Alex Hall" <ah...@autodist.com> wrote: > > > > > > > > > > Hey all, > > > > > I made a custom template with mailto: links in it, that comes > from norep > > > > l...@example.com. The mailto: links populate the to: and subject: > fields of > > > > the new message as they should, and when the new email is sent, a > comment > > > > appears on the ticket. At least, if the user does this from the Gmail > > > > website (our domain mail is handled by Gmail). If the user is on > Outlook, > > > > however, the "reply" gets turned into a new ticket. I can't see what > the > > > > difference is, since the mailto: link is the same. We're on Outlook > 2007, > > > > at least the few stations I've asked so far use 2007. Has anyone > ever seen > > > > this before? Any troubleshooting suggestions? Thank you. > > > > > > > > > > -- > > > > > Alex Hall > > > > > Automatic Distributors, IT department > > > > > ah...@autodist.com > > > > > > > > > > - > > > > > RT 4.4 and RTIR training sessions, and a new workshop day! > https://bestp > > > > ractical.com/training > > > > > * Los Angeles - Q1 2017 > > > > Have you verified that the subject tag isn't getting stripped? > > > > There are two ways to identify a reply - one via the subject and > other via > > > > in-reply-to header which most clients insert. In-reply-to isn't > parsed by > > > > RT, so a custom code is needed for that. > > > > I got it from someone on this list and have implemented as a local > > > > customization. > > > > -- > > > > Nilesh > > > > > > - > > > RT 4.4 and RTIR training sessions, and a new workshop day! > https://bestpract > > > ical.com/training > > > * Los Angeles - Q1 2017 > - RT 4.4 and RTIR training sessions, and a new workshop day! https://bestpractical.com/training * Los Angeles - Q1 2017
Re: [rt-users] Gmail website replies to tickets, Outlook creates new ones
You should inspect the headers in both cases. If they contain in-reply-to, you can use that to solve the problem. My problem originally was people in Cc replying to a mail sent to RT (and by default, people in CC do not get auto reply email). This was successfully solved by the in-reply-to patch. https://gist.github.com/nileshgr/637cdacd1aa7710343aed e20cabb66a6 Just save that file in local/lib/RT/Interface/Email_Local.pm and restart RT. -- Nilesh On Mon, 2016-10-31 at 19:36 +0530, Nilesh wrote: > I don't think Re matters. As long as subject tag is intact it should get > parsed correctly. > -- > Nilesh > > On 31-Oct-2016 7:35 PM, "Alex Hall" <ah...@autodist.com> wrote: > > I looked more closely at the difference. Outlook is stripping off the "Re: " > > part of the message subject in the reply, whereas Gmail leaves it on. That's > > the only difference I can find, but it must matter. I guess this is more an > > Outlook question now, unless there's something I can change in RT to make it > > not care about the Re: part of a reply? > > > > Sent from my iPhone > > > > On Oct 31, 2016, at 09:52, Nilesh <m...@nileshgr.com> wrote: > > > > > On 31-Oct-2016 7:10 PM, "Alex Hall" <ah...@autodist.com> wrote: > > > > > > > > Hey all, > > > > I made a custom template with mailto: links in it, that comes from norep > > > l...@example.com. The mailto: links populate the to: and subject: fields > > > of > > > the new message as they should, and when the new email is sent, a comment > > > appears on the ticket. At least, if the user does this from the Gmail > > > website (our domain mail is handled by Gmail). If the user is on Outlook, > > > however, the "reply" gets turned into a new ticket. I can't see what the > > > difference is, since the mailto: link is the same. We're on Outlook 2007, > > > at least the few stations I've asked so far use 2007. Has anyone ever seen > > > this before? Any troubleshooting suggestions? Thank you. > > > > > > > > -- > > > > Alex Hall > > > > Automatic Distributors, IT department > > > > ah...@autodist.com > > > > > > > > - > > > > RT 4.4 and RTIR training sessions, and a new workshop day! https://bestp > > > ractical.com/training > > > > * Los Angeles - Q1 2017 > > > Have you verified that the subject tag isn't getting stripped? > > > There are two ways to identify a reply - one via the subject and other via > > > in-reply-to header which most clients insert. In-reply-to isn't parsed by > > > RT, so a custom code is needed for that. > > > I got it from someone on this list and have implemented as a local > > > customization. > > > -- > > > Nilesh > > > > - > > RT 4.4 and RTIR training sessions, and a new workshop day! https://bestpract > > ical.com/training > > * Los Angeles - Q1 2017 - RT 4.4 and RTIR training sessions, and a new workshop day! https://bestpractical.com/training * Los Angeles - Q1 2017
Re: [rt-users] Gmail website replies to tickets, Outlook creates new ones
I don't think Re matters. As long as subject tag is intact it should get parsed correctly. -- Nilesh On 31-Oct-2016 7:35 PM, "Alex Hall" <ah...@autodist.com> wrote: > I looked more closely at the difference. Outlook is stripping off the "Re: > " part of the message subject in the reply, whereas Gmail leaves it on. > That's the only difference I can find, but it must matter. I guess this is > more an Outlook question now, unless there's something I can change in RT > to make it not care about the Re: part of a reply? > > Sent from my iPhone > > On Oct 31, 2016, at 09:52, Nilesh <m...@nileshgr.com> wrote: > > On 31-Oct-2016 7:10 PM, "Alex Hall" <ah...@autodist.com> wrote: > > > > Hey all, > > I made a custom template with mailto: links in it, that comes from > nore...@example.com. The mailto: links populate the to: and subject: > fields of the new message as they should, and when the new email is sent, a > comment appears on the ticket. At least, if the user does this from the > Gmail website (our domain mail is handled by Gmail). If the user is on > Outlook, however, the "reply" gets turned into a new ticket. I can't see > what the difference is, since the mailto: link is the same. We're on > Outlook 2007, at least the few stations I've asked so far use 2007. Has > anyone ever seen this before? Any troubleshooting suggestions? Thank you. > > > > -- > > Alex Hall > > Automatic Distributors, IT department > > ah...@autodist.com > > > > - > > RT 4.4 and RTIR training sessions, and a new workshop day! > https://bestpractical.com/training > > * Los Angeles - Q1 2017 > > Have you verified that the subject tag isn't getting stripped? > > There are two ways to identify a reply - one via the subject and other via > in-reply-to header which most clients insert. In-reply-to isn't parsed by > RT, so a custom code is needed for that. > > I got it from someone on this list and have implemented as a local > customization. > > -- > Nilesh > > - > RT 4.4 and RTIR training sessions, and a new workshop day! > https://bestpractical.com/training > * Los Angeles - Q1 2017 > > - RT 4.4 and RTIR training sessions, and a new workshop day! https://bestpractical.com/training * Los Angeles - Q1 2017
Re: [rt-users] Gmail website replies to tickets, Outlook creates new ones
On 31-Oct-2016 7:10 PM, "Alex Hall" <ah...@autodist.com> wrote: > > Hey all, > I made a custom template with mailto: links in it, that comes from nore...@example.com. The mailto: links populate the to: and subject: fields of the new message as they should, and when the new email is sent, a comment appears on the ticket. At least, if the user does this from the Gmail website (our domain mail is handled by Gmail). If the user is on Outlook, however, the "reply" gets turned into a new ticket. I can't see what the difference is, since the mailto: link is the same. We're on Outlook 2007, at least the few stations I've asked so far use 2007. Has anyone ever seen this before? Any troubleshooting suggestions? Thank you. > > -- > Alex Hall > Automatic Distributors, IT department > ah...@autodist.com > > - > RT 4.4 and RTIR training sessions, and a new workshop day! https://bestpractical.com/training > * Los Angeles - Q1 2017 Have you verified that the subject tag isn't getting stripped? There are two ways to identify a reply - one via the subject and other via in-reply-to header which most clients insert. In-reply-to isn't parsed by RT, so a custom code is needed for that. I got it from someone on this list and have implemented as a local customization. -- Nilesh - RT 4.4 and RTIR training sessions, and a new workshop day! https://bestpractical.com/training * Los Angeles - Q1 2017
Re: [rt-users] What does attaching a message do?
On 31-Oct-2016 6:41 PM, "Alex Hall" <ah...@autodist.com> wrote: > > Hi all, > In most RT templates I've looked at, the first command is RT-Attach-Message:yes. I'm just wondering what this does? I often see what appears to be a blank transaction in ticket histories; is that related? Is attaching the message important, or can we do without it? Basically, what does it do and should we keep it in all templates, including new ones? Thanks. > > -- > Alex Hall > Automatic Distributors, IT department > ah...@autodist.com > > - > RT 4.4 and RTIR training sessions, and a new workshop day! https://bestpractical.com/training > * Los Angeles - Q1 2017 Message attachment means the content of the transaction is attached in the mail you get. -- Nilesh - RT 4.4 and RTIR training sessions, and a new workshop day! https://bestpractical.com/training * Los Angeles - Q1 2017
Re: [rt-users] "On Reply" set ticket status to "resolved"
This will change the status of the ticket, but it will set it resolved for every correspondence which you probably don't want. You can add the custom condition to check some pattern... I'm typing this on mobile can't type code. RT api is relatively easy to understand, sometimes you need to get into the code to see what's going on. -- Nilesh On 05-Oct-2016 6:28 PM, "David Schmidt" <david.schm...@univie.ac.at> wrote: > Hello Nilesh and thank you for your reply. > > Your advice would have been helpful if I hadnt looked for documentation > before. Which I did. > I am wildly searching for information using random search parameters > instead of following a tutorial of some sort. Is there any? > > Luckily I found what I needed in another rt-users email. > > Here is my solution: > > === > Admin > Scrips > Create > > > Description: OnCorrespondSetResolved > > Condition: On Correspond > > Action: User Defined > > Template: Blank > > Custom Condition: #leave empty > > Custom action preparation code: > return 1; > > Custom action commit code: > my ($status, $msg) = $self->TicketObj->SetStatus("resolved"); > unless ( $status ) { > $RT::Logger->error("Couldn't change status: $msg"); > return 0; > } > return 1; > == > > > On 05.10.2016 03:13, Nilesh wrote: > >> You can write a simple scrip with a pre commit action to change the >> TicketObj status. See the api docs. >> >> -- >> Nilesh >> >> On 04-Oct-2016 5:22 PM, "David Schmidt" <david.schm...@univie.ac.at> >> wrote: >> >> Hello list, >>> >>> I would like to set a tickets status to "resolved" on reply. The wiki >>> mentions a "On Reply" action that I cannot find in my rt instance. >>> >>> https://rt-wiki.bestpractical.com/wiki/ManualScrips >>> >>> cheers >>> david >>> - >>> RT 4.4 and RTIR training sessions, and a new workshop day! >>> https://bestpractical.com/training >>> * Boston - October 24-26 >>> * Los Angeles - Q1 2017 >>> >>> - RT 4.4 and RTIR training sessions, and a new workshop day! https://bestpractical.com/training * Boston - October 24-26 * Los Angeles - Q1 2017
Re: [rt-users] "On Reply" set ticket status to "resolved"
You can write a simple scrip with a pre commit action to change the TicketObj status. See the api docs. -- Nilesh On 04-Oct-2016 5:22 PM, "David Schmidt" <david.schm...@univie.ac.at> wrote: > Hello list, > > I would like to set a tickets status to "resolved" on reply. The wiki > mentions a "On Reply" action that I cannot find in my rt instance. > > https://rt-wiki.bestpractical.com/wiki/ManualScrips > > cheers > david > - > RT 4.4 and RTIR training sessions, and a new workshop day! > https://bestpractical.com/training > * Boston - October 24-26 > * Los Angeles - Q1 2017 > - RT 4.4 and RTIR training sessions, and a new workshop day! https://bestpractical.com/training * Boston - October 24-26 * Los Angeles - Q1 2017
Re: [rt-users] Customizing with Overlays
On 03-Oct-2016 9:17 AM, "Alex Vandiver" <a...@chmrr.net> wrote: > > On Mon, 3 Oct 2016 08:58:25 +0530 > Nilesh <m...@nileshgr.com> wrote: > > Can I put my Overlay files in local/lib? > > Yup; that's what's generally suggested. > > > Do I have to maintain the same directory structure? > > Yes. > > > Let's say I have to customize RT::Action::SendEmail, so my Overlay should > > be in local/lib/RT/Action/SendEmail_Overlay.pm or just > > local/lib/SendEmail_Overlay.pm ?? > > The former. > - Alex Thanks a lot -- Nilesh - RT 4.4 and RTIR training sessions, and a new workshop day! https://bestpractical.com/training * Boston - October 24-26 * Los Angeles - Q1 2017
[rt-users] Customizing with Overlays
Hello, I came across this page: https://rt-wiki.bestpractical.com/wiki/CustomizingWithOverlays Can I put my Overlay files in local/lib? Do I have to maintain the same directory structure? Let's say I have to customize RT::Action::SendEmail, so my Overlay should be in local/lib/RT/Action/SendEmail_Overlay.pm or just local/lib/SendEmail_Overlay.pm ?? - RT 4.4 and RTIR training sessions, and a new workshop day! https://bestpractical.com/training * Boston - October 24-26 * Los Angeles - Q1 2017
Re: [rt-users] Postgresql 4.4.1 slow queries?
You made some typing mistake, you should get something like this: QUERY PLAN - Unique (cost=33.54..33.62 rows=1 width=329) -> Sort (cost=33.54..33.54 rows=1 width=329) Sort Key: main.name, main.id, main.password, main.authtoken, main.comments, main.signature, main.emailaddress, main.freeformcontactinfo, main.organization, main.realname, main.nickname, main.lang, main.gecos, main.homephone, main.workphone, main.mobilephone, main.pagerphone, main.address1, main.address2, main.city, main.state, main.zip, main.country, main.timezone, main.smimecertificate, main.creator, main.created, main.lastupdatedby, main.lastupdated -> Nested Loop (cost=1.12..33.53 rows=1 width=329) Join Filter: (main.id = principals_1.id) -> Nested Loop (cost=0.84..33.18 rows=1 width=337) Join Filter: (main.id = cachedgroupmembers_2.memberid) -> Nested Loop (cost=0.56..29.94 rows=9 width=333) -> Nested Loop (cost=0.28..13.74 rows=51 width=4) -> Seq Scan on acl acl_3 (cost=0.00..5.40 rows=1 width=4) Filter: (((principaltype)::text = 'Group'::text) AND ((rightname)::text = 'OwnTicket'::text) AND objecttype)::text = 'RT::Queue'::text) AND (objectid = 56)) OR (((objecttype)::text = 'RT::System'::text) AND (objectid = 1 -> Index Only Scan using disgroumem on cachedgroupmembers cachedgroupmembers_4 (cost=0.28..8.32 rows=2 width=8) Index Cond: ((groupid = acl_3.principalid) AND (disabled = 0)) -> Index Scan using users_pkey on users main (cost=0.28..0.31 rows=1 width=329) Index Cond: (id = cachedgroupmembers_4.memberid) -> Index Only Scan using disgroumem on cachedgroupmembers cachedgroupmembers_2 (cost=0.28..0.35 rows=1 width=4) Index Cond: ((groupid = 4) AND (memberid = cachedgroupmembers_4.memberid) AND (disabled = 0)) -> Index Scan using principals_pkey on principals principals_1 (cost=0.28..0.34 rows=1 width=4) Index Cond: (id = cachedgroupmembers_4.memberid) Filter: ((id <> 1) AND (disabled = 0) AND ((principaltype)::text = 'User'::text)) On Wed, Sep 28, 2016 at 2:42 PM, Joel Bergmark <joel.bergm...@t3.se> wrote: > Hi! > > This is the output from explain: > > postgres=# EXPLAIN SELECT DISTINCT main.* FROM Users main CROSS JOIN ACL > ACL_3 JOIN Principals Principals_1 ON ( Principals_1.id = main.id ) JOIN > CachedGroupMembers CachedGroupMembers_2 ON ( CachedGroupMembers_2.MemberId > = Principals_1.id ) JOIN CachedGroupMembers CachedGroupMembers_4 ON ( > CachedGroupMembers_4.MemberId = Principals_1.id ) WHERE ((ACL_3.ObjectType > = 'RT::Queue' AND ACL_3.ObjectId = 56) OR (ACL_3.ObjectType = > 'RT::System' AND ACL_3.ObjectId = 1)) AND (ACL_3.PrincipalId = > CachedGroupMembers_4.GroupId) AND (ACL_3.PrincipalType = 'Group') AND > (ACL_3.RightName = 'OwnTicket') AND (CachedGroupMembers_2.Disabled = '0') > AND (CachedGroupMembers_2.GroupId = '4') AND (CachedGroupMembers_4.Disabled > = '0') AND (Principals_1.Disabled = '0') AND (Principals_1.PrincipalType = > 'User') AND (Principals_1.id != '1') ORDER BY main.Name ASC; > ERROR: relation "users" does not exist > LINE 1: EXPLAIN SELECT DISTINCT main.* FROM Users main CROSS JOIN AC... > > I have looked for more queries that takes time and its always this query > that generates the slow behavior, but seemingly the query itself seems fine > "users" exists in db, but then again obviously postgres has issues with > something here. > > Any thoughts? > > Regards, Joel > > -Ursprungligt meddelande- > Från: rt-users [mailto:rt-users-boun...@lists.bestpractical.com] För > Nilesh > Skickat: den 27 september 2016 17:36 > Till: rt-users@lists.bestpractical.com > Ämne: Re: [rt-users] Postgresql 4.4.1 slow queries? > > On Tue, 2016-09-27 at 07:52 +, Joel Bergmark wrote: > > Hi, > > > > After upgrading to version 4.4.1 i have noticed that the SQL-queries > > takes significant longer time to produce a result, on average on my > > system, running Ubuntu 14.04 LTS, Postgres
Re: [rt-users] Postgresql 4.4.1 slow queries?
On Tue, 2016-09-27 at 07:52 +, Joel Bergmark wrote: > Hi, > > After upgrading to version 4.4.1 i have noticed that the SQL-queries takes > significant longer time to produce a result, on average on my system, running > Ubuntu 14.04 LTS, Postgres 9.3, Apache with perlmod. 8 gigram and plenty of > CPU in a vmware cluster on SSD:s (likely not a hardware issue). We did not > experience RT to have been this slow on 4.4.0. > > Each query takes about 350ms to give a result, occasionally up to 4000ms have > been seen, not a big problem but somethings that needs to be fixed. > > Postgres have access to shared buffers = 2048 and effective_cache_size = > 4096MB that was modified yesterday but queries still are same speed. > > I have read plenty on postgres optimizing but not much seem to make a > difference, and the https://rt-wiki.bestpractical.com/wiki/PerformanceTuning > seems a bit out of date. > > Example of problem: > > 192.168.2.65 - - [27/Sep/2016:09:06:49 +0200] "GET > /Search/Build.html?NewQuery=1 HTTP/1.1" 200 12072 Mozilla/5.0 (Windows NT > 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.101 > Safari/537.36" > > 09:06:52 CEST LOG: duration: 3362.432 ms execute dbdpg_p2242_1745: SELECT > DISTINCT main.* FROM Users main CROSS JOIN ACL ACL_3 JOIN Principals > Principals_1 ON ( Principals_1.id = main.id ) JOIN CachedGroupMembers > CachedGroupMembers_2 ON ( CachedGroupMembers_2.MemberId = Principals_1.id ) > JOIN CachedGroupMembers CachedGroupMembers_4 ON ( > CachedGroupMembers_4.MemberId = Principals_1.id ) WHERE ((ACL_3.ObjectType = > 'RT::Queue') OR (ACL_3.ObjectType = 'RT::System' AND ACL_3.ObjectId = 1)) > AND (ACL_3.PrincipalId = CachedGroupMembers_4.GroupId) AND > (ACL_3.PrincipalType = 'Group') AND (ACL_3.RightName = 'OwnTicket' OR > ACL_3.RightName = 'SuperUser') AND (CachedGroupMembers_2.Disabled = '0') AND > (CachedGroupMembers_2.GroupId = '4') AND (CachedGroupMembers_4.Disabled = '0') > AND (Principals_1.Disabled = '0') AND (Principals_1.PrincipalType = 'User') > AND (Principals_1.id != '1') ORDER BY main.Name ASC > > I’m looking for any suggestions about this, and I’m not an expert on > postgresql, but guess that this could have something to do with RT:s > “($UseSQLForACLChecks, 1);” or modperl via Apache or simply some index in > postgres? > > Appreciate any feedback :-) > > Regards, Joel > > - > RT 4.4 and RTIR training sessions, and a new workshop day! https://bestpractic > al.com/training > * Boston - October 24-26 > * Los Angeles - Q1 2017 What do you get if you run EXPLAIN over that query directly in psql CLI? -- Nilesh - RT 4.4 and RTIR training sessions, and a new workshop day! https://bestpractical.com/training * Boston - October 24-26 * Los Angeles - Q1 2017
Re: [rt-users] FastCGI: comm with server "/opt/rt4/sbin/rt-server.fcgi" aborted: idle timeout (300 sec)
It seems the configuration you've done is being ignored? This shouldn't happen. Are you sure Apache has access to the directory of rt installation completely since you seem to run it from /home? -- Nilesh On 09-Sep-2016 1:15 AM, "Pavneet Arora" <pavneet_ar...@waroc.com> wrote: > Actually logging is working. It is just that once apache2 is reloaded > there are no more log entries added. > > I just did a fresh 4.4.1 installation and after the 'make > initialize-database' command, this the tail of the rt.log: > > > Trace begun at /home/pavneet/var/Software/rt/rt-4.4.1/sbin/../lib/RT.pm > line 304 > Log::Dispatch::__ANON__('Log::Dispatch=HASH(0x54f75f8)', 'Done setting > up database content.') called at /home/pavneet/var/Software/rt/ > rt-4.4.1/sbin/../lib/RT/Handle.pm line 1428 > RT::Handle::InsertData('RT::Handle=HASH(0x5789400)', > '/opt/rt4/etc/initialdata', undef) called at sbin/rt-setup-database line 388 > main::__ANON__ at sbin/rt-setup-database line 401 > main::action_insert('prompt-for-dba-password', 1, 'package', 'RT', > 'action', 'init') called at sbin/rt-setup-database line 210 > > > It is just that after this the log goes quiet. > > I wonder if it is related to apache2 and fastcgi since now with two > different installations, we are getting the same behaviour? > > -- > Pavneet Arora m: +1 (647) 406-6843 > Waroc Informatikt: +1 (416) 937-9276 > - RT 4.4 and RTIR training sessions, and a new workshop day! https://bestpractical.com/training * Boston - October 24-26 * Los Angeles - Q1 2017
Re: [rt-users] FastCGI: comm with server "/opt/rt4/sbin/rt-server.fcgi" aborted: idle timeout (300 sec)
Log to syslog option will generate messages in system log which is /var/log/messages or it's equivalent based on distribution. Or you can add Set(@LogToSyslogConf, (facility => 'local2')); To get the messages in local2 facility so that it can be filtered out via syslog daemon to a separate file. Turn on the stack trace logging too so you can see where it's breaking. -- Nilesh On 08-Sep-2016 11:58 PM, "Pavneet Arora" <pavneet_ar...@waroc.com> wrote: > Simple question. I have tried modifying RT_SiteConfig with the > following options individually, but don't see anything in syslog or in > the second case, /opt/rt4/var/log/apache2.error. Is this what you were > referring to? > > Set( $LogToSysLog, 'debug'); > > or > > Set( $LogToSTDERR, 'debug'); > > On 08Sep16, Nilesh wrote: > > I was asking about the Perl errors. What do you see on the console or in > RT's > > logs (enable debug logging in RT_SiteConfig) when you run rt-server.fcgi > > directly? > > -- > Pavneet Arora m: +1 (647) 406-6843 > Waroc Informatikt: +1 (416) 937-9276 > - RT 4.4 and RTIR training sessions, and a new workshop day! https://bestpractical.com/training * Boston - October 24-26 * Los Angeles - Q1 2017
Re: [rt-users] FastCGI: comm with server "/opt/rt4/sbin/rt-server.fcgi" aborted: idle timeout (300 sec)
I was asking about the Perl errors. What do you see on the console or in RT's logs (enable debug logging in RT_SiteConfig) when you run rt-server.fcgi directly? -- Nilesh On Thu, 2016-09-08 at 13:57 -0400, Pavneet Arora wrote: > Observed behaviour is that the browser request times out. > > /var/log/apache2/error.log shows as quoted originally (same error as > immediately after upgrade to 16.04.1): > > 'FastCGI: server "/opt/rt4/sbin/rt-server.fcgi" has failed to remain > running for 30 seconds given 3 attempts, its restart interval has > been backed off to 600 seconds' > > /opt/rt4/var/log/apache2.error has the matching error: > > ] FastCGI: comm with server "/opt/rt4/sbin/rt-server.fcgi" aborted: idle > timeout (300 sec) > ] FastCGI: incomplete headers (0 bytes) received from server > "/opt/rt4/sbin/rt-server.fcgi" > > Just for completeness here is the apache2 config file from > sites-available (with host obscured): > > # Tell FastCGI to put its temporary files somewhere sane; this may > # be necessary if your distribution doesn't already set it > #FastCgiIpcDir /tmp > > FastCgiServer /opt/rt4/sbin/rt-server.fcgi -processes 5 -idle-timeout 300 > > > ### Optional apache logs for RT > # Ensure that your log rotation scripts know about these files > ErrorLog /opt/rt4/var/log/apache2.error > TransferLog /opt/rt4/var/log/apache2.access > LogLevel debug > > AddDefaultCharset UTF-8 > > ScriptAlias / /opt/rt4/sbin/rt-server.fcgi/ > > ServerAdmin webmaster@localhost > ServerName .com > DocumentRoot /var/www/.com > > > = 2.4> # > Require all granted > > > Order allow,deny > Allow from all > > > Options +ExecCGI > AddHandler fcgid-script fcgi > > > > > > On 08Sep16, Nilesh wrote: > > > > What are the errors? > > > > -- > > Nilesh- RT 4.4 and RTIR training sessions, and a new workshop day! https://bestpractical.com/training * Boston - October 24-26 * Los Angeles - Q1 2017
Re: [rt-users] FastCGI: comm with server "/opt/rt4/sbin/rt-server.fcgi" aborted: idle timeout (300 sec)
On Thu, 2016-09-08 at 11:24 -0400, Pavneet Arora wrote: > Okay, I have tried scouring the archives, but haven't found a solution > to my problem, although rt-server.fcgi errors is mentioned with other > issues. > > Here is a summary of the configuration: > > 1. Originally, a working rt-4.2.10 installation under Ubuntu 14.04. > Perl was installed locally and the following put in .bashrc to point > to the correct version: > > PERL_MB_OPT="--install_base \"/home//perl5\""; export PERL_MB_OPT; > PERL_MM_OPT="INSTALL_BASE=/home//perl5"; export PERL_MM_OPT; > > 2. Recently upgraded to Ubuntu 16.04.1, and rt stopped working. > 3. Was getting the following error in /var/log/apache2/error.log: > > 'FastCGI: server "/opt/rt4/sbin/rt-server.fcgi" has failed to remain > running for 30 seconds given 3 attempts, its restart interval has > been backed off to 600 seconds' > > The command for FastCGIServer in the site config also failed on the > command line: > > /opt/rt4/sbin/rt-server.fcgi -processes 5 -idle-timeout 300 > > with an error about Perl module dependency. > 4. So, after much effort in trying to upgrade the old (local) Perl > installation and figuring that it was a Perl issue, I completely > disabled/removed the original Perl installation. > 5. Installed Perl 5.24.0 via perlbrew and then installed cpanm > 6. Set "export RT_FIX_DEPS_CMD=/opt/perl/bin/cpanm" > 7. Ran fixdeps. Had to use --force to install Date::Manip, but other > than that have a fresh cpan. > 8. So clean Perl, and clean cpan. > 9. Did a reconfigure of rt-4.2.10 using the revised perlbrew directory, > and a 'make install' (Backed up the original directory. Copied over > the old RT_SiteConfig.pm over to the new install directory. Checked > permissions: root:www-data. > 9. Problem is that I am still get the same errors related to > rt-server.fcgi. > > Any guidance as to what might be the issue? > > advTHANKSance. > > What are the errors? -- Nilesh - RT 4.4 and RTIR training sessions, and a new workshop day! https://bestpractical.com/training * Boston - October 24-26 * Los Angeles - Q1 2017
Re: [rt-users] SLA confusion
On Sat, Jul 16, 2016 at 11:12 PM, Nilesh <m...@nileshgr.com> wrote: > On Sat, 2016-07-16 at 10:35 +0530, Nilesh wrote: > > On Sat, 2016-07-16 at 06:59 +0200, René Seindal wrote: > > > > > > You have the misspelling > > > SerivceBusinessHours > > > in there. > > Fixed that & restarted the processes. Still same behaviour observed. > Ticket > > with > > SLA of 3 days gets assigned a due date of 5th August! :-S > > This seems to be a bug in Business::Hours module, as I'm getting same > results - > tested with an independent script using same configuration that I posted > in this > is list earlier. > I studied the code of add_seconds subroutine in that module. It's not a bug, but rather wrong interpretation of docs by me. So I figured that setting BusinessMinutes to 1484 minutes will set the due date correctly to 3 working days since now. I guess this needs to be stated in the docs properly. - RT 4.4 and RTIR Training Sessions https://bestpractical.com/training * Los Angeles - September, 2016
Re: [rt-users] SLA confusion
On Sat, 2016-07-16 at 10:35 +0530, Nilesh wrote: > On Sat, 2016-07-16 at 06:59 +0200, René Seindal wrote: > > > > You have the misspelling > > SerivceBusinessHours > > in there. > Fixed that & restarted the processes. Still same behaviour observed. Ticket > with > SLA of 3 days gets assigned a due date of 5th August! :-S This seems to be a bug in Business::Hours module, as I'm getting same results - tested with an independent script using same configuration that I posted in this is list earlier. - RT 4.4 and RTIR Training Sessions https://bestpractical.com/training * Los Angeles - September, 2016
Re: [rt-users] SLA confusion
On Sat, 2016-07-16 at 06:59 +0200, René Seindal wrote: > You have the misspelling > SerivceBusinessHours > in there. Fixed that & restarted the processes. Still same behaviour observed. Ticket with SLA of 3 days gets assigned a due date of 5th August! :-S - RT 4.4 and RTIR Training Sessions https://bestpractical.com/training * Los Angeles - September, 2016
Re: [rt-users] SLA confusion
On Sat, 2016-07-16 at 09:17 +0530, Nilesh wrote: > Hello all, > > I have some confusion regarding SLA configuration. My SLA config is like this: > > -- > -- > Set(%ServiceAgreements, ( > Default => '5 days', > QueueDefault => { > 'Product Demo' => '3 days', > 'Developer Required' => '10 days', > }, > Levels => { > '5 days' => { > Starts => { > BusinessMinutes => 2*60 > }, > Resolve => { > BusinessMinutes => 5*24*60 > } > }, > '3 days' => { > Starts => { > BusinessMinutes => 3*60 > }, > Resolve => { > BusinessMinutes => 3*24*60 > } > }, > '10 days' => { > Starts => { > BusinessMinutes => 4*60 > }, > Resolve => { > BusinessMinutes => 10*24*60 > } > } > }) > ); > > Set(%SerivceBusinessHours, ( > Weekdays => { > 1 => { > Name => 'Monday', > Start => '10:00', > End => '19:00', > Breaks => [ > { > Start => '13:30', > End => '14:00' > }, > { > Start => '17:00', > End => '17:15' > } > ] > }, > 2 => { > Name => 'Tuesday', > Start => '10:00', > End => '19:00', > Breaks => [ > { > Start => '13:30', > End => '14:00' > }, > { > Start => '17:00', > End => '17:15' > } > ] > }, > 3 => { > Name => 'Wednesday', > Start => '10:00', > End => '19:00', > Breaks => [ > { > Start => '13:30', > End => '14:00' > }, > { > Start => '17:00', > End => '17:15' > } > ] > }, > 4 => { > Name => 'Thursday', > Start => '10:00', > End => '19:00', > Breaks => [ > { > Start => '13:30', > End => '14:00' > }, > { > Start => '17:00', > End => '17:15' > } > ] > }, > 5 => { > Name => 'Friday', > Start => '10:00', > End => '19:00', > Breaks => [ > { > Start => '13:30', > End => '14:00' > }, > { > Start => '17:00', > End => '17:15' > } > ] > } > }) > ); > --
[rt-users] SLA confusion
Hello all, I have some confusion regarding SLA configuration. My SLA config is like this: Set(%ServiceAgreements, ( Default => '5 days', QueueDefault => { 'Product Demo' => '3 days', 'Developer Required' => '10 days', }, Levels => { '5 days' => { Starts => { BusinessMinutes => 2*60 }, Resolve => { BusinessMinutes => 5*24*60 } }, '3 days' => { Starts => { BusinessMinutes => 3*60 }, Resolve => { BusinessMinutes => 3*24*60 } }, '10 days' => { Starts => { BusinessMinutes => 4*60 }, Resolve => { BusinessMinutes => 10*24*60 } } }) ); Set(%SerivceBusinessHours, ( Weekdays => { 1 => { Name => 'Monday', Start => '10:00', End => '19:00', Breaks => [ { Start => '13:30', End => '14:00' }, { Start => '17:00', End => '17:15' } ] }, 2 => { Name => 'Tuesday', Start => '10:00', End => '19:00', Breaks => [ { Start => '13:30', End => '14:00' }, { Start => '17:00', End => '17:15' } ] }, 3 => { Name => 'Wednesday', Start => '10:00', End => '19:00', Breaks => [ { Start => '13:30', End => '14:00' }, { Start => '17:00', End => '17:15' } ] }, 4 => { Name => 'Thursday', Start => '10:00', End => '19:00', Breaks => [ { Start => '13:30', End => '14:00' }, { Start => '17:00', End => '17:15' } ] }, 5 => { Name => 'Friday', Start => '10:00', End => '19:00', Breaks => [ { Start => '13:30', End => '14:00' }, { Start => '17:00', End => '17:15' } ] } }) ); - Now, there is a ticket which was created on 8th July with no SLA. Now I set it's SLA on 16th July. The system assigns it a due date of 27th July. Which is definitely not 5 working days starting 8th neither it is 5 working days starting 16th. Am I doing something wrong??? -- Nilesh - RT 4.4 and RTIR Training Sessions https://bestpractical.com/training * Los Angeles - September, 2016
Re: [rt-users] Please help with RT::Authen::ExternalAuth with nested LDAP/AD groups
ernalAuth/LDAP.pm:249) > [28280] [Thu Jul 14 19:14:15 2016] [debug]: LDAP Search === Base: > RTIR_WEB_SC_ACCESS == Scope: sub == Filter: > (memberOf:1.2.840.113556.1.4.1941:=CN=RTIR_WEB_SC_ACCESS=CN=Landon Stewart,OU= > Utilisateurs,OU=iWeb,DC=corp,DC=iweb,DC=com) == Attrs: dn > (/opt/rt4/local/plugins/RT-Authen- > ExternalAuth/lib/RT/Authen/ExternalAuth/LDAP.pm:256) > [28280] [Thu Jul 14 19:14:15 2016] [critical]: Search for > (memberOf:1.2.840.113556.1.4.1941:=CN=RTIR_WEB_SC_ACCESS=CN=Landon > Stewart,OU=Utilisateurs,OU=iWeb,DC=corp,DC=iweb,DC=com) failed: > LDAP_INVALID_DN_SYNTAX 34 (/opt/rt4/local/plugins/RT-Authen- > ExternalAuth/lib/RT/Authen/ExternalAuth/LDAP.pm:274) > [28280] [Thu Jul 14 19:14:15 2016] [debug]: LDAP password validation result: 0 > (/opt/rt4/local/plugins/RT-Authen- > ExternalAuth/lib/RT/Authen/ExternalAuth.pm:696) > [28280] [Thu Jul 14 19:14:15 2016] [debug]: Password Validation Check > Result: 0 (/opt/rt4/local/plugins/RT-Authen- > ExternalAuth/lib/RT/Authen/ExternalAuth.pm:521) > [28280] [Thu Jul 14 19:14:15 2016] [debug]: Autohandler called ExternalAuth. > Response: (0, Password Invalid) (/opt/rt4/local/plugins/RT-Authen- > ExternalAuth/html/Elements/DoAuth:11) > [28280] [Thu Jul 14 19:14:15 2016] [error]: FAILED LOGIN for lstewart from > xx.xx.xx.xx (/opt/rt4/sbin/../lib/RT/Interface/Web.pm:810) > > > -- > Landon Stewart > Lead Analyst - Abuse and Security Management > INTERNAP ® > lstew...@internap.com • www.internap.com > > - > RT 4.4 and RTIR Training Sessions https://bestpractical.com/training > * Los Angeles - September, 2016 Your setup looks perfectly fine, but I may be missing something because I haven't used AD. I use OpenLDAP with rt-ldapimport script for authentication and rt-ldapimport --no-users --import to sync users (enabled Group member syncing in the importer). Works good. May be give that a try? -- Nilesh - RT 4.4 and RTIR Training Sessions https://bestpractical.com/training * Los Angeles - September, 2016
Re: [rt-users] [rt-announce] RT Wiki Move Complete
This is great news. Please enable URL rewriting so that people can access rt- wiki.bestpractical.com/FOO and view the wiki page. Searching isn't not that user friendly especially if you know the topic name. -- Nilesh On Thu, 2016-07-14 at 10:14 -0400, Jim Brandt wrote: > Hello RT Users, > > As mentioned previously [1], we've been working on moving the RT > community wiki from Wikia (The Home of Fandom) to a stand-alone > Mediawiki instance. After some wiki-spam fighting, the new site seems to > be running smoothly. > > As of yesterday (Wednesday, July 14) the Wikia site has been closed. The > official RT wiki is now at https://rt-wiki.bestpractical.com. The URL > https://wiki.bestpractical.com should also lead you there, although > there may still be some caching of the old address. > > Please update your links if you have any pointing directly to the old > Wikia address. > > We hope you enjoy the new ad-free wiki. Feel free to create a new > account, help us clean up some content, or add some helpful new RT > information. > > Thanks, > Best Practical > > [1] > http://lists.bestpractical.com/pipermail/rt-announce/2016-June/000286.html > ___ > rt-announce mailing list > rt-annou...@lists.bestpractical.com > http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-announce > - > RT 4.4 and RTIR Training Sessions https://bestpractical.com/training > * Los Angeles - September, 2016 - RT 4.4 and RTIR Training Sessions https://bestpractical.com/training * Los Angeles - September, 2016
Re: [rt-users] Searching ticket subjects
On Wed, Jul 13, 2016 at 12:03 AM, Kenneth Marshall <k...@rice.edu> wrote: > On Tue, Jul 12, 2016 at 11:06:44PM +0530, Nilesh wrote: > > ... > > > > > Does the default RT strip that off? Because I'm not seeing in one > recent > > > > > duplicate created in the manner I described. > > > > > > > > > Ah it's hidden inside 'show full headers'. This is interesting. Is > there > > > > some documentation about this header? > > > Hi, > > > > > > You can look at the RFC's, but that was the header that provided the > most > > > value in reducing duplicate tickets. > > > > > > Regards, > > > Ken > > > > As this discussion is going on a few duplicate tickets were created in > the > > system and this definitely looks like a good way to solve it. Did you use > > ExtractCustomFields module to get this done? > > > > I'm thinking of doing it like this: > > Run ExtractCustomFields on every correspond to get the Message ID out of > the > > headers. Then I can search through this field probably using a > customized rt- > > mailgate. Does that sound good? I don't think there's a way using scrips > because > > by the time scrip executes ticket is already created (unless something is > > possible in the "On transaction" condition). > > > > Hi Nilesh, > > I have attached my current version of > ./local/lib/RT/Interface/Email_Local.pm. > It includes our modifications gathered from the list recommendations in > the function > > ParseInReplyTo() > > This patch is against RT 3.8.13+ and has not been updated to RT 4+ but is > should > be a straight-forward update. To make your own version of Email_Local.pm, > start > with just the function ParseInReplyTo() and the calling function and add > functions > from ./lib/RT/Interface/Email.pm until you have a working file. That will > be the > minimum that you will need. Take a look at > http://requesttracker.wikia.com/wiki/Customizing > for more details. Let me know if you have any questions. > > Regards, > Ken > This works perfectly, thanks a lot. I wonder why this hasn't been integrated as a core feature. - RT 4.4 and RTIR Training Sessions https://bestpractical.com/training * Los Angeles - September, 2016
Re: [rt-users] Searching ticket subjects
On Tue, 2016-07-12 at 08:40 -0500, Kenneth Marshall wrote: > On Tue, Jul 12, 2016 at 07:06:41PM +0530, Nilesh wrote: > > > > On Tue, Jul 12, 2016 at 7:02 PM, Nilesh <m...@nileshgr.com> wrote: > > > > > > > > On Tue, Jul 12, 2016 at 6:58 PM, Kenneth Marshall <k...@rice.edu> wrote: > > > > > > > > > > > On Tue, Jul 12, 2016 at 06:54:09PM +0530, Nilesh wrote: > > > > > > > > > > I don't think that's going to help me. > > > > > Let me give you a scenario: > > > > > > > > > > Person A sends a mail to my queue with B and C in CC. RT sends > > > > autoreply to > > > > > > > > > > all of them. Then B thinks there should be something added so he > > > > replies to > > > > > > > > > > A's mail instead of autoreply mail. > > > > > Now I have 2 different tickets created for the same subject by A and > > > > > B. > > > > > > > > > Hi Nilesh, > > > > > > > > The 2nd Email should include an In-Reply-To: header that can be used > > > > to link it to the 1st Email's ticket. > > > > > > > > Regards, > > > > Ken > > > > > > > Does the default RT strip that off? Because I'm not seeing in one recent > > > duplicate created in the manner I described. > > > > > Ah it's hidden inside 'show full headers'. This is interesting. Is there > > some documentation about this header? > Hi, > > You can look at the RFC's, but that was the header that provided the most > value in reducing duplicate tickets. > > Regards, > Ken As this discussion is going on a few duplicate tickets were created in the system and this definitely looks like a good way to solve it. Did you use ExtractCustomFields module to get this done? I'm thinking of doing it like this: Run ExtractCustomFields on every correspond to get the Message ID out of the headers. Then I can search through this field probably using a customized rt- mailgate. Does that sound good? I don't think there's a way using scrips because by the time scrip executes ticket is already created (unless something is possible in the "On transaction" condition). - RT 4.4 and RTIR Training Sessions https://bestpractical.com/training * Los Angeles - September, 2016
Re: [rt-users] Searching ticket subjects
On Tue, Jul 12, 2016 at 7:02 PM, Nilesh <m...@nileshgr.com> wrote: > On Tue, Jul 12, 2016 at 6:58 PM, Kenneth Marshall <k...@rice.edu> wrote: > >> On Tue, Jul 12, 2016 at 06:54:09PM +0530, Nilesh wrote: >> > I don't think that's going to help me. >> > Let me give you a scenario: >> > >> > Person A sends a mail to my queue with B and C in CC. RT sends >> autoreply to >> > all of them. Then B thinks there should be something added so he >> replies to >> > A's mail instead of autoreply mail. >> > Now I have 2 different tickets created for the same subject by A and B. >> > >> >> Hi Nilesh, >> >> The 2nd Email should include an In-Reply-To: header that can be used >> to link it to the 1st Email's ticket. >> >> Regards, >> Ken >> > > Does the default RT strip that off? Because I'm not seeing in one recent > duplicate created in the manner I described. > Ah it's hidden inside 'show full headers'. This is interesting. Is there some documentation about this header? - RT 4.4 and RTIR Training Sessions https://bestpractical.com/training * Los Angeles - September, 2016
Re: [rt-users] Searching ticket subjects
On Tue, Jul 12, 2016 at 6:58 PM, Kenneth Marshall <k...@rice.edu> wrote: > On Tue, Jul 12, 2016 at 06:54:09PM +0530, Nilesh wrote: > > I don't think that's going to help me. > > Let me give you a scenario: > > > > Person A sends a mail to my queue with B and C in CC. RT sends autoreply > to > > all of them. Then B thinks there should be something added so he replies > to > > A's mail instead of autoreply mail. > > Now I have 2 different tickets created for the same subject by A and B. > > > > Hi Nilesh, > > The 2nd Email should include an In-Reply-To: header that can be used > to link it to the 1st Email's ticket. > > Regards, > Ken > Does the default RT strip that off? Because I'm not seeing in one recent duplicate created in the manner I described. - RT 4.4 and RTIR Training Sessions https://bestpractical.com/training * Los Angeles - September, 2016
Re: [rt-users] Searching ticket subjects
I don't think that's going to help me. Let me give you a scenario: Person A sends a mail to my queue with B and C in CC. RT sends autoreply to all of them. Then B thinks there should be something added so he replies to A's mail instead of autoreply mail. Now I have 2 different tickets created for the same subject by A and B. On Tue, Jul 12, 2016 at 6:47 PM, Kenneth Marshall <k...@rice.edu> wrote: > On Tue, Jul 12, 2016 at 08:58:07AM +0530, Nilesh wrote: > > Hello, > > > > I have installed RT and to quite an extent been able to understand and > tune > > it to my needs. But I have a problem: many times multiple people are > > involved in a ticket and they come as CC in the mail. > > > > I have installed one extension which extracts CC/AdminCC from the mail > and > > adds them to the ticket, but that doesn't yet solve my problem which is: > > > > New ticket gets created if it is not a reply to the automatic reply that > is > > sent by RT because their replies does not contain the queue subject tag. > > > > What I'm thinking of doing is, doing a fuzzy search based on the > requestors > > / cc when a new mail arrives and put the message as a correspondence in > the > > existing ticket if subject does not contain the subject tag. I think this > > will be very inefficient but at least it will solve the problem of > > duplicate tickets that I'm facing a lot right now. > > > > How should I go about doing this? I couldn't find the API for REST > > mailgateway which I I see is getting called from the rt-mailgate script. > > Hi Nilesh, > > We added processing to look for a 'In-Reply-To:' header to help link the > Email to existing requests. It does help keep duplicate tickets from being > created. I think there are some recipes in the mailing list archives and > on the wiki. > > Regards, > Ken > - RT 4.4 and RTIR Training Sessions https://bestpractical.com/training * Los Angeles - September, 2016
[rt-users] Searching ticket subjects
Hello, I have installed RT and to quite an extent been able to understand and tune it to my needs. But I have a problem: many times multiple people are involved in a ticket and they come as CC in the mail. I have installed one extension which extracts CC/AdminCC from the mail and adds them to the ticket, but that doesn't yet solve my problem which is: New ticket gets created if it is not a reply to the automatic reply that is sent by RT because their replies does not contain the queue subject tag. What I'm thinking of doing is, doing a fuzzy search based on the requestors / cc when a new mail arrives and put the message as a correspondence in the existing ticket if subject does not contain the subject tag. I think this will be very inefficient but at least it will solve the problem of duplicate tickets that I'm facing a lot right now. How should I go about doing this? I couldn't find the API for REST mailgateway which I I see is getting called from the rt-mailgate script. - RT 4.4 and RTIR Training Sessions https://bestpractical.com/training * Los Angeles - September, 2016
Re: [rt-users] Custom fields in transaction
For some reason I didn't see that option first when I wrote this message or it seemed to be absent. The problem is solved now, scrapped the idea of classifying by custom field and instead using regex to search inside subject & content. On Wed, Jul 6, 2016 at 5:56 PM, Jim Brandt <jbra...@bestpractical.com> wrote: > Each scrip has a stage that is set as part of the configuration through > the web UI. You should be able to find it on the Applies to tab when > configuring the scrip. By default, it will be set to Normal. To get the > scrip to run at the end in batch mode, you need to set that to Batch and > save the scrip. > > > On 7/1/16 10:29 PM, Nilesh wrote: > >> Can you provide some example? >> On the wiki I saw some scrip which was testing the return value of >> TransactionBatch method, but now after doing that I don't see the log. >> >> In custom action commit code: >> >> my $batch = $self->TicketObj->TransactionBatch; >> if($batch) { >> RT::Logger->info("transaction batch"); >> RT::Logger->info("Field Value: " . $self->TransactionObj- >> >>> FirstCustomFieldValue('Product')); >>> >> } >> >> -- >> Nilesh >> >> On 01-Jul-2016 10:52 pm, "Jim Brandt" <jbra...@bestpractical.com> >> wrote: >> >> On 6/30/16 11:41 PM, Nilesh wrote: >> >>> Hi, >>> >>> I'm trying to assign the ticket to a queue based on a transaction >>> custom field, but I am unable to fetch the custom field in my scrip. >>> >>> Scrip details: >>> Condition: On correspond >>> Action: User defined >>> Template: Blank >>> >>> Custom condition: >>> 1; >>> >>> Custom action preparation code: >>> 1; >>> >>> Custom action commit code: >>> my $queueName = $self->TicketObj->QueueObj->Name; >>> RT::Logger->info("Queue name: $queueName"); >>> >>> my $trans = $self->TransactionObj; >>> RT::Logger->info($trans->FirstCustomFieldValue("Product")); >>> >>> -- >>> >>> The method FirstCustomFieldValue returns empty even though the value >>> is >>> set in form submission. >>> >>> All the stuff I found on Google are about custom fields in tickets, >>> seems nobody uses transaction custom fields? >>> >>> I'm using RT 4.4.0. >>> >>> >>> >> If you are submitting the value for Product in the same update, the On >> Correspond transaction may run before the value is committed, so it's >> not there yet. Try moving the scrip to Batch stage rather than Normal. >> Batch runs at the end, so the value should be set. >> >> - >> RT 4.4 and RTIR Training Sessions https://bestpractical.com/training >> * Los Angeles - September, 2016 >> >> - RT 4.4 and RTIR Training Sessions https://bestpractical.com/training * Los Angeles - September, 2016
Re: [rt-users] Custom fields in transaction
The use case is simple, I want to move tickets to different queues based on a custom field and this should happen when the agent is replying. So transaction is the best place to introduce such a field. -- Nilesh On Tue, 2016-07-05 at 20:00 +0530, aniket tripathy wrote: > Hi Nilesh, > > Can you please explain,the use case. Just trying to understand the > scenario where a transaction custom field would be best fit. > > Thanks. > -Aniket > > On Fri, Jul 1, 2016 at 9:11 AM, Nilesh <m...@nileshgr.com> wrote: > > Hi, > > > > I'm trying to assign the ticket to a queue based on a transaction > > custom field, but I am unable to fetch the custom field in my > > scrip. > > > > Scrip details: > > Condition: On correspond > > Action: User defined > > Template: Blank > > > > Custom condition: > > 1; > > > > Custom action preparation code: > > 1; > > > > Custom action commit code: > > my $queueName = $self->TicketObj->QueueObj->Name; > > RT::Logger->info("Queue name: $queueName"); > > > > my $trans = $self->TransactionObj; > > RT::Logger->info($trans->FirstCustomFieldValue("Product")); > > > > -- > > > > The method FirstCustomFieldValue returns empty even though the > > value is > > set in form submission. > > > > All the stuff I found on Google are about custom fields in tickets, > > seems nobody uses transaction custom fields? > > > > I'm using RT 4.4.0. > > > > -- > > Nilesh > > > > - > > RT 4.4 and RTIR Training Sessions https://bestpractical.com/trainin > > g > > * Los Angeles - September, 2016 > > - RT 4.4 and RTIR Training Sessions https://bestpractical.com/training * Los Angeles - September, 2016
Re: [rt-users] Custom fields in transaction
Can you provide some example? On the wiki I saw some scrip which was testing the return value of TransactionBatch method, but now after doing that I don't see the log. In custom action commit code: my $batch = $self->TicketObj->TransactionBatch; if($batch) { RT::Logger->info("transaction batch"); RT::Logger->info("Field Value: " . $self->TransactionObj- >FirstCustomFieldValue('Product')); } -- Nilesh On 01-Jul-2016 10:52 pm, "Jim Brandt" <jbra...@bestpractical.com> wrote: On 6/30/16 11:41 PM, Nilesh wrote: > Hi, > > I'm trying to assign the ticket to a queue based on a transaction > custom field, but I am unable to fetch the custom field in my scrip. > > Scrip details: > Condition: On correspond > Action: User defined > Template: Blank > > Custom condition: > 1; > > Custom action preparation code: > 1; > > Custom action commit code: > my $queueName = $self->TicketObj->QueueObj->Name; > RT::Logger->info("Queue name: $queueName"); > > my $trans = $self->TransactionObj; > RT::Logger->info($trans->FirstCustomFieldValue("Product")); > > -- > > The method FirstCustomFieldValue returns empty even though the value > is > set in form submission. > > All the stuff I found on Google are about custom fields in tickets, > seems nobody uses transaction custom fields? > > I'm using RT 4.4.0. > > If you are submitting the value for Product in the same update, the On Correspond transaction may run before the value is committed, so it's not there yet. Try moving the scrip to Batch stage rather than Normal. Batch runs at the end, so the value should be set. - RT 4.4 and RTIR Training Sessions https://bestpractical.com/training * Los Angeles - September, 2016 -- Nilesh - RT 4.4 and RTIR Training Sessions https://bestpractical.com/training * Los Angeles - September, 2016
[rt-users] Custom fields in transaction
Hi, I'm trying to assign the ticket to a queue based on a transaction custom field, but I am unable to fetch the custom field in my scrip. Scrip details: Condition: On correspond Action: User defined Template: Blank Custom condition: 1; Custom action preparation code: 1; Custom action commit code: my $queueName = $self->TicketObj->QueueObj->Name; RT::Logger->info("Queue name: $queueName"); my $trans = $self->TransactionObj; RT::Logger->info($trans->FirstCustomFieldValue("Product")); -- The method FirstCustomFieldValue returns empty even though the value is set in form submission. All the stuff I found on Google are about custom fields in tickets, seems nobody uses transaction custom fields? I'm using RT 4.4.0. -- Nilesh - RT 4.4 and RTIR Training Sessions https://bestpractical.com/training * Los Angeles - September, 2016