[rt-users] Ingest csv, xls or xml to create, modify or resolve tickets
Hi, Has anyone had to use csv,xml,plain or xls files and then ingest them into RT to Create, Change or delete I ask the question because there is no point in re-inventing the wheel if something has already been written that can be shared. Regards Simon ___ http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users Community help: http://wiki.bestpractical.com Commercial support: sa...@bestpractical.com Discover RT's hidden secrets with RT Essentials from O'Reilly Media. Buy a copy at http://rtbook.bestpractical.com
Re: [rt-users] Ingest csv, xls or xml to create, modify or resolve tickets
Simon; Do you mean something similar to : Tools->Offline ?? Roy Simon Dray wrote: > > Hi, > > > > Has anyone had to use csv,xml,plain or xls files and then ingest them > into RT to Create, Change or delete I ask the question because there > is no point in re-inventing the wheel if something has already been > written that can be shared. > > > > Regards Simon > > > ___ http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users Community help: http://wiki.bestpractical.com Commercial support: sa...@bestpractical.com Discover RT's hidden secrets with RT Essentials from O'Reilly Media. Buy a copy at http://rtbook.bestpractical.com
Re: [rt-users] Ingest csv, xls or xml to create, modify or resolve tickets
Roy This looks like a possibility many thanks for the prompt response, do you know if it is documented anywhere in full I guess probably in the Docs. Is it possible to RT command line to ingest the file as I want to automate the whole process i.e a file get delivered to my RT server and at a given time a cronjob run the ingest process and then generates a report of what was done, bit more complex than my post indicated I know. Best regards Simon -Original Message- From: Raed El-Hames [mailto:r...@vialtus.com] Sent: 21 May 2009 11:31 To: Simon Dray Cc: RT-Users@lists.bestpractical.com Subject: Re: [rt-users] Ingest csv, xls or xml to create, modify or resolve tickets Simon; Do you mean something similar to : Tools->Offline ?? Roy Simon Dray wrote: > > Hi, > > > > Has anyone had to use csv,xml,plain or xls files and then ingest them > into RT to Create, Change or delete I ask the question because there > is no point in re-inventing the wheel if something has already been > written that can be shared. > > > > Regards Simon > > > ___ http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users Community help: http://wiki.bestpractical.com Commercial support: sa...@bestpractical.com Discover RT's hidden secrets with RT Essentials from O'Reilly Media. Buy a copy at http://rtbook.bestpractical.com
Re: [rt-users] Ingest csv, xls or xml to create, modify or resolve tickets
You can deliver using web request with credentials of an user. On Thu, May 21, 2009 at 2:48 PM, Simon Dray wrote: > Roy > > This looks like a possibility many thanks for the prompt response, do you > know if it is documented anywhere in full I guess probably in the Docs. Is it > possible to RT command line to ingest the file as I want to automate the > whole process i.e a file get delivered to my RT server and at a given time a > cronjob run the ingest process and then generates a report of what was done, > bit more complex than my post indicated I know. > > Best regards Simon > > -Original Message- > From: Raed El-Hames [mailto:r...@vialtus.com] > Sent: 21 May 2009 11:31 > To: Simon Dray > Cc: RT-Users@lists.bestpractical.com > Subject: Re: [rt-users] Ingest csv, xls or xml to create, modify or resolve > tickets > > Simon; > > Do you mean something similar to : > Tools->Offline ?? > > Roy > > > > > > Simon Dray wrote: >> >> Hi, >> >> >> >> Has anyone had to use csv,xml,plain or xls files and then ingest them >> into RT to Create, Change or delete I ask the question because there >> is no point in re-inventing the wheel if something has already been >> written that can be shared. >> >> >> >> Regards Simon >> >> >> > ___ > http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users > > Community help: http://wiki.bestpractical.com > Commercial support: sa...@bestpractical.com > > > Discover RT's hidden secrets with RT Essentials from O'Reilly Media. > Buy a copy at http://rtbook.bestpractical.com > -- Best regards, Ruslan. ___ http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users Community help: http://wiki.bestpractical.com Commercial support: sa...@bestpractical.com Discover RT's hidden secrets with RT Essentials from O'Reilly Media. Buy a copy at http://rtbook.bestpractical.com
Re: [rt-users] Remove a user or merge two users?
Can you find log of the installation? Especially that part where you run Makefile.PL. This extension has up to date installer to install into plugins directory, but in the error I see old style path. In you case I think adding "require RT::Extension::MergeUsers;" to the end of the site config will help. On Thu, May 21, 2009 at 5:08 AM, Jeff Lucas wrote: > Thanks for the suggestion, Ruslan. > > I installed/ran RT-Extension-MergeUsers-0.03_02 (specifying the ID, i.e. 28 > rather than the username, i.e. j...@eagle.com that I wanted to merge the acct > into) and it resulted in... > > RT::User::MergeInto Unimplemented in HTML::Mason::Commands. > (/apps/rt-3.8.2/share/html/Callbacks/RT-Extension-MergeUsers/Admin/Users/Modify.html/RightColumnBottom > line 71) > > It does not appear to have worked since both users still show up in my user > list (ID's 28 and 3659. > > Any suggestions? > > Thanks. > > -Jeff > > > -Original Message- > From: Ruslan Zakirov [mailto:ruslan.zaki...@gmail.com] > Sent: Wednesday, May 20, 2009 6:12 PM > To: Jeff Lucas > Cc: rt-users@lists.bestpractical.com > Subject: Re: [rt-users] Remove a user or merge two users? > > There are MergeUsers and MergeUsersHistory extensions in the best > practical's repository and on the CPAN. > > On Wed, May 20, 2009 at 11:41 PM, Jeff Lucas wrote: >> Hello. >> >> I’d like to either… >> >> 1) Remove an account that was mistakenly created (preferred) >> >> 2) Or, merge two accounts (id’s 28 and 3659) >> >> I understand why in general you do not want to remove accounts/id’s in RT, >> but this account has one ticket under it which can be recreated and I’d >> prefer to keep my RT instance as clean as possible. >> >> Thanks. >> >> -Jeff >> >> ___ >> http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users >> >> Community help: http://wiki.bestpractical.com >> Commercial support: sa...@bestpractical.com >> >> >> Discover RT's hidden secrets with RT Essentials from O'Reilly Media. >> Buy a copy at http://rtbook.bestpractical.com >> > > > > -- > Best regards, Ruslan. > -- Best regards, Ruslan. ___ http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users Community help: http://wiki.bestpractical.com Commercial support: sa...@bestpractical.com Discover RT's hidden secrets with RT Essentials from O'Reilly Media. Buy a copy at http://rtbook.bestpractical.com
[rt-users] FW: Regular Authentication and ExternalAuth RT 3.8.1
I'm still having a problem with this. Does anyone know how to get LDAP working on RT 3.8.2? Thank you. -Original Message- From: Eric Chatham Sent: Wednesday, May 20, 2009 14:55 To: 'Eric Chatham'; RT-Users@lists.bestpractical.com Subject: RE: Regular Authentication and ExternalAuth RT 3.8.1 On Tuesday, May 20, 2009, Eric Chatham wrote: > It appears that after I got Apache/MySql working previously, I am unable to > login with the default username/password (root/password) to the web > > interface. I started a new topic for this. I also tried adding settings in > for ExternalAuth to the RT_SiteConfig.pm. I am getting an @INC > error in Apache when I try restarting the service. Even before I added the > "External Authentication" variables, "LDAP" variables and the > "ExternalAuth" Plugin setting, I still could not login using root and > password. > > /opt/rt3/etc/RT_SiteConfig.pm settings: I fixed some of my problems. I did two things to fix them, but I'm still stuck. 1. I copied my RT_SiteConfig.pm and Apache Config and re-ran the installation (./configure -> make testdeps -> make install). I copied my saved RT_SiteConfig.pm and Apache config back to their original location. I ran "make dropdb" to redo the database installation. There wasn't anything in there before so I was aware of the warning of all data being lost. This fixed the problem I was having trying to log onto the web interface with the defaults (root and password). I would like to change this password, can anyone tell me how this is changed? The README file didn't say how or where. > APACHE ERROR_LOG: > > [Tue May 19 12:54:25 2009] [error] Can't load Perl file: > /opt/rt3/bin/webmux.pl for server clehbrtsrv01.broadvox.local:0, exiting... > [Tue May 19 12:55:17 2009] [error] Can't locate RT/Authen/ExternalAuth.pm in > @INC (@INC contains: /opt/rt3/bin/../local/lib /opt/rt3/bin/../lib > > /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi > /usr/lib/perl5/site_perl/5.8.7/i386-linux-thread-multi > /usr/lib/perl5/site_perl/5.8.6/i386-linux-thread-multi > /usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi > /usr/lib/perl5/site_perl/5.8.8 > /usr/lib/perl5/site_perl/5.8.7 /usr/lib/perl5/site_perl/5.8.6 > /usr/lib/perl5/site_perl/5.8.5 /usr/lib/perl5/site_perl > /usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi > /usr/lib/perl5/vendor_perl/5.8.7/i386-linux-thread-multi > /usr/lib/perl5/vendor_perl/5.8.6/i386-linux-thread-multi > /usr/lib/perl5/vendor_perl/5.8.5/i386-linux-thread-multi > /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl/5.8.7 > /usr/lib/perl5/vendor_perl/5.8.6 /usr/lib/perl5/vendor_perl/5.8.5 > /usr/lib/perl5/vendor_perl /usr/lib/perl5/5.8.8/i386-linux-thread-multi > /usr/lib/perl5/5.8.8 . /etc/httpd) at /opt/rt3/bin/../lib/RT.pm line > 625.\nCompilation failed in require at (eval 2) line 1.\n > [Tue May 19 12:55:17 2009] [error] Can't load Perl file: > /opt/rt3/bin/webmux.pl for server clehbrtsrv01.broadvox.local:0, exiting... 2. I partly fixed the problem I was having with LDAP. First, I looked for the ./RT/Authen/ directory and copied it recursively over to /opt/rt3/bin. This fixed the problem as far as the Module being included, but it did not fix the problem I'm having trying to use LDAP. So, here are examples of my problems after the fixings. Could someone double check them for me? Thank you once again for your assistance. RT_SiteConfig.pm settings: # Set( $rtname, 'example.com'); # Set(@Plugins,(qw(Extension::QuickDelete))); # Set($WebPath, "/rt3"); Set($rtname, "broadvox.local"); Set($Orginization, 'broadvox.local'); Set($CorrespondAddress, 'echat...@broadvox.net'); Set($CommentAddress, 'echat...@infotelecom.us'); Set($Timezone, 'US/Eastern'); # Set($WebBaseURL, 'http://rt.broadvox.local/'); Set(@Plugins, qw(RT::Authen::ExternalAuth)); # Database # Set($DatabaseType, 'mysql'); # Set($DatabaseUser, 'rt_user'); # Set($DatabasePassword, 'rt_pass'); # Set($DatabaseRTHost, 'localhost'); # External Authentication Set($ExternalAuthPriority, ['My_LDAP']); Set($ExternalInfoPriority, ['My_LDAP']); Set($AutoCreateNonExternalUsers, 1); Set($ExternalAuthPriority, ['My_LDAP', 'My_MySQL', 'My_Oracle', 'SecondaryLDAP', 'Other-DB']); # LDAP Set($AuthMethods, ['My_LDAP', 'Internal']); Set($LdapExternalAuth, 0); Set($LdapExternalInfo, 0); Set($LdapAutoCreateNonLdapUsers, 1); Set($LdapAttrMap, {'Name' => 'sAMAccountName', 'EmailAddress' => 'mail', 'Orginization' => 'o', 'RealName' => 'cn', 'ExternalContactInfoId' => 'dn', 'ExternalAuthId' => 'sAMAccountName', 'Gecos', => 'sAMAccountName', 'WorkPhone', => 'telephoneNumber', 'Address1' => 'streetAddress', 'City' => 'l', 'State' => 'st', 'Zip' => 'postalCode', 'Country' => 'co'}); Set($
Re: [rt-users] FW: Regular Authentication and ExternalAuth RT 3.8.1
Thu 21 May 2009 15:18:29 GMT Eric Chatham wrote: > I'm still having a problem with this. Does anyone know how to get LDAP > working on RT 3.8.2? Thank you. Absolutely. > -Original Message- > From: Eric Chatham > Sent: Wednesday, May 20, 2009 14:55 > To: 'Eric Chatham'; RT-Users@lists.bestpractical.com > Subject: RE: Regular Authentication and ExternalAuth RT 3.8.1 > > On Tuesday, May 20, 2009, Eric Chatham wrote: > >> It appears that after I got Apache/MySql working previously, I am unable to >> login with the default username/password (root/password) to the web > >> interface. I started a new topic for this. I also tried adding settings in >> for ExternalAuth to the RT_SiteConfig.pm. I am getting an @INC >> error in Apache when I try restarting the service. Even before I added the >> "External Authentication" variables, "LDAP" variables and the >> "ExternalAuth" Plugin setting, I still could not login using root and >> password. I think part of the problem may be that you seem to be mixing LDAP implementations. >> >> /opt/rt3/etc/RT_SiteConfig.pm settings: > > I fixed some of my problems. I did two things to fix them, but I'm still > stuck. > > 1. I copied my RT_SiteConfig.pm and Apache Config and re-ran the > installation (./configure -> make testdeps -> make install). I copied my > saved RT_SiteConfig.pm and Apache config back to their original location. I > ran "make dropdb" to redo the database installation. There wasn't anything > in there before so I was aware of the warning of all data being lost. > > This fixed the problem I was having trying to log onto the web interface with > the defaults (root and password). I would like to change this password, can > anyone tell me how this is changed? The README file didn't say how or where. > >> APACHE ERROR_LOG: You don't mention actually *installing* RT::Authen::ExternalAuth into your RT install.. > > 2. I partly fixed the problem I was having with LDAP. First, I looked for > the ./RT/Authen/ directory and copied it recursively over to /opt/rt3/bin. > This fixed the problem as far as the Module being included, but it did not > fix the problem I'm having trying to use LDAP. I totally don't see how that would work.. throwing random stuff into a bin dir certainly would have no impact on getting it going.. This further makes me concerned that you might not have actually installed the plugin at all. > > So, here are examples of my problems after the fixings. Could someone double > check them for me? Thank you once again for your assistance. > > RT_SiteConfig.pm settings: > > Set(@Plugins, qw(RT::Authen::ExternalAuth)); This line is right and is what causes the plugin to get loaded assuming it's properly installed. > # External Authentication > Set($ExternalAuthPriority, ['My_LDAP']); > Set($ExternalInfoPriority, ['My_LDAP']); > Set($AutoCreateNonExternalUsers, 1); > Set($ExternalAuthPriority, ['My_LDAP', 'My_MySQL', 'My_Oracle', > 'SecondaryLDAP', 'Other-DB']); Why are you overriding ExternalAuthPriority with invalid entries after having set it correctly the first time? > Set($AuthMethods, ['My_LDAP', 'Internal']); This is not a valid setting any more. Delete it. It was deprecated by ExternalAuthPriority. > Set($LdapExternalAuth, 0); > Set($LdapExternalInfo, 0); > Set($LdapAutoCreateNonLdapUsers, 1); These are nothing to do with ExternalAuth, you must have picked them up from somewhere else. Delete them. > Set($LdapAttrMap, {'Name' => 'sAMAccountName', >'EmailAddress' => 'mail', >'Orginization' => 'o', >'RealName' => 'cn', >'ExternalContactInfoId' => 'dn', >'ExternalAuthId' => 'sAMAccountName', >'Gecos', => 'sAMAccountName', >'WorkPhone', => 'telephoneNumber', >'Address1' => 'streetAddress', >'City' => 'l', >'State' => 'st', >'Zip' => 'postalCode', >'Country' => 'co'}); > Set($LdapRTAttrMatchList, ['ExternalContactInfoId', 'Name', >'EmailAddress', 'RealName', >'WorkPhone', 'Address2']); > Set($LdapEmailAttrMatchList, ['mail', 'mailRoutingAddress', > 'mailAlternateAddress']); > Set($LdapEmailAttrMatchPrefix, ['', 'smtp', 'SMTP:']); > Set($LdapServer, 'clehbdc01.broadvox.local'); > Set($LdapBase, 'OU=USA,DC=broadvox,DC=local'); > Set($LdapFilter, '(objectClass=*)'); ALL of these are irrelevant to ExternalAuth. ExternalAuth uses a single config variable called ExternalSettings with the settings for all external configurations inside it. > > Here are my APACHE ERROR_LOG listings: > The apache error_log is useless for debugging EA, you need to have debug logging enabled and look at the rt log. You need to go back to basics and start again. First things first, go to
[rt-users] Can Simple.html search Email OR Content (not AND) ?
Hi, I would like to make it so that the Simple Search (3.8.2) will always search Content, Requestor and Subject fields using LIKE comparisons so that users won't need to prepend "fulltext:" and "email:" (the latter won't find partial email addresses) on search terms. I have created a local overlay for html/Search/Simple.html which loads a local lib/RT/Search/Googleish.pm and that has an altered QueryToSQL function which bakes the search term into the pseudo-SQL: ( Content LIKE 'munchy' ) OR ( Requestor LIKE 'munchy' ) OR ( Subject LIKE 'munchy' ) The above gets fed deeper into RT SearchBuilder guts, until it comes out in the mysql query log as this: 1WHERE (Transactions_1.ObjectType = 'RT::Ticket') 2AND (main.Status != 'deleted') 3AND (Users_5.EmailAddress LIKE '%munchy%') 4AND ( 5( ( Attachments_2.Content LIKE '%munchy%' ) ) 6OR 7( ( CachedGroupMembers_4.id IS NOT NULL ) ) 8OR 9( main.Subject LIKE '%munchy%' ) 10 ) 11 AND (main.Type = 'ticket') 12 AND (main.EffectiveId = main.id) So the final actual query is not what I asked for because there will be zero results if the EmailAddress does not match. I want all results where the Email OR Content OR Subject is LIKE the search term. If Line 3 above could be moved down after Line 4 and connected by "OR" then it would work and find tickets. I dug around and found something about EnteryAggregator in lib/RT/Tickets_Overlay.pm but I don't know what to do next or how to modify Googleish.pm to get the results I am looking for. A ___ http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users Community help: http://wiki.bestpractical.com Commercial support: sa...@bestpractical.com Discover RT's hidden secrets with RT Essentials from O'Reilly Media. Buy a copy at http://rtbook.bestpractical.com
Re: [rt-users] FW: Regular Authentication and ExternalAuth RT 3.8.1
On Thursday, May 21, 2009 10:39, Mike Peachey wrote, >> I'm still having a problem with this. Does anyone know how to get LDAP >working on RT 3.8.2? Thank you. > >Absolutely. > >You don't mention actually *installing* RT::Authen::ExternalAuth into >your RT install.. I did the CPAN install. Would you suggest the manual installation, using the tarball you provided in your e-mail? >> 2. I partly fixed the problem I was having with LDAP. First, I looked for >the ./RT/Authen/ directory and copied it recursively over to /opt/rt3/bin. >This fixed the problem as far as the Module being included, but it did not fix >the problem I'm having trying to use LDAP. > >I totally don't see how that would work.. throwing random stuff into a >bin dir certainly would have no impact on getting it going.. > >This further makes me concerned that you might not have actually >installed the plugin at all. > >> >> So, here are examples of my problems after the fixings. Could someone >double check them for me? Thank you once again for your assistance. >> >> RT_SiteConfig.pm settings: >> >> Set(@Plugins, qw(RT::Authen::ExternalAuth)); > >This line is right and is what causes the plugin to get loaded assuming >it's properly installed. > >> # External Authentication >> Set($ExternalAuthPriority, ['My_LDAP']); >> Set($ExternalInfoPriority, ['My_LDAP']); >> Set($AutoCreateNonExternalUsers, 1); >> Set($ExternalAuthPriority, ['My_LDAP', 'My_MySQL', 'My_Oracle', >'SecondaryLDAP', 'Other-DB']); > >Why are you overriding ExternalAuthPriority with invalid entries after >having set it correctly the first time? > >> Set($AuthMethods, ['My_LDAP', 'Internal']); > >This is not a valid setting any more. Delete it. It was deprecated by >ExternalAuthPriority. > > >> Set($LdapExternalAuth, 0); >> Set($LdapExternalInfo, 0); >> Set($LdapAutoCreateNonLdapUsers, 1); > >These are nothing to do with ExternalAuth, you must have picked them up >from somewhere else. Delete them. > > >> Set($LdapAttrMap, {'Name' => 'sAMAccountName', >>'EmailAddress' => 'mail', >>'Orginization' => 'o', >>'RealName' => 'cn', >>'ExternalContactInfoId' => 'dn', >>'ExternalAuthId' => 'sAMAccountName', >>'Gecos', => 'sAMAccountName', >>'WorkPhone', => 'telephoneNumber', >>'Address1' => 'streetAddress', >>'City' => 'l', >>'State' => 'st', >>'Zip' => 'postalCode', >>'Country' => 'co'}); >> Set($LdapRTAttrMatchList, ['ExternalContactInfoId', 'Name', >>'EmailAddress', 'RealName', >>'WorkPhone', 'Address2']); >> Set($LdapEmailAttrMatchList, ['mail', 'mailRoutingAddress', >> 'mailAlternateAddress']); >> Set($LdapEmailAttrMatchPrefix, ['', 'smtp', 'SMTP:']); >> Set($LdapServer, 'clehbdc01.broadvox.local'); >> Set($LdapBase, 'OU=USA,DC=broadvox,DC=local'); >> Set($LdapFilter, '(objectClass=*)'); > >ALL of these are irrelevant to ExternalAuth. ExternalAuth uses a single >config variable called ExternalSettings with the settings for all >external configurations inside it. > > >> >> Here are my APACHE ERROR_LOG listings: >> > >The apache error_log is useless for debugging EA, you need to have debug >logging enabled and look at the rt log. > > >You need to go back to basics and start again. First things first, go to >cpan and get the latest tarball for RT-Authen-ExternalAuth v0.08. >http://search.cpan.org/CPAN/authors/id/Z/ZO/ZORDRAK/RT-Authen-ExternalAuth- >0.08.tar.gz > >Open the README and read it top to bottom. >http://search.cpan.org/src/ZORDRAK/RT-Authen-ExternalAuth-0.08/README > >Open the example configuration file and read through. If it's not >provided as an example entry there, you shouldn't have it in your >RT_SiteConfig.pm. >http://cpansearch.perl.org/src/ZORDRAK/RT-Authen-ExternalAuth- >0.08/etc/RT_SiteConfig.pm > >Once done, strip your RT_SiteConfig.pm down to basics and add the >directives you need from the example, modifying them to suit and work >with your LDAP environment. >-- CONFIDENTIAL. This e-mail and any attached files are confidential and should be destroyed and/or returned if you are not the intended and proper recipient. ___ http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users Community help: http://wiki.bestpractical.com Commercial support: sa...@bestpractical.com Discover RT's hidden secrets with RT Essentials from O'Reilly Media. Buy a copy at http://rtbook.bestpractical.com
[rt-users] "No object mapping for field" when referencing the UserObject of a MembersObject...
Please let me know if this is supposed to go to RT-Users or RT-Devel. I'm trying to write a utility to interface with Request Tracker, and part of what that utility has to do is get the members of some user created groups. Just sub in actual groups for what you want in there, CurrentUser works and is already initialized by the time my program gets here. Mostly borrowing this code from the old rtimportldap script, I came up with this: --code-- # RT Group $groupObj = new RT::Group($CurrentUser); $groupObj->LoadUserDefinedGroup($groupName); $groupObj->Id() || die "Group ".$groupName." not found in RequestTracker"; $groupMembersObj = $groupObj->MembersObj(); print $groupObj->Id().":".$groupObj.":".$groupMembersObj.":" .$groupMembersObj->Next()->UserObj()."\n"; ## This creates an error while ( $groupMember = $groupMembersObj->Next() ) { $groupMemberUser = $groupMember->UserObj(); print $groupMemberUser->Name()."\n"; ## This does too #$memberName = $groupMemberUser->Name(); #push(@rtMembers, $memberName); } --/code-- What it seems is that GroupObj->MembersObj()->Next()->UserObj() causes the problem, as UserObj() returns, not a UserObject, but a string stating "No object mapping for field" Attempting to use the Name() function of course doesn't work because "No object..."->Name() doesn't make sense... What's going on? Thanks, Johnathan -- Johnathan Bell Internet System Administrator, Baker College ___ http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users Community help: http://wiki.bestpractical.com Commercial support: sa...@bestpractical.com Discover RT's hidden secrets with RT Essentials from O'Reilly Media. Buy a copy at http://rtbook.bestpractical.com
Re: [rt-users] "No object mapping for field" when referencing the UserObject of a MembersObject...
As group may have another group as meber as well as user, so records in GroupMembers and CachedGroupMembers objects reference Principals. If you are looking for users only that are members of a group then it's easier to do the following: my $group = ... $group->Load... my $users = $group->UserMembersObj; while ( my $user = $users->Next ) { ... } On Thu, May 21, 2009 at 9:46 PM, Johnathan Bell wrote: > Please let me know if this is supposed to go to RT-Users or RT-Devel. > > I'm trying to write a utility to interface with Request Tracker, and > part of what that utility has to do is get the members of some user > created groups. Just sub in actual groups for what you want in there, > CurrentUser works and is already initialized by the time my program gets > here. Mostly borrowing this code from the old rtimportldap script, I > came up with this: > > --code-- > # RT Group > $groupObj = new RT::Group($CurrentUser); > $groupObj->LoadUserDefinedGroup($groupName); > $groupObj->Id() || die "Group ".$groupName." not found in > RequestTracker"; > > $groupMembersObj = $groupObj->MembersObj(); > print $groupObj->Id().":".$groupObj.":".$groupMembersObj.":" > .$groupMembersObj->Next()->UserObj()."\n"; ## This creates an error > while ( $groupMember = $groupMembersObj->Next() ) > { > $groupMemberUser = $groupMember->UserObj(); > print $groupMemberUser->Name()."\n"; ## This does too > #$memberName = $groupMemberUser->Name(); > #push(@rtMembers, $memberName); > } > --/code-- > > What it seems is that GroupObj->MembersObj()->Next()->UserObj() causes > the problem, as UserObj() returns, not a UserObject, but a string > stating "No object mapping for field" Attempting to use the Name() > function of course doesn't work because "No object..."->Name() doesn't > make sense... What's going on? > > Thanks, > Johnathan > > -- > Johnathan Bell > Internet System Administrator, Baker College > > ___ > http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users > > Community help: http://wiki.bestpractical.com > Commercial support: sa...@bestpractical.com > > > Discover RT's hidden secrets with RT Essentials from O'Reilly Media. > Buy a copy at http://rtbook.bestpractical.com > -- Best regards, Ruslan. ___ http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users Community help: http://wiki.bestpractical.com Commercial support: sa...@bestpractical.com Discover RT's hidden secrets with RT Essentials from O'Reilly Media. Buy a copy at http://rtbook.bestpractical.com
Re: [rt-users] "No object mapping for field" when referencing the UserObject of a MembersObject...
There is example in: http://wiki.bestpractical.com/view/CodeSnippets On Thu, May 21, 2009 at 10:11 PM, Ruslan Zakirov wrote: > As group may have another group as meber as well as user, so records > in GroupMembers and CachedGroupMembers objects reference Principals. > > If you are looking for users only that are members of a group then > it's easier to do the following: > > my $group = ... > $group->Load... > > my $users = $group->UserMembersObj; > while ( my $user = $users->Next ) { > ... > } > > On Thu, May 21, 2009 at 9:46 PM, Johnathan Bell > wrote: >> Please let me know if this is supposed to go to RT-Users or RT-Devel. >> >> I'm trying to write a utility to interface with Request Tracker, and >> part of what that utility has to do is get the members of some user >> created groups. Just sub in actual groups for what you want in there, >> CurrentUser works and is already initialized by the time my program gets >> here. Mostly borrowing this code from the old rtimportldap script, I >> came up with this: >> >> --code-- >> # RT Group >> $groupObj = new RT::Group($CurrentUser); >> $groupObj->LoadUserDefinedGroup($groupName); >> $groupObj->Id() || die "Group ".$groupName." not found in >> RequestTracker"; >> >> $groupMembersObj = $groupObj->MembersObj(); >> print $groupObj->Id().":".$groupObj.":".$groupMembersObj.":" >> .$groupMembersObj->Next()->UserObj()."\n"; ## This creates an error >> while ( $groupMember = $groupMembersObj->Next() ) >> { >> $groupMemberUser = $groupMember->UserObj(); >> print $groupMemberUser->Name()."\n"; ## This does too >> #$memberName = $groupMemberUser->Name(); >> #push(@rtMembers, $memberName); >> } >> --/code-- >> >> What it seems is that GroupObj->MembersObj()->Next()->UserObj() causes >> the problem, as UserObj() returns, not a UserObject, but a string >> stating "No object mapping for field" Attempting to use the Name() >> function of course doesn't work because "No object..."->Name() doesn't >> make sense... What's going on? >> >> Thanks, >> Johnathan >> >> -- >> Johnathan Bell >> Internet System Administrator, Baker College >> >> ___ >> http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users >> >> Community help: http://wiki.bestpractical.com >> Commercial support: sa...@bestpractical.com >> >> >> Discover RT's hidden secrets with RT Essentials from O'Reilly Media. >> Buy a copy at http://rtbook.bestpractical.com >> > > > > -- > Best regards, Ruslan. > -- Best regards, Ruslan. ___ http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users Community help: http://wiki.bestpractical.com Commercial support: sa...@bestpractical.com Discover RT's hidden secrets with RT Essentials from O'Reilly Media. Buy a copy at http://rtbook.bestpractical.com
Re: [rt-users] Can Simple.html search Email OR Content (not AND) ?
This known issue that if email is not in the db then result would be empty even if condition is ORed with another, but believe me correct query will kick breath out of your DB server. On Thu, May 21, 2009 at 9:27 PM, wrote: > Hi, > > I would like to make it so that the Simple Search (3.8.2) will always > search Content, Requestor and Subject fields using LIKE comparisons so > that users won't need to prepend "fulltext:" and "email:" (the latter > won't find partial email addresses) on search terms. > > I have created a local overlay for html/Search/Simple.html which loads > a local lib/RT/Search/Googleish.pm and that has an altered QueryToSQL > function which bakes the search term into the pseudo-SQL: > > ( Content LIKE 'munchy' ) OR ( Requestor LIKE 'munchy' ) OR ( > Subject LIKE 'munchy' ) > > The above gets fed deeper into RT SearchBuilder guts, until it comes > out in the mysql query log as this: > > 1 WHERE (Transactions_1.ObjectType = 'RT::Ticket') > 2 AND (main.Status != 'deleted') > 3 AND (Users_5.EmailAddress LIKE '%munchy%') > 4 AND ( > 5 ( ( Attachments_2.Content LIKE '%munchy%' ) ) > 6 OR > 7 ( ( CachedGroupMembers_4.id IS NOT NULL ) ) > 8 OR > 9 ( main.Subject LIKE '%munchy%' ) > 10 ) > 11 AND (main.Type = 'ticket') > 12 AND (main.EffectiveId = main.id) > > So the final actual query is not what I asked for because there will > be zero results if the EmailAddress does not match. I want all results > where the Email OR Content OR Subject is LIKE the search term. If Line > 3 above could be moved down after Line 4 and connected by "OR" then it > would work and find tickets. > > I dug around and found something about EnteryAggregator in > lib/RT/Tickets_Overlay.pm but I don't know what to do next or how to > modify Googleish.pm to get the results I am looking for. > > A > ___ > http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users > > Community help: http://wiki.bestpractical.com > Commercial support: sa...@bestpractical.com > > > Discover RT's hidden secrets with RT Essentials from O'Reilly Media. > Buy a copy at http://rtbook.bestpractical.com > -- Best regards, Ruslan. ___ http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users Community help: http://wiki.bestpractical.com Commercial support: sa...@bestpractical.com Discover RT's hidden secrets with RT Essentials from O'Reilly Media. Buy a copy at http://rtbook.bestpractical.com
Re: [rt-users] Can Simple.html search Email OR Content (not AND) ?
>> I would like to make it so that the Simple Search (3.8.2) will always >> search Content, Requestor and Subject fields using LIKE comparisons so >> and "email:" (won't find partial email addresses) > Is email: some newfangled 3.8.2 thing? Oops. Mixed up one of my attempted mods with how the stock install works. No, you are right. There is no "email:" modifier for simple search. I was trying to get it to search email addresses where the user doesn't remember the full address -- like just searching for 'email:foo' when they can't remember 'f...@foo.com' > To solve your latter problem of partial matches, you might try RTx::From > http://search.cpan.org/~jpierce/RTx-From-0.02/lib/RTx/From.pm Looking at the synopsis of that, "cannot be meaningfully combined with other search terms" seems to mean that a person could not search for "from:foo bar" and expect to find tickets that were from User "foo" and/or had the word "bar" in them. Is that right? If so, I don't think that is going to help me since my users are going to try to use other terms as well. A. ___ http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users Community help: http://wiki.bestpractical.com Commercial support: sa...@bestpractical.com Discover RT's hidden secrets with RT Essentials from O'Reilly Media. Buy a copy at http://rtbook.bestpractical.com
Re: [rt-users] Can Simple.html search Email OR Content (not AND) ?
> Looking at the synopsis of that, "cannot be meaningfully combined with > other search terms" seems to mean that a person could not search for > "from:foo bar" and expect to find tickets that were from User "foo" > and/or had the word "bar" in them. Is that right? If so, I don't think > that is going to help me since my users are going to try to use other > terms as well. Right, and there's no easy way around that as far as I know. You can do a two step process though: * Search "from:bob" * Click "Requested" for the intended user * Edit Search, and add other criteria as you see fit. -- Cambridge Energy Alliance: Save money. Save the planet. ___ http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users Community help: http://wiki.bestpractical.com Commercial support: sa...@bestpractical.com Discover RT's hidden secrets with RT Essentials from O'Reilly Media. Buy a copy at http://rtbook.bestpractical.com
Re: [rt-users] Can Simple.html search Email OR Content (not AND) ?
> This known issue that if email is not in the db then result would be > empty even if condition is ORed with another, but believe me correct > query will kick breath out of your DB server. > Are you saying that this "known issue" is a bug or is it intentional? I know that with a ton of tickets, this kind of "search everything" is not practical. But this will be a new RT deployment and I need to ease the support staff (and the boss) into getting used to this new system. Eventually I know they will find the QueryBuilder screen to be very precise and great, but right now everything is new and different and that screen scares them. They think it's too complicated. That's why I'd like to get the "WHERE EmailAddress like '%foo%' OR 'Content like '%foo%' OR'd together instead of having the EmailAddress separated from the rest of the query by an "AND." Thanks, A. ___ http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users Community help: http://wiki.bestpractical.com Commercial support: sa...@bestpractical.com Discover RT's hidden secrets with RT Essentials from O'Reilly Media. Buy a copy at http://rtbook.bestpractical.com
[rt-users] Desperately need help identifying Email CC object
List, I've copied the code that RT uses to get the Email address of CC's and add them as ticket watchers. When I HARD-CODE the Emaill address, it works fine. The ticket has several CC Watchers. However, I'm having trouble getting the actual CC Address ID's from the incoming Email. In my code, I try to identify them with: my @AddrObj = {$ticket->CcAddresses->id}; That didn't work. Then I tried: my @AddrObj = [%{$ticket->CcAddresses}]; that didn't work either. The object I try to evaluate is empty. What am I missing? Can anyone share with me how I can capture those email address objects so I can evaluate them and then add them to the Ticket CC? Your help on this will be greatly appreciated. Thanks. Kenn LBNL ___ http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users Community help: http://wiki.bestpractical.com Commercial support: sa...@bestpractical.com Discover RT's hidden secrets with RT Essentials from O'Reilly Media. Buy a copy at http://rtbook.bestpractical.com
Re: [rt-users] "No object mapping for field" when referencing the UserObject of a MembersObject...
Thanks... But another snippet on that page is now giving me trouble... --code-- my $currentUser = GetCurrentUser(); $currentUser->Load("tester97"); my ($status, $msg) = $groupObj->AddMember($currentUser->id()); die $msg unless $status; exit(0); --/code-- That code dies stating "Permission Denied"... do I need to authenticate as root first? The perldoc on CurrentUser_Overlay.pm is a bit to obscure for me and an example would really help. Thanks again, Johnathan Ruslan Zakirov wrote: > There is example in: > http://wiki.bestpractical.com/view/CodeSnippets > > On Thu, May 21, 2009 at 10:11 PM, Ruslan Zakirov > wrote: > >> As group may have another group as meber as well as user, so records >> in GroupMembers and CachedGroupMembers objects reference Principals. >> >> If you are looking for users only that are members of a group then >> it's easier to do the following: >> >> my $group = ... >> $group->Load... >> >> my $users = $group->UserMembersObj; >> while ( my $user = $users->Next ) { >> ... >> } >> >> On Thu, May 21, 2009 at 9:46 PM, Johnathan Bell >> wrote: >> >>> Please let me know if this is supposed to go to RT-Users or RT-Devel. >>> >>> I'm trying to write a utility to interface with Request Tracker, and >>> part of what that utility has to do is get the members of some user >>> created groups. Just sub in actual groups for what you want in there, >>> CurrentUser works and is already initialized by the time my program gets >>> here. Mostly borrowing this code from the old rtimportldap script, I >>> came up with this: >>> >>> --code-- >>># RT Group >>>$groupObj = new RT::Group($CurrentUser); >>>$groupObj->LoadUserDefinedGroup($groupName); >>>$groupObj->Id() || die "Group ".$groupName." not found in >>> RequestTracker"; >>> >>>$groupMembersObj = $groupObj->MembersObj(); >>>print $groupObj->Id().":".$groupObj.":".$groupMembersObj.":" >>>.$groupMembersObj->Next()->UserObj()."\n"; ## This creates an error >>>while ( $groupMember = $groupMembersObj->Next() ) >>>{ >>>$groupMemberUser = $groupMember->UserObj(); >>>print $groupMemberUser->Name()."\n"; ## This does too >>>#$memberName = $groupMemberUser->Name(); >>>#push(@rtMembers, $memberName); >>>} >>> --/code-- >>> >>> What it seems is that GroupObj->MembersObj()->Next()->UserObj() causes >>> the problem, as UserObj() returns, not a UserObject, but a string >>> stating "No object mapping for field" Attempting to use the Name() >>> function of course doesn't work because "No object..."->Name() doesn't >>> make sense... What's going on? >>> >>> Thanks, >>> Johnathan >>> >>> -- >>> Johnathan Bell >>> Internet System Administrator, Baker College >>> >>> ___ >>> http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users >>> >>> Community help: http://wiki.bestpractical.com >>> Commercial support: sa...@bestpractical.com >>> >>> >>> Discover RT's hidden secrets with RT Essentials from O'Reilly Media. >>> Buy a copy at http://rtbook.bestpractical.com >>> >>> >> >> -- >> Best regards, Ruslan. >> >> > > > > -- Johnathan Bell Internet System Administrator, Baker College -- Johnathan Bell 810.766.4097 Office Hours: 7A-4P, M-F Internet System Administrator, Baker College ___ http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users Community help: http://wiki.bestpractical.com Commercial support: sa...@bestpractical.com Discover RT's hidden secrets with RT Essentials from O'Reilly Media. Buy a copy at http://rtbook.bestpractical.com
Re: [rt-users] Can Simple.html search Email OR Content (not AND) ?
On Thu, May 21, 2009 at 11:41:50AM -0700, allen+rtl...@crystalfontz.com wrote: > > This known issue that if email is not in the db then result would be > > empty even if condition is ORed with another, but believe me correct > > query will kick breath out of your DB server. > > > > Are you saying that this "known issue" is a bug or is it intentional? > > I know that with a ton of tickets, this kind of "search everything" is > not practical. But this will be a new RT deployment and I need to ease > the support staff (and the boss) into getting used to this new system. > Eventually I know they will find the QueryBuilder screen to be very > precise and great, but right now everything is new and different and > that screen scares them. They think it's too complicated. > > That's why I'd like to get the "WHERE EmailAddress like '%foo%' OR > 'Content like '%foo%' OR'd together instead of having the EmailAddress > separated from the rest of the query by an "AND." > > Thanks, > > A. Allen, This will result in every search being a full scan of the database looking for a match in the content. This will cripple your system for all but the smallest of databases. If you really intend to search in the content, please choose and use a database backend that supports full-text indexing. I know that the wiki has recipes for Oracle and PostgreSQL. Cheers, Ken ___ http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users Community help: http://wiki.bestpractical.com Commercial support: sa...@bestpractical.com Discover RT's hidden secrets with RT Essentials from O'Reilly Media. Buy a copy at http://rtbook.bestpractical.com
Re: [rt-users] "No object mapping for field" when referencing the UserObject of a MembersObject...
You need a user object loaded that represents actor - a user who changing things. GetCurrentUser function is for command line tools that can be executed by many users on your system, like bin/rt tool. If you don't need mulit-user script then you can use $RT::SystemUser. Each object you construct using ->new call needs the current user provided as the only argument of the method. In the script below you messing two concepts. You're trying to add user X as member into a group acting under user X's credentials. If user X has no rights to modify membership of the group X then he obviously gets "permissions denied" error. On Thu, May 21, 2009 at 11:11 PM, Johnathan Bell wrote: > Thanks... But another snippet on that page is now giving me trouble... > > --code-- > my $currentUser = GetCurrentUser(); > $currentUser->Load("tester97"); > my ($status, $msg) = $groupObj->AddMember($currentUser->id()); > die $msg unless $status; > exit(0); > --/code-- > > That code dies stating "Permission Denied"... do I need to authenticate > as root first? The perldoc on CurrentUser_Overlay.pm is a bit to obscure > for me and an example would really help. > > Thanks again, > Johnathan > > Ruslan Zakirov wrote: >> There is example in: >> http://wiki.bestpractical.com/view/CodeSnippets >> >> On Thu, May 21, 2009 at 10:11 PM, Ruslan Zakirov >> wrote: >> >>> As group may have another group as meber as well as user, so records >>> in GroupMembers and CachedGroupMembers objects reference Principals. >>> >>> If you are looking for users only that are members of a group then >>> it's easier to do the following: >>> >>> my $group = ... >>> $group->Load... >>> >>> my $users = $group->UserMembersObj; >>> while ( my $user = $users->Next ) { >>> ... >>> } >>> >>> On Thu, May 21, 2009 at 9:46 PM, Johnathan Bell >>> wrote: >>> Please let me know if this is supposed to go to RT-Users or RT-Devel. I'm trying to write a utility to interface with Request Tracker, and part of what that utility has to do is get the members of some user created groups. Just sub in actual groups for what you want in there, CurrentUser works and is already initialized by the time my program gets here. Mostly borrowing this code from the old rtimportldap script, I came up with this: --code-- # RT Group $groupObj = new RT::Group($CurrentUser); $groupObj->LoadUserDefinedGroup($groupName); $groupObj->Id() || die "Group ".$groupName." not found in RequestTracker"; $groupMembersObj = $groupObj->MembersObj(); print $groupObj->Id().":".$groupObj.":".$groupMembersObj.":" .$groupMembersObj->Next()->UserObj()."\n"; ## This creates an error while ( $groupMember = $groupMembersObj->Next() ) { $groupMemberUser = $groupMember->UserObj(); print $groupMemberUser->Name()."\n"; ## This does too #$memberName = $groupMemberUser->Name(); #push(@rtMembers, $memberName); } --/code-- What it seems is that GroupObj->MembersObj()->Next()->UserObj() causes the problem, as UserObj() returns, not a UserObject, but a string stating "No object mapping for field" Attempting to use the Name() function of course doesn't work because "No object..."->Name() doesn't make sense... What's going on? Thanks, Johnathan -- Johnathan Bell Internet System Administrator, Baker College ___ http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users Community help: http://wiki.bestpractical.com Commercial support: sa...@bestpractical.com Discover RT's hidden secrets with RT Essentials from O'Reilly Media. Buy a copy at http://rtbook.bestpractical.com >>> >>> -- >>> Best regards, Ruslan. >>> >>> >> >> >> >> > > -- > Johnathan Bell > Internet System Administrator, Baker College > > > > > -- > Johnathan Bell > 810.766.4097 > > Office Hours: 7A-4P, M-F > Internet System Administrator, Baker College > > ___ > http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users > > Community help: http://wiki.bestpractical.com > Commercial support: sa...@bestpractical.com > > > Discover RT's hidden secrets with RT Essentials from O'Reilly Media. > Buy a copy at http://rtbook.bestpractical.com > -- Best regards, Ruslan. ___ http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users Community help: http://wiki.bestpractical.com Commercial support: sa...@bestpractical.com Discover RT's hidden secrets with RT Essentials from O'Reilly Media. Buy a copy at http://rtbook.bestpractical.com
Re: [rt-users] Desperately need help identifying Email CC object
my @user_ids; my $users = $ticket->Cc->UserMembersObj; while ( my $user = $users->Next ) { push @user_ids, $user->id; } On Thu, May 21, 2009 at 10:50 PM, Ken Crocker wrote: > List, > > I've copied the code that RT uses to get the Email address of CC's > and add them as ticket watchers. When I HARD-CODE the Emaill address, it > works fine. The ticket has several CC Watchers. However, I'm having > trouble getting the actual CC Address ID's from the incoming Email. In > my code, I try to identify them with: > > my @AddrObj = {$ticket->CcAddresses->id}; > > That didn't work. Then I tried: > > my @AddrObj = [%{$ticket->CcAddresses}]; > > that didn't work either. The object I try to evaluate is empty. What > am I missing? Can anyone share with me how I can capture those email > address objects so I can evaluate them and then add them to the Ticket > CC? Your help on this will be greatly appreciated. Thanks. > > > Kenn > LBNL > ___ > http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users > > Community help: http://wiki.bestpractical.com > Commercial support: sa...@bestpractical.com > > > Discover RT's hidden secrets with RT Essentials from O'Reilly Media. > Buy a copy at http://rtbook.bestpractical.com > -- Best regards, Ruslan. ___ http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users Community help: http://wiki.bestpractical.com Commercial support: sa...@bestpractical.com Discover RT's hidden secrets with RT Essentials from O'Reilly Media. Buy a copy at http://rtbook.bestpractical.com
Re: [rt-users] Desperately need help identifying Email CC object
Ruslan, Thanks. I'm not sure where to put this in my code, but I'll pass it on to my perl guy and I'm sure we'll get this going. Thanks again. Kenn LBNL On 5/21/2009 12:49 PM, Ruslan Zakirov wrote: my @user_ids; my $users = $ticket->Cc->UserMembersObj; while ( my $user = $users->Next ) { push @user_ids, $user->id; } On Thu, May 21, 2009 at 10:50 PM, Ken Crocker wrote: List, I've copied the code that RT uses to get the Email address of CC's and add them as ticket watchers. When I HARD-CODE the Emaill address, it works fine. The ticket has several CC Watchers. However, I'm having trouble getting the actual CC Address ID's from the incoming Email. In my code, I try to identify them with: my @AddrObj = {$ticket->CcAddresses->id}; That didn't work. Then I tried: my @AddrObj = [%{$ticket->CcAddresses}]; that didn't work either. The object I try to evaluate is empty. What am I missing? Can anyone share with me how I can capture those email address objects so I can evaluate them and then add them to the Ticket CC? Your help on this will be greatly appreciated. Thanks. Kenn LBNL ___ http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users Community help: http://wiki.bestpractical.com Commercial support: sa...@bestpractical.com Discover RT's hidden secrets with RT Essentials from O'Reilly Media. Buy a copy at http://rtbook.bestpractical.com ___ http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users Community help: http://wiki.bestpractical.com Commercial support: sa...@bestpractical.com Discover RT's hidden secrets with RT Essentials from O'Reilly Media. Buy a copy at http://rtbook.bestpractical.com
Re: [rt-users] Desperately need help identifying Email CC object
Ruslan, I turned on the log for my test and when I sent an email to the Queue, this was the resulting message for my scrip: [Thu May 21 20:16:51 2009] [error]: Scrip 50645 Commit failed: RT::Ticket::Attachments Unimplemented in RT::Action::UserDefined. ((eval 461) line 6). I've not seen that response before. By Unimplemented, does it mean I have set up something? The code I put in was in the Cleanup area and ended with a return 1; as usual. Any clues? Thanks. Kenn LBNL On 5/21/2009 12:49 PM, Ruslan Zakirov wrote: my @user_ids; my $users = $ticket->Cc->UserMembersObj; while ( my $user = $users->Next ) { push @user_ids, $user->id; } On Thu, May 21, 2009 at 10:50 PM, Ken Crocker wrote: List, I've copied the code that RT uses to get the Email address of CC's and add them as ticket watchers. When I HARD-CODE the Emaill address, it works fine. The ticket has several CC Watchers. However, I'm having trouble getting the actual CC Address ID's from the incoming Email. In my code, I try to identify them with: my @AddrObj = {$ticket->CcAddresses->id}; That didn't work. Then I tried: my @AddrObj = [%{$ticket->CcAddresses}]; that didn't work either. The object I try to evaluate is empty. What am I missing? Can anyone share with me how I can capture those email address objects so I can evaluate them and then add them to the Ticket CC? Your help on this will be greatly appreciated. Thanks. Kenn LBNL ___ http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users Community help: http://wiki.bestpractical.com Commercial support: sa...@bestpractical.com Discover RT's hidden secrets with RT Essentials from O'Reilly Media. Buy a copy at http://rtbook.bestpractical.com ___ http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users Community help: http://wiki.bestpractical.com Commercial support: sa...@bestpractical.com Discover RT's hidden secrets with RT Essentials from O'Reilly Media. Buy a copy at http://rtbook.bestpractical.com
Re: [rt-users] Desperately need help identifying Email CC object
There is no attachments on a ticket, but transactions that have attachments. http://wiki.bestpractical.com/view/AddAttachmentLinksToMail On Fri, May 22, 2009 at 12:23 AM, Ken Crocker wrote: > Ruslan, > > I turned on the log for my test and when I sent an email to the Queue, > this was the resulting message for my scrip: > > [Thu May 21 20:16:51 2009] [error]: Scrip 50645 Commit failed: > RT::Ticket::Attachments Unimplemented in RT::Action::UserDefined. ((eval > 461) line 6). > > I've not seen that response before. By Unimplemented, does it mean I > have set up something? The code I put in was in the Cleanup area and ended > with a return 1; as usual. Any clues? Thanks. > > > Kenn > LBNL > > On 5/21/2009 12:49 PM, Ruslan Zakirov wrote: > > my @user_ids; > my $users = $ticket->Cc->UserMembersObj; > while ( my $user = $users->Next ) { > push @user_ids, $user->id; > } > > On Thu, May 21, 2009 at 10:50 PM, Ken Crocker wrote: > > > List, > > I've copied the code that RT uses to get the Email address of CC's > and add them as ticket watchers. When I HARD-CODE the Emaill address, it > works fine. The ticket has several CC Watchers. However, I'm having > trouble getting the actual CC Address ID's from the incoming Email. In > my code, I try to identify them with: > > my @AddrObj = {$ticket->CcAddresses->id}; > > That didn't work. Then I tried: > > my @AddrObj = [%{$ticket->CcAddresses}]; > > that didn't work either. The object I try to evaluate is empty. What > am I missing? Can anyone share with me how I can capture those email > address objects so I can evaluate them and then add them to the Ticket > CC? Your help on this will be greatly appreciated. Thanks. > > > Kenn > LBNL > ___ > http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users > > Community help: http://wiki.bestpractical.com > Commercial support: sa...@bestpractical.com > > > Discover RT's hidden secrets with RT Essentials from O'Reilly Media. > Buy a copy at http://rtbook.bestpractical.com > > > > -- Best regards, Ruslan. ___ http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users Community help: http://wiki.bestpractical.com Commercial support: sa...@bestpractical.com Discover RT's hidden secrets with RT Essentials from O'Reilly Media. Buy a copy at http://rtbook.bestpractical.com
[rt-users] question about pointer to info for upgrade/conversion of RT
Hi all I have my db converted from postgresql to mysql after a bit of trouble and inserted into a new 3.8 install, getting an error trying to change my "rt at a glance" preferences: Internal Error: Couldn't execute the query 'INSERT INTO Attributes (ContentType, Creator, ObjectId, LastUpdatedBy, Created, Content, Name, Description, LastUpdated, ObjectType) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)'Duplicate entry '0' for key 1 removed all saved items in the Attributes table (had 6) and get the same error. I think this may just be a db schema issue, but not 100% sure. This was my original question, but the mail bounced, if anyone has experience with the below question, I'd appreciate any pointers. I'd like to move from postgresql to mysql and upgrade from 3.4.4 to at least 3.8.2. Does anyone have any experience with a change like this? Docs, How-to's? Tips on DB conversion? I have seen the upgrade notes to go from older mysql to newer mysql but none about converting DB dists specifically to an RT install/upgrade. Currently: PostgreSQL version 7.4.12 Ubuntu dapper Linux rt-support 2.6.15-26-386 #1 PREEMPT Thu Aug 3 02:52:00 UTC 2006 i686 GNU/Linux RT 3.4.4 Want to be: MySQL version 5.0.51 Ubuntu hardy Linux rt-lab 2.6.24-19-server #1 SMP Wed Aug 20 23:54:28 UTC 2008 i686 GNU/Linux RT 3.8.2 Thanks, -TM -- Thanks, -TM "Ravioli is the square root of pasta." - Max K., Age 11 ___ http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users Community help: http://wiki.bestpractical.com Commercial support: sa...@bestpractical.com Discover RT's hidden secrets with RT Essentials from O'Reilly Media. Buy a copy at http://rtbook.bestpractical.com