Re: [rt-users] Open Ticket On Resolve Of Dependants?
Hi Kevin, this scrip open the parent ticket if all dependent are closed: my $deps = $self-TicketObj-DependedOnBy; while( my $link = $deps-Next ) { next unless $link-BaseURI-IsLocal; my $dep = $link-BaseObj; next if $dep-QueueObj-IsInactiveStatus($dep-Status); $dep-SetStatus('open') unless $dep-HasUnresolvedDependencies; } return 1; Note that you have to change your scrip condition to On Close. I don't understand the part with the ticket subject. Maybe you can figure it out by yourself with my suggestion or you can explain it a little bit more what you want to do. Chris Am 05.02.2013 17:03, schrieb Kevin Comer: Hello, I am new to Perl and RT Scrips, and I need to set up a scrip that will change the parent ticket from new to open when all dependent tickets have been resolved, or have it perform only on the Subject of one Specific Ticket. I found this script below and it works on the first ticket resolved. How can I modify this scrip to either wait till all dependents are resolved or resolved on a specific subject? I have tried this to get it to work on the subject, but to no avail. next unless( $l-BaseObj-Subject eq 'Change-Coordinator-Approval'); How can I find or figure out what objects are available for the different sections of a ticket? etc. Condition: On Status Change Action: User Defined Template: Global Template Blank Customer action: return 1; Custom action cleanup code: return 1 if ($self-TransactionObj-NewValue !~ /^(?:resolved|deleted|rejected)$/); my $DepOnBy = $self-TicketObj-DependedOnBy; while( my $l = $DepOnBy-Next ) { next unless( $l-BaseURI-IsLocal ); next unless( $l-BaseObj-Status =~ /^(?:new|open|stalled)$/ ); # here you can add any action # see also example below $l-BaseObj-SetStatus('open'); } $DepOnBy = undef; return 1; Any thoughts or ideas? Thanks in advance The information transmitted in this email is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you received this email in error, please contact the sender and delete the email from your computer. -- Help improve RT by taking our user survey: https://www.surveymonkey.com/s/N23JW9T
Re: [rt-users] ticket content not displaying via RT's web 'Search' but shows up with sphinx's 'search' binary
I've SQL query logging onto a file rt.log. While running searches I'm suffixing grep AttachmentsIndex since there is no much of other log data. I've noticed, for every successful string search(a search that returns expected matching results) from RT webUI there are 2 sets of SQL queries performed on 'AttachmentsIndex'. One begins with 'SELECT COUNT(DISTINCT main.id)...' and other 'SELECT DISTINCT main.*...'. Please see the output below from the logs for the search query 'fulltext:uniqops2reply1' where 'uniqops2reply1'//was the only content of a particular ticket that was indexed. / //SELECT COUNT(DISTINCT main.id) FROM Tickets main JOIN Transactions Transactions_1 ON ( Transactions_1.ObjectType = 'RT::Ticket' ) AND ( Transactions_1.ObjectId = main.id ) JOIN Attachments Attachments_2 ON ( Attachments_2.TransactionId = Transactions_1.id ) JOIN AttachmentsIndex AttachmentsIndex_3 ON ( AttachmentsIndex_3.id = Attachments_2.id ) WHERE (main.Status != 'deleted') AND ( ( ( AttachmentsIndex_3.query = 'uniqops2reply1;limit=1;maxmatches=1' ) ) AND ( main.Status = 'new' OR main.Status = 'open' OR main.Status = 'stalled' ) ) AND (main.Type = 'ticket') AND (main.EffectiveId = main.id) ; (/opt/rt4/sbin/../lib/RT/Interface/Web.pm:1183)/ * */SELECT DISTINCT main.* FROM Tickets main JOIN Transactions Transactions_1 ON ( Transactions_1.ObjectType = 'RT::Ticket' ) AND ( Transactions_1.ObjectId = main.id ) JOIN Attachments Attachments_2 ON ( Attachments_2.TransactionId = Transactions_1.id ) JOIN AttachmentsIndex AttachmentsIndex_3 ON ( AttachmentsIndex_3.id = Attachments_2.id ) WHERE (main.Status != 'deleted') AND ( ( ( AttachmentsIndex_3.query = 'uniqops2reply1;limit=1;maxmatches=1' ) ) AND ( main.Status = 'new' OR main.Status = 'open' OR main.Status = 'stalled' ) ) AND (main.Type = 'ticket') AND (main.EffectiveId = main.id) ORDER BY main.id ASC LIMIT 50; (/opt/rt4/sbin/../lib/RT/Interface/Web.pm:1183)// / Next, I made a 2nd reply to the same ticket with the content as 'uniqops2reply2'. I ran 'indexer' with --rotate and was successful. For clarity, I issued CLI search of sphinx and it exactly matched the string 'uniqops2reply2' in the same ticket. But on querying 'fulltext:uniqops2reply2' on web-UI it failed with 0 results! I checked the logs to see that only 1 out of the 2 SQL queries were executed i.e. only the below was seen for the failed web-UI search: /SELECT COUNT(DISTINCT main.id) FROM Tickets main JOIN Transactions Transactions_1 ON ( Transactions_1.ObjectType = 'RT::Ticket' ) AND ( Transactions_1.ObjectId = main.id ) JOIN Attachments Attachments_2 ON ( Attachments_2.TransactionId = Transactions_1.id ) JOIN AttachmentsIndex AttachmentsIndex_3 ON ( AttachmentsIndex_3.id = Attachments_2.id ) WHERE (main.Status != 'deleted') AND ( ( ( AttachmentsIndex_3.query = 'uniqops2reply2;limit=1;maxmatches=1' ) ) AND ( main.Status = 'new' OR main.Status = 'open' OR main.Status = 'stalled' ) ) AND (main.Type = 'ticket') AND (main.EffectiveId = main.id) ; (/opt/rt4/sbin/../lib/RT/Interface/Web.pm:1183) /The /'SELECT DISTINCT...' /query//was missing. I re-ran 'indexer' again but the same story repeated. I executed this missing query by hand on the MySQL server and it returned the matching result! Testing further, another 3rd reply was made to the same ticket with content 'uniqops2reply3'. I *did not *run 'indexer'. Then I ran the previous failed query 'fulltext:uniqops2reply2'. Surprisingly it returned the results! Also on checking rt.log both the SQL queries /'SELECT COUNT...' /and '/SELECT DISTINCT...' /were executed! I ran 'indexer' to index the 3rd reply. Same story; 'fulltext:uniqops2reply3' failed with 0 results and with only /'SELECT COUNT...'/ being executed. I created a new ticket instead of replying to the same ticket. I issued the previously failed 'fulltext:uniqops2reply3' again, but this time it returned the expected result with both SQL queries executed. So it seems that after an update is made and is indexed, it requires another update for the previously updated content to be available from RT's webUI search OR putting it in more specific terms: it requires another update so that '/SELECT DISTINCT...' /is also executed on AttachmentsIndex while searching for previously indexed content. What could possibly be the problem here? Thanks, -- Help improve RT by taking our user survey: https://www.surveymonkey.com/s/N23JW9T
Re: [rt-users] REST API and WebExternal Auth
Hi Tom, It is definatly possible to use the REST API with external auth as we use it to run scheduled reports. I've not used curl, all our scripts are in python. I would guess that you are not providing the credentials correctly, the following wiki page may help. http://requesttracker.wikia.com/wiki/REST Best Regards Martin On 2013-02-05 19:58, Thomas Misilo wrote: Hi, I was wondering if it would be possible to use the REST API and an External Auth? I keep getting redirected, when I try curling a url. Also, I was wondering if anyone has created a page that shows all current open tickets, and all current opened/unclaimed tickets? Thanks, Tom !DSPAM:9,51115b1633231209415469! -- Help improve RT by taking our user survey: https://www.surveymonkey.com/s/N23JW9T
Re: [rt-users] ticket content not displaying via RT's web 'Search' but shows up with sphinx's 'search' binary
On 02/06/2013 02:42 AM, Subin wrote: So it seems that after an update is made and is indexed, it requires another update for the previously updated content to be available from RT's webUI search OR putting it in more specific terms: it requires another update so that '/SELECT DISTINCT...' /is also executed on AttachmentsIndex while searching for previously indexed content. What could possibly be the problem here? The first query is selecting the number of rows that would match; when RT sees that MySQL reports 0 rows, it doesn't bother to run the query which fetches the actual ticket data. It's not a bug that the second query isn't run when the first returns 0. The question is why does the first query return 0, and I expect that's more MySQL and Sphinx related than RT related. It's not clear what you're reindexing when you run 'indexer'. Are you reindexing the main index or the delta index or both? Do you have this problem if you don't use a delta index (i.e. is this caused by the main+delta setup you're using for Sphinx)? -- Help improve RT by taking our user survey: https://www.surveymonkey.com/s/N23JW9T
[rt-users] Ticket Duplication
We are using Rt 4.0.8 with mysql and sendmail Our RT tickets are created by our users by sending an email to rt@ Randomly some of the tickets are duplicating on creation. So far I am unable to find any pattern in this duplication. Can some one please guide how to troubleshoot this issue. Which logs should I be looking at? Thanks much! I will appreciate all the responses. -- Help improve RT by taking our user survey: https://www.surveymonkey.com/s/N23JW9T
[rt-users] Helpdesk Support in all correspondance
When ever a ticket is replied to this phrase appears: --- On 2/6/13 6:02 PM, Helpdesk Support hel...@mycompany.com wrote: --- I want to change this (perhaps to the users name or email address) but I cannot for the life of me find what controls that wording. I can't find Helpdesk Support in any of the config files. Can somebody point me in the right direction? -Joe -- View this message in context: http://requesttracker.8502.n7.nabble.com/Helpdesk-Support-in-all-correspondance-tp52623.html Sent from the Request Tracker - User mailing list archive at Nabble.com. -- Help improve RT by taking our user survey: https://www.surveymonkey.com/s/N23JW9T