Personalize My Page default setup

Added by Michael Kling about 6 years ago

Anybody knows how to give to a lot of users the same "personalized Page"?

Most of them are not really experienced with the system and it would be much easier if they just all have the same page :)

Maybe somebody already made some script or sql query, if not i have to do it by myself.

Replies (8)

RE: Personalize My Page default setup - Added by Michael Kling about 6 years ago

Just to inform people who searched for that:

It is possible to do it "manually" with copying the :my_page_layout in the column user_preferences.othes into all the entries of the users you want to give that preferences to.

RE: Personalize My Page default setup - Added by Michael Kling about 6 years ago

Thanks for the link. Changing the start page is also an interesting topic but i was searching for way to provide the same configuration of widgets for this page http://www.redmine.org/my/page to a lot of users - so they dont have to configure it by themself.

i did that now, as already told, manually in the database. Next step would be the creation of a simple plugin which insert this configuration on user creation - but i dont have the time right now to do that.

i will keep you updated here.

RE: Personalize My Page default setup - Added by ping chen over 3 years ago

How did you manually change in the database to provide the same configuration of widgets for the user's of my page ?
Can you share this solution?
THX!

RE: Personalize My Page default setup - Added by ping chen over 3 years ago

Michael Kling wrote:

Yeah it's written here: http://www.redmine.org/boards/2/topics/27145?r=27355#message-27355

Dear Kling,
This url: http://www.redmine.org/boards/2/topics/27145?r=27355#message-27355 just is the page that you were look for helping to resolve,but you didn't show this solution in the page.

20140321090548.png (12.8 KB)

RE: Personalize My Page default setup - Added by Michael Kling over 3 years ago

Yeah unfortunatly the page didnt scroll to the anchored message, as it is the first reply.

I'm therefore going to quote it for you:

It is possible to do it "manually" with copying the :my_page_layout in the column user_preferences.othes into all the entries of the users you want to give that preferences to.

And extra for you i will go into more detail:
In your redmine database exists a table called "user_preferences", this table is keeping all user preferences. The releation to the user is done via the column user_id.

So seeing the related usernames can be done somehow like this:

SELECT users.login, user_preferences . *
FROM `user_preferences`
JOIN users ON user_id = users.id

Now this table (user_preferences) has a column "others"
This column contains a lot of different informations formatted in a strange "config file" formatted string. (I think its a ruby thing)
Example:

---
:my_page_layout:
left:
- scheduled_vs_spent_time
- timelog
right:
- questions_asked_by_me
- questions_for_me
- recent_assigned_to_changes_graph
- recent_status_changes_graph
- issuesreportedbyme
- issueswatched
top:
- my_schedule
- issuesassignedtome
:comments_sorting: asc
:no_self_notified: false
:warn_on_leaving_unsaved: "1"

Anyway through intentions and different syntax it is visible that it contains key value pairs which by themselves can have lists and groupings.
The key ":my_page_layout:" contains 3 categories: left:, right: and top: which by themselves contain a list of modules.
I concluded that this is the configuration for "My Page" screen. (and i was right as far as i could see)

Doing now the preferred configuration on one user account i could simply copy/paste the :my_page_layout content into the others column of all users.
You can do it by a script or manually (i did it manually as i didn't had that much users in the system) or even write a plugin which populates a default setting to new uses (if you do that please notify me, i'm interested in it).
Important is to keep all the other key value pairs in that cell, as it would destroy/reset the users preferences and users don't like that.

RE: Personalize My Page default setup - Added by ping chen over 3 years ago

Thank you very much!

I have been checked the table: user_preferences, when the first time I read your topics in this page. But I didn't checked very carefully,I am sorry.

I think I will do it by a scipt to update the :my_page_layout content in the table:user_preferences.
I am poor at Ruby to write the plugin,But I can try to do it. If I will have done it,i will update in this page.

(1-8/8)