[rt-users] weirdness in scrip
Ken Crocker
kfcrocker at lbl.gov
Fri Mar 13 15:42:36 EDT 2009
Jul-rt,
I had a similar problem when I set up a CF with certain group
rights. Only thoise in the group could modify it and that was fine. My
problem was that "within" the group, I didn't want the person who
"owned" the ticket to make the modification. Since the owner "could" be
in the group, I couldn't keep that person from making the modification.
So what I did was write a scrip that reversed the change if the change
was made by the owner of the ticket. IT's a bit messy, but I really
didn't know of any other way to do it. Hope this helps.
Kenn
LBNL
On 3/13/2009 11:58 AM, jul wrote:
> Hi,
>
> How do I return a Result when refusing a transaction so that user know
> what they did wrong (in my case, I just check that a customField is not
> null is selected Queue)
>
> Condition : OnResolve
> Action: User Defined
> Stage:Transaction Create.
>
>
> # Only do it for certain queues.
> my @queues = (5,6,7,8,9,10);
> my $queue_id = $self->TicketObj->Queue;
> my $val = grep { /^${queue_id}$/ } @queues;
> $RT::Logger->error("been here");
>
> if ($val) {
> my $CF = RT::CustomField->new( $RT::SystemUser );
> my $res=$self->TicketObj->FirstCustomFieldValue('Responsabilite');
> $RT::Logger->error("valjul::<" . $res . ">");
> $RT::Logger->error("ok::" . ($res ? 1 : 0) );
> $self->TicketObj->SetStatus("open");
> return $res ? 1 : undef;
> }
>
> return 1;
>
> It works well
>
> What is weired, is that clean and prepare action are always evaluated,
> never custom condition. So I play with it.
>
> My question is : is there a way to inform the user that he must fill the
> custom field in the result area ?
>
>
>
>
More information about the rt-users
mailing list