Accessing QueueObject in AgentTicketzoom.pm

English! place to talk about development, programming and coding
Post Reply
rosen
Znuny newbie
Posts: 3
Joined: 04 Jun 2014, 14:21
Znuny Version: 3.3.7

Accessing QueueObject in AgentTicketzoom.pm

Post by rosen »

Hello ,

We would like to use the comment field of a queue to display the current support status (from a business point of view). My idea is to display the "Comment" of a given Queue into the "ticket information widget" on AgentTicketzoom. But I am facing the problem, that I am not able to get any data out of QueueObject.


Could you please check and comment the code (see below)?

Thanks
rosen

Modificaton on perl modul

Code: Select all

       #...\OTRS\Kernel\Modules\AgentTicketZoom.pm
       # service status
	if ( 1 ) {
		my %QueueGet = { $Self->{QueueObject}->QueueGet( QueueID => $Ticket{QueueID} ) };
		my %data = ( Status => $QueueGet{Comment} || 'No data' );
		$Self->{LayoutObject}->Block(
            Name => 'Servicestatus',
            Data => { %data },
        );
    }
Modification on template

Code: Select all

#...\OTRS\Custom\Kernel\Output\HTML\Standard\AgentTicketZoom.dtl
<!-- dtl:block:Servicestatus -->

			<label>$Text{"Queue Support"}:</label>
                        <p class="Value" title="$QData{"Status"}">$QData{"Status"}</p>
                        <div class="Clear"></div>
						
<!-- dtl:block:Servicestatus -->


But the result is always "no data" (see attachement)

I already checkt the queue-ID and that there is a comment in)
You do not have the required permissions to view the files attached to this post.
rosen
Znuny newbie
Posts: 3
Joined: 04 Jun 2014, 14:21
Znuny Version: 3.3.7

Re: Accessing QueueObject in AgentTicketzoom.pm

Post by rosen »

No answer and no comment until now.
What might be the reason for this?

- Silly question?
- Hard question?
- Bad coding style?
-

I’m not familiar with Perl programming; nonetheless I have done programming for more than 25 year in various programming languages (incl. scripting). Therefore I should be able to understand even more sophisticated replies.

Thank you for any suggestion
Rosen
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Accessing QueueObject in AgentTicketzoom.pm

Post by crythias »

A ticket sitting in the queue doesn't necessarily mean that its status is the Queue's comment. That's what the state of the ticket is for. And, incidentally, it already displays so there's no additional work.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
rosen
Znuny newbie
Posts: 3
Joined: 04 Jun 2014, 14:21
Znuny Version: 3.3.7

Re: Accessing QueueObject in AgentTicketzoom.pm

Post by rosen »

Hi crythias,

thanks for your reply.

As far as I understood, you're thinking I am mixing the ticket status and the comment of its Queue. Right?
If so, than please excuse the confusion. I'm not a native English person and might have given a bad explanation of my idea.


What we want to do
Displaying the comment of the Queue where the Ticket has been created in.

Why we want to do this
Sometimes one customer belongs (have access) to different Queues, but these Queues might have different accounting information (different service status per Queue). We would like to record the accounting information using the comment of a Queue. On Ticketzoom, we need to display this comment, so that an agent can see the status of the service contract for the Queue were the ticket has been created in.

What is my problem
I do not get the value of the comment out of the QueueObject (please compare my code example). And because of my lack of experiences in programming with PERL, I do not have a good debugging strategy.

Thanks
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Accessing QueueObject in AgentTicketzoom.pm

Post by crythias »

cannot be done with stock otrs. Comment is for internal use.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Accessing QueueObject in AgentTicketzoom.pm

Post by crythias »

What you might want to do is use Dynamic Field + acl =
Properties = Queue = x
Possible = DynamicField_AccountingCode = xxxx
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
Post Reply