Dashboard Column Default Order

Moderator: crythias

Post Reply
mducharme
Znuny newbie
Posts: 8
Joined: 14 Jul 2010, 18:00
Znuny Version: 2.4.7

Dashboard Column Default Order

Post by mducharme »

Hi,

Since going up to OTRS 3.3, we are now able to set the default columns shown on the dashboard by going into SysConfig and setting DefaultColumns for those dashboard widgets to "2" for the desired columns.

However, the columns by default display in alphabetical order. This makes very little sense since then we see "Age" on the left followed by "Customer ID" followed by "Customer Name" followed by "Queue" followed by "Ticket Number" followed by "Title".

I know that people can change the column order on their own, but how can I change the default order for those columns?

Thanks.
schaffel
Znuny newbie
Posts: 90
Joined: 20 May 2008, 12:50
Znuny Version: 3.1.X
Real Name: Felix
Company: SyroCon Consulting GmbH
Location: Darmstadt

Re: Dashboard Column Default Order

Post by schaffel »

I have exactly the same Question.
In our old otrs I used a customized theme to add extra columns.
I thought it was good new that the columns could be customized, but alphabetical order makes absolutely no sense.

I have a second question: Is it possible for an admin to reset the customization an agent has set?
If these two feature are not provided in any kind I have to fall back to a fixed layout that our agents don't mess the whole thing up.

I would appreciate any cheet or hack that enables these 'options'.

Thanks
production: OTRS 5.0.X | OTRS:ITSM 5.0.X | AWS-RDS MariaDB 10.1.X | CentOS 7

Gibt es im Raum Frankfurt/Darmstadt OTRS/ITSM-Benutzer, die an einem Erfahrungsaustausch interessiert sind? Dann meldet euch um mit Gleichgesinnten über OTRS in der Praxis und den ganzen Rest zu reden.
yuri0001
Znuny superhero
Posts: 631
Joined: 17 Mar 2011, 14:40
Znuny Version: 5.0.6
Real Name: Yuri Kolesnikov
Location: Russia

Re: Dashboard Column Default Order

Post by yuri0001 »

mducharme wrote:Hi,

Since going up to OTRS 3.3, we are now able to set the default columns shown on the dashboard by going into SysConfig and setting DefaultColumns for those dashboard widgets to "2" for the desired columns.

However, the columns by default display in alphabetical order. This makes very little sense since then we see "Age" on the left followed by "Customer ID" followed by "Customer Name" followed by "Queue" followed by "Ticket Number" followed by "Title".

I know that people can change the column order on their own, but how can I change the default order for those columns?

Thanks.
Hi!
You can change the order drugging the column name in table of visible columns and placing it in position you need. This operation you can do in Dashboard for each widget.
Best regards Yuri Kolesnikov
OTRS 5.0.14, ITSM 5.0.14
SUSE 13.2, MariaDB 10.0.22(productive)
OTRS 5.0.14, ITSM 5.0.14(test)
yuri0001
Znuny superhero
Posts: 631
Joined: 17 Mar 2011, 14:40
Znuny Version: 5.0.6
Real Name: Yuri Kolesnikov
Location: Russia

Re: Dashboard Column Default Order

Post by yuri0001 »

schaffel wrote:I have exactly the same Question.
I have a second question: Is it possible for an admin to reset the customization an agent has set?
If these two feature are not provided in any kind I have to fall back to a fixed layout that our agents don't mess the whole thing up.

I would appreciate any cheet or hack that enables these 'options'.

Thanks
I have no access to my system now to check my idea, but try to see at Module Registration parameters for Dashboard in SysConfig. Many of them have a group attribute where you can set a list of groups that can access to this feature.
Sorry my bad English :?
UPDATE. That was wrong idea :( There now way to disable it in SysConfig, only you can restrict access for some groups for entire widget.
Best regards Yuri Kolesnikov
OTRS 5.0.14, ITSM 5.0.14
SUSE 13.2, MariaDB 10.0.22(productive)
OTRS 5.0.14, ITSM 5.0.14(test)
balazj
Znuny newbie
Posts: 2
Joined: 19 Dec 2013, 12:40
Znuny Version: 4.0.6
Real Name: Jaroslav Balaž
Company: Muehlbauer AG

Re: Dashboard Column Default Order

Post by balazj »

Actually I found way to make default column order. One solution is to make new user, order columns as you wish, and then
add few lines in /Kernel/System/User.pm. Inside User.pm find UserAdd method. Before final return, add following code:

# Get default preferences from agent 'default' whos UserID is '6'
my %Data=$Self->GetPreferences( UserID => 6 );

# Get TicketNewColumns Order for that user
my $TicketNewColumns=$Data{'UserDashboardPref0120-TicketNew-Columns'};
# Set for new user
$Self->SetPreferences( UserID => $UserID, Key => 'UserDashboardPref0120-TicketNew-Columns', Value => $TicketNewColumns );

Just make sure UsedID is right one(new user that you made before).
Same thing needs to be done with Open Tickets, Escalated tickets (just add additional lines).
After any change in this file, u should restart otrs service: /etc/init.d/otrs restart
Now when You create new user, default order will be applied. If You change order of columns for user that You created, it will
be applied for all users that will be created. Same can be done for existing users, but this should give You idea.
KhaledBlah
Znuny newbie
Posts: 34
Joined: 14 Mar 2011, 12:57
Znuny Version: 3

Re: Dashboard Column Default Order

Post by KhaledBlah »

Thanks for your explanation balazj. I am looking for the same thing but I'd like to do the re-ordering system wide so that I don't have to deal with changing the settings on a per user basis. Plus, if one user decides to make changes to their settings and I then decide to make another change that is meant to propagate system-wide I will inevitabely override some users' settings. So if someone has a solution that is applied system-wide without messing with users' settings please let us know here.
OTRS 3.3.8
schaffel
Znuny newbie
Posts: 90
Joined: 20 May 2008, 12:50
Znuny Version: 3.1.X
Real Name: Felix
Company: SyroCon Consulting GmbH
Location: Darmstadt

Re: Dashboard Column Default Order

Post by schaffel »

For upgrading the OTRS of my company I had to set the defaults for the existing users too.
So i created the following SQL to insert the default behavior into the table user_preferences:

Code: Select all

insert user_preferences (user_id, preferences_key, preferences_value)
select * 
from (
	select target.user_id
		from user_preferences target
		where target.user_id not in ( '6' )
		group by target.user_id
	) as id_list, 
	( 
	select defaults.preferences_key, defaults.preferences_value
		from user_preferences defaults
		where defaults.user_id = '6'
		and defaults.preferences_key in (	'UserDashboardPref0100-TicketPendingReminder-Columns',
									'UserDashboardPref0110-TicketEscalation-Columns',
									'UserDashboardPref0120-TicketNew-Columns',
									'UserDashboardPref0130-TicketOpen-Columns',
									'UserDashboardPref0900-TicketMaster-Columns',
									'UserDashboardPref0910-TicketSlave-Columns')
        ) as key_value_list
;
You have to replace the number '6' with the user_id of the reference user, that has the dashboard columns configured as wanted.
This dashboard columns configuration is copied to all the other users.
If you don't use the MasterSlave-package just delete the two last preferences-keys.

In addition to the script modification, every agent has a default set of columns in the right order.

Is there a possibility to disable the configuration of the queues for users?
production: OTRS 5.0.X | OTRS:ITSM 5.0.X | AWS-RDS MariaDB 10.1.X | CentOS 7

Gibt es im Raum Frankfurt/Darmstadt OTRS/ITSM-Benutzer, die an einem Erfahrungsaustausch interessiert sind? Dann meldet euch um mit Gleichgesinnten über OTRS in der Praxis und den ganzen Rest zu reden.
KhaledBlah
Znuny newbie
Posts: 34
Joined: 14 Mar 2011, 12:57
Znuny Version: 3

Re: Dashboard Column Default Order

Post by KhaledBlah »

I've added an "idea" to make the column order configurable. Please support the idea if you agree:
https://otrsteam.ideascale.com/a/dtd/OT ... 3383-10369
OTRS 3.3.8
Post Reply