Hi Jurgen,

great that you managed to write your of generic agent module.
After knowing how it works, you are able to customize OTRS to your very special needs, never thought before of being able to realize this. I think OTRS is really great.

I have only one problem left. I have also copied a piece of code from the NotifyAgentGroupofCustomQueue module to send a "followup" notification to all agents that are subscribed to the queue the unlocked ticket is in.

When I run the generic agent I get the following error message in the web-browser window:

Software error:
Can't call method "GetUserData" on an undefined value at
../..//Kernel/System/GenericAgent/UnlockAfterFollowup.pm line 110.

Why line 110 - this is an empty line?


I am not sure what is going wrong here. Can you give me a tip?

I don't know perl quite well, but let me try:

The problem can only be in

        # send each agent the unlock notification
        foreach (@UserIDs) {
## I think it works, but I would prefer
##      foreach $UserID (@UserIDs)
## and use $UserID instead of $_ in the following lines
                
                $Self->{LogObject}->Log(
                        Priority => 'notice',
                        Message => "UserID = $_",
                        );
## does the logging give you the correct data

## I think UserObject is not initialized
## ====> you have to add it in qw(...) in line 23
                my %User = $Self->{UserObject}->GetUserData(UserID => $_);

                # send agent notification
                $Self->{TicketObject}->SendAgentNotification(
                        Type => 'FollowUp',
                        UserData => \%User,
## I don't know what has to be set on CustomerMessageParams
## Is it really \%Param?
                        CustomerMessageParams => \%Param,
                        TicketID => $Ticket{TicketID},
                        UserID => 1,
                );

        };


Many thanks for your help so far.

Regards,
Jurgen

Let me know when you generate further modules for OTRS.

Bye, Alex
_______________________________________________
OTRS mailing list: otrs - Webpage: http://otrs.org/
Archive: http://lists.otrs.org/pipermail/otrs
To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/otrs
Support oder Consulting für Ihr OTRS System?
=> http://www.otrs.de/

Reply via email to