[rt-users] Return Requestor Organization information from Dashboard "Rt at a glance" page

Kevin Falcone falcone at bestpractical.com
Fri Sep 17 08:44:23 EDT 2010


On Thu, Sep 16, 2010 at 10:32:49PM +0200, Emmanuel Lacour wrote:
> If you are sure that there is always one requestor, then use
> Requestors->UserMembersObj->First->Organization.

As Emmanuel said, it looks like you don't actually have requestors on
your ticket.  You'll need to write code that checks along to way to
make sure there are requestors.  I bet the
MemberEmailAddressesAsString code would be an interesting place to
start.

-kevin


On Fri, Sep 17, 2010 at 05:21:02AM -0700, Shawn O'Connor wrote:
> Thanks for the reply back.  I had tried what you suggested previously, and I tried again per your instructions, but I'm met with the following error.  Either I'm calling it incorrectly or that isn't the right command.  See error below:
> 
> error:   	Can't call method "Organization" on an undefined value at /opt/rt3/share/html/Elements/RT__Ticket/ColumnMap line 176.
> context:  	
> ...  	
> 172:  	Requestors => {
> 173:  	title => 'Requestors', # loc
> 174:  	attribute => 'Requestor.EmailAddress',
> 175:  	#value => sub { return $_[0]->CreatorObj->Organization }
> 176:  	value => sub { return $_[0]->Requestors->UserMembersObj->First->Organization }
> 177:  	#value => sub { return $_[0]->Requestors->MemberEmailAddressesAsString }
> 178:  	},
> 179:  	Cc => {
> 180:  	title => 'Cc', # loc
> ...  	
> code stack:  	/opt/rt3/share/html/Elements/RT__Ticket/ColumnMap:176
> /opt/rt3/share/html/Elements/CollectionList:125
> /opt/rt3/share/html/Elements/ShowSearch:54
> /opt/rt3/share/html/Widgets/TitleBox:51
> /opt/rt3/share/html/Elements/ShowSearch:55
> /opt/rt3/share/html/Elements/MyRT:95
> /opt/rt3/share/html/index.html:86
> /opt/rt3/share/html/autohandler:311
> raw error
> 
> Thanks for your help!
> 
> 
>       
> 
> RT Training in Washington DC, USA on Oct 25 & 26 2010
> Last one this year -- Learn how to get the most out of RT!

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20100917/b013c231/attachment.sig>


More information about the rt-users mailing list