Ticket refresh after adding attachment

Moderator: crythias

Locked
SantaPe
Znuny newbie
Posts: 53
Joined: 13 Mar 2013, 18:02
Znuny Version: 3.2.2

Ticket refresh after adding attachment

Post by SantaPe »

Hello,

Is there someone with the same problem?

When customers fill in their ticket and add an attachment, the browser refreshes and clears the fields of title and ticket body text..
OTRS 3.2 - Windows Server 2008R2 - mysql
Jonasv
Znuny advanced
Posts: 102
Joined: 17 Apr 2013, 08:47
Znuny Version: 3.2.0

Re: Ticket refresh after adding attachment

Post by Jonasv »

have you tried using a different browser?
SantaPe
Znuny newbie
Posts: 53
Joined: 13 Mar 2013, 18:02
Znuny Version: 3.2.2

Re: Ticket refresh after adding attachment

Post by SantaPe »

The problem occurs in Chrome, Firefox and Internet Explorer
OTRS 3.2 - Windows Server 2008R2 - mysql
Jonasv
Znuny advanced
Posts: 102
Joined: 17 Apr 2013, 08:47
Znuny Version: 3.2.0

Re: Ticket refresh after adding attachment

Post by Jonasv »

At the e-mail and telephone ticket?
have you changed anything in the sysconfig or is it always like that?
SantaPe
Znuny newbie
Posts: 53
Joined: 13 Mar 2013, 18:02
Znuny Version: 3.2.2

Re: Ticket refresh after adding attachment

Post by SantaPe »

It's only in the customer frontend.

I did add some Javascript to CustomerTicketMessage.dtl to hide a dynamicField when a certian queue is selected.
OTRS 3.2 - Windows Server 2008R2 - mysql
Jonasv
Znuny advanced
Posts: 102
Joined: 17 Apr 2013, 08:47
Znuny Version: 3.2.0

Re: Ticket refresh after adding attachment

Post by Jonasv »

I think that could be the problem ...
pituca
Znuny advanced
Posts: 131
Joined: 09 Jan 2013, 02:50
Znuny Version: 5.0.9
Company: OmniRedes

Re: Ticket refresh after adding attachment

Post by pituca »

Hi SantaPe,

For hiding the dynamic field you should add the proper ACL configuration in config.pm. Try to restore you previous configuration and take a look at the admin manual, you will find configuration samples of how to use ACL to restrict the fields you want using "Display" variable.

Hope this help.
OTRS 5.0.9, , ITSM 5.0.9, MySQL, Ubuntu 14.04, Apache2
SantaPe
Znuny newbie
Posts: 53
Joined: 13 Mar 2013, 18:02
Znuny Version: 3.2.2

Re: Ticket refresh after adding attachment

Post by SantaPe »

i don't think there is a 'display' variable.


It seems I can only use ACL to determine how my dynamicField is filled (in this case a dropdownlist); but I can work with this solution as well.

For example, when support queue is chose only the category Hardware is shown in the dropdownlist:

Code: Select all

# ticket acl
#$Self->{TicketAcl}->{'categorieACL'} = {
 #   # match properties
  #  Properties => {
        # current ticket match properties
   #     Ticket => {
    #        Queue => ['IT::SUPPORT'],
      
     #  }
    #},
    # return possible options (white list)
   #Possible => {
        # possible ticket options (white list)
    #    Ticket => {
     #      DynamicField_itSupportCat1 => ['Hardware'],
      #},
 #},
#};
Only... it doesn't work. :( :(
OTRS 3.2 - Windows Server 2008R2 - mysql
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Ticket refresh after adding attachment

Post by crythias »

what you posted is completely commented.
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
SantaPe
Znuny newbie
Posts: 53
Joined: 13 Mar 2013, 18:02
Znuny Version: 3.2.2

Re: Ticket refresh after adding attachment

Post by SantaPe »

:lol: :lol: :lol:

I know crytias... Good one :]


Even when the comment tags are gone, the code doesn't work.
OTRS 3.2 - Windows Server 2008R2 - mysql
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Ticket refresh after adding attachment

Post by crythias »

SantaPe wrote:When customers fill in their ticket and add an attachment, the browser refreshes and clears the fields of title and ticket body text..
SantaPe wrote:I did add some Javascript to CustomerTicketMessage.dtl to hide a dynamicField when a certian queue is selected.
This shouldn't have affected the body unless the JavaScript affects the body.
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
SantaPe
Znuny newbie
Posts: 53
Joined: 13 Mar 2013, 18:02
Znuny Version: 3.2.2

Re: Ticket refresh after adding attachment

Post by SantaPe »

The refresh problem is caused by the javaScript. I would like to get rid of the javaScript actually and use the ACL's instead.

I'm only having trouble with choosing the options in the dropdownlist of that dynamicField.
OTRS 3.2 - Windows Server 2008R2 - mysql
SantaPe
Znuny newbie
Posts: 53
Joined: 13 Mar 2013, 18:02
Znuny Version: 3.2.2

Re: Ticket refresh after adding attachment

Post by SantaPe »

I still haven't succeeded in using ACL's.

Last night I tried the following:

Code: Select all

$Self->{TicketAcl}->{'ACL-cat'} = {
    Properties => {
        Ticket => {
            Queue => ['Support'],
        }
    },
   
    Possible => {
        Ticket => {
            DynamicField_SupportCat1  => ['hardware','software','password reset','printer','information'],
        },
    },
};
And it did not work. If I changed the restrict the priority to two options, it worked. But it only worked once. Afterwards I tried it with the dynamicField and when that failed I put back the code of the priority and it didn't work anymore.

After I change settings in the Config.pm file do I need to restart OTRS? Do I have to wait a while? Are changes immediately effective?

Also, I was inspecting the examples on the documentation site: http://doc.otrs.org/3.2/en/html/customization.html
And I noticed the comma's aren't used consequently.. I don't know if it's a syntax error or not. Check the first example. Where do I need to use the comma's?
OTRS 3.2 - Windows Server 2008R2 - mysql
Locked