PostQuestionsHere

From Request Tracker Wiki
Jump to navigation Jump to search

PLEASE, DON'T POST QUESTION HERE. THIS WIKI IS NOT FOR DISCUSSIONS. POST YOUR QUESTIONS TO MailingLists

I've dropped all unanswered questions, answered would live for a while because of historical reasons. --RuslanZakirov

Question

If anyone can decipher the error messages below, I'd be greatful. This occured on my first run of RT and is the entire pace. There are three sections here, error, context and code stack. It's obviously a permissions problem, but I'm not sure where it needs to be fixed at.

error:

mkdir /opt/rt3/var/mason_data/obj: Permission denied at /usr/lib/perl5/vendor_perl/5.8.0/HTML/Mason/Compiler/ToObject.pm line 96

Answer

I think it's installation problem, you've not specified right user:group of HTTP Server to RT's ./configure script. RT by default use www:www, but for eg RH use apache:apache. You can fix it after you have installed RT with chmod. //Ruslan

Origiinal Poster: Thanks, that makes sense. When I chmod 777 the whole directory it works and my groups in Gentoo are apache, not www. That'll do the trick. //jritchie

Answer 2

If you're on fedora core3 it could be an SELinux issue. Chnage /etc/selinux/conf from "restrictive" to "permissive". Be sure and reboot after changing. See also:http://fedora.redhat.com/docs/selinux-faq-fc3test2/

Answer 3

This is what I did on CentOS 4 (RHEL4) to get rid of the SELinux warnings about creating and rm'ing these Mason directories.

First:

tail /var/log/messages | audit2allow

to get the error messages, one when Apache restarts and one when accessing RT's web interface for the first time.

Then add these results to /etc/selinux/targeted/src/policy/domains/program/apache.te

allow httpd_t var_lib_t:dir { rmdir setattr };

allow httpd_t var_lib_t:dir create;

Load this policy and restart Apache:

cd /etc/selinux/targeted/src/policy; make load

/etc/init.d/httpd restart

Answer 4

You should chmod and chown the two following files to your RT_User /opt/rt3/var/mason_data/obj and /opt/rt3/var/mason_data/cache

Question

Is it possible for unprivileged users to see custom fields when creating a new ticket on the self service page? Or are custom fields only able to be used by privileged users?

Answer

It's not a privelge problem, it's code of SelfService. There were patch on RT mailing list which add this functionality to SelfService. If somebody has this patch please share it here.

Question

Is it possible to change the status of tickets by mail?

Situation: rt3 listens "in front of" a mailing list & creates tickets for requests sent to that list. Is it possible to answer via mail (To: requestor, Cc: List) and embed information in there that causes rt3 to change the ticket status? reqng e.g. resolves a ticket when an answer mail contains either a "q:res" at the top of the body or an "X-Request-Action: resolve" header.

Answer

We have a custom scrip set to do this based on the "RTC-Set-Owner" and "RTC-Set-Status" headers (obviously on our system we can set the owner via email as well). It's quite simple, you could do much more with it than we are. Here's what we have in the "Custom action cleanup code" section of an "On Correspond" scrip (don't forget to set "1;" or something similar in "Custom action preparation code"):

my $header = 'RTC-Set-Owner'; if ($self->TransactionObj->Attachments->First->GetHeader($header) ne '') { $self->TicketObj->SetOwner($self->TransactionObj->Attachments->First->GetHeader($header)); } $header = 'RTC-Set-Status'; if ($self->TransactionObj->Attachments->First->GetHeader($header) ne '') { $self->TicketObj->SetStatus($self->TransactionObj->Attachments->First->GetHeader($header)); } 1;

Question

Thanks to help from Ruslan and others, I have a scrip set up to add a Cc watcher based on the contents of a custom field and it works. However, I can't figure out how to get it to send out the actual e-mail notification as part of the action commit code. Could anyone help me out?

Here is my current scrip.

Condition: User Defined

Custom Condition:
  return undef unless ($self->TransactionObj->Type eq "Create");
  return undef unless ($self->TicketObj->FirstCustomFieldValue('Domain') =~
  /GWI/i);
  return 1;
Action: User Defined
Prep:  1;
Commit:
  $self->TicketObj->AddWatcher(
      Type => "Cc",
      PrincipalId => 34,
      Email => "test\@example.com" );
  push(@{$self->{'To'}}, $self->TicketObj->Requestors->MemberEmailAddresses,
      $self->TicketObj->QueueObj->Cc->MemberEmailAddresses);
  return 1;
Template: TestOnCreate

Answer

First of all, look better on doc for Ticket object. You need PrincipalId or Email argument only, both is redundancy.

Ok, now you permanently added watcher for ticket. You need notifications. Here is problems begin :) You have to add next scrip: On ... Notify Ccs with template ....

  • But Notify scrips use prep phase to fill recipients, because of it scrip don't add your watcher to recipients on ticket create.
  • But RT don't allow sort scrips and DB don't guaranty any specific order by default so it's possible that your block would be executed after notify's one.

Solution: move notify scrip to stage [=TransactionBatch] and 'addwatcher' scrip to stage [=TransactionCreate]. This feature avail since RT3.0.8. I think this could help.

See also: ScripExecOrder

//Ruslan

Question

How to a set a custom field based on data found in a newly created ticket?

Answer

Did you look into FAQ??? Mail gate section.

Question

Under RT Self Service, users (who cannot be granted rights) who submit a ticket cannot see the open ticket, or the closed ticket. Permissions issue? RT3

Answer

It seems to be a bug in old versions (before RT3) In RT3, be sure that the "email" is the same for requestor in ticket and user of Self Service.

Question

Can I have external auth for user? Either via ldap servers or let apaches access.cfg? Where can I find documentation on that?

Answer

You may refer to LdapOverlay which describe one possible solution.