User specific data items

Post about your customizations to share with others.

Moderators: Developer, Contributor

Post Reply
Joselyne
Posts: 70
Joined: 14 Dec 2023, 15:59

User specific data items

Post by Joselyne »

Hello,

Suppose i have more than 100 users subscribed in Mantis.
How can do to automatically add their specific data items by the using the Userdata plugin?
It is very hard to add these data manually for each user.

Any idea?

Thanks.
cas
Posts: 1768
Joined: 11 Mar 2006, 16:08
Contact:

Re: User specific data items

Post by cas »

Ha, good question.
How many Userdata fields do you have?
Think I can create a tiny program that inserts the data from a csv file.
You would need to fill the csv file with :
Username
followed by a value for each field you created (in the correct sequence)
All fields separatwed by a comma.
Joselyne
Posts: 70
Joined: 14 Dec 2023, 15:59

Re: User specific data items

Post by Joselyne »

Thank you for your quick response.
I need three or four extra fields data since i have already username, realname and email.
So I need 'telephone', 'gsm', ans 'service'.

Thanks.
cas
Posts: 1768
Joined: 11 Mar 2006, 16:08
Contact:

Re: User specific data items

Post by cas »

You can download a new version (2.30) here:
https://github.com/mantisbt-plugins/Userdata

My testing showed it worked but was done on a small subset (so do backup database before uploading all). :mrgreen:
Joselyne
Posts: 70
Joined: 14 Dec 2023, 15:59

Re: User specific data items

Post by Joselyne »

Hello,

Thanks for the updated plugin.
I would like to know how the match is done between the imported username and the username that already exist in Mantis.
Suppose i Have a user :
Username : Username
Name : Name

If i want to add his phone number, I define the same username and the phone number in the csv file. So how the much is done?
I hope my question is clear.

Thanks.
cas
Posts: 1768
Joined: 11 Mar 2006, 16:08
Contact:

Re: User specific data items

Post by cas »

Actually quite simple, I retrieve the user-id from the usertable with a simple query
Just make sure that the username is correctly spelled and ensure correct capitalization etcetera
Post Reply