3.2 vs 3.0.11 syntax for SelectOwner

On 3.0.11 in Update.html, I have:

<& /Elements/SelectOwner, Name=>“Owner”, Default =>
(($TicketObj->OwnerObj->Id =
= $RT::Nobody->Id() && $TicketObj->CurrentUserHasRight(‘OwnTicket’)) &&
$session
{‘CurrentUser’}->Id || $TicketObj->OwnerObj->Id()),
QueueObj => $TicketObj->QueueObj, TicketObj => $TicketObj &>

I noticed the syntax in 3.2 is different:

<& /Elements/SelectOwner, Name=>“Owner”, DefaultLabel => loc("[_1]
(Unchanged)",
$TicketObj->OwnerObj->Name()), QueueObj => $TicketObj->QueueObj, TicketObj
=> $
TicketObj &>

My mind must be on the fritz - I’m not sure how to integrate my changes into
3.2.

ps. My change checked if the owner was Nobody then the person updating the
ticket became ticket owner.

matthew zeier, Sr. Network Engineer | “Nothing in life is to be feared.
InteleNet Communications, Inc. | It is only to be understood.”
(949) 784-7904 | - Marie Curie

On 3.0.11 in Update.html, I have:
[snip]
RT 3.2 just added a DefaultLabel parameter that overrides the “-” that
was previously shown in RT 3.0 when the default option was selected.
Just add the “Default => …” option that you had in RT 3.0, and you
should be good to go.

Alex, you lost me - what would the full syntax look like? Replace
DefaultLable with the whole clause starting with Default ?

rt 3.2:
<& /Elements/SelectOwner, Name=>“Owner”, DefaultLabel => loc("[_1]
(Unchanged)",
$TicketObj->OwnerObj->Name()), QueueObj => $TicketObj->QueueObj, TicketObj
=> $
TicketObj &>

rt 3.0.11:

<& /Elements/SelectOwner, Name=>“Owner”, Default =>
(($TicketObj->OwnerObj->Id =
= $RT::Nobody->Id() && $TicketObj->CurrentUserHasRight(‘OwnTicket’)) &&
$session
{‘CurrentUser’}->Id || $TicketObj->OwnerObj->Id()), QueueObj =>
$TicketObj->Queu
eObj, TicketObj => $TicketObj &>

Alex, you lost me - what would the full syntax look like? Replace
DefaultLable with the whole clause starting with Default ?

You’re not replacing anything, just adding a Default parameter:

<& /Elements/SelectOwner,
Name=>“Owner”,
DefaultLabel => loc("[_1] (Unchanged)", $TicketObj->OwnerObj->Name()),
QueueObj => $TicketObj->QueueObj,
TicketObj => $TicketObj,
Default => (($TicketObj->OwnerObj->Id == $RT::Nobody->Id() &&
$TicketObj->CurrentUserHasRight(‘OwnTicket’)) &&
$session{‘CurrentUser’}->Id || $TicketObj->OwnerObj->Id())
&>

  • Alex

Networking – one letter away from not working