Page 1 of 1

Add selection list User Roles in adding users to a project

Posted: 19 Sep 2012, 03:56
by namhung1986
Image

I want to add one more selection list into adding users to a specific project procedure (like the image).
Please guide me how to do that. Thank you!

Re: Add selection list User Roles in adding users to a proje

Posted: 19 Sep 2012, 07:53
by namhung1986
hi, any one can help me plzzzzzzzz!

Re: Add selection list User Roles in adding users to a proje

Posted: 20 Sep 2012, 03:47
by namhung1986
atrol! Where are you? Help me plzzz!

Re: Add selection list User Roles in adding users to a proje

Posted: 20 Sep 2012, 07:28
by atrol
If you get no response means that
a) there is no one listening who is able to help you and/or
b) there is no one who has enough time to help you
You shouldn't exptect anything.

I have no idea what you mean with this selection list named "Role".
Which data stored in MantisBT should be listed?

Re: Add selection list User Roles in adding users to a proje

Posted: 20 Sep 2012, 08:16
by namhung1986
hi, plz be patient with me since this is the first time when I use mantis.
The "Roles" here can be Administrator, Manager, Team manager, QA, Developer, Viewer, Reporter.
It looks like "Access level" but my boss is asking me to create that.

I would like to know how to add it and how to display on html. Do I need to create "Roles" table in database?

Thank you a million!

Re: Add selection list User Roles in adding users to a proje

Posted: 20 Sep 2012, 11:38
by atrol
I recommend to change the existing access levels instead of introducing a new roles conecpt.
Have a lokk at http://www.mantisbt.org/docs/master-1.2 ... MIZE.ENUMS to see how it works.

Re: Add selection list User Roles in adding users to a proje

Posted: 24 Sep 2012, 06:42
by namhung1986
hi, my boss is persistently asking me to create "Role" like the description picture (please refer to the first post).
In fact, I tried to create a Role table in Mantis database, get data, but I could not display the data as a selection list on HTML.
Plzz help me!

Re: Add selection list User Roles in adding users to a proje

Posted: 24 Sep 2012, 07:10
by atrol
namhung1986 wrote:hi, my boss is persistently asking me to create "Role" like the description picture
So your boss wants "Access Level" and "Role"
I still have no idea for what purpose the role should be used.

Have a look at function print_user_option_list in html_api.php how to display option lists with user names.

Re: Add selection list User Roles in adding users to a proje

Posted: 24 Sep 2012, 07:54
by namhung1986
Thank you for your help, atrol!

These are examples of Roles.

- An administrator role can have access level administrator in this project, but still can have access level developer in another project.
- A Developer Role can have access level developer in a project, but still can have access level reporter in another one.

Hope that I am clear enough for you to understand. I am using Mantis 1.1.8

Re: Add selection list User Roles in adding users to a proje

Posted: 24 Sep 2012, 10:02
by atrol
Seems you are asking for this feature request http://www.mantisbt.org/bugs/view.php?id=3444

Re: Add selection list User Roles in adding users to a proje

Posted: 25 Sep 2012, 04:38
by namhung1986
Could you please show me how to implement it? It has been taking me 3 hours. I copy .php files and create databse already, but I do not know how to do with the .diff file.
Thank you so much!

Re: Add selection list User Roles in adding users to a proje

Posted: 25 Sep 2012, 10:08
by atrol
You can't use the diff files which are attached to the issue.
They where created with version 0.18 and 0.19, but you are using 1.1.8.
You can use the diff files to manually apply the changes to your versions. I am quite sure there are some changes needed.

Maybe a better solution for you is to upgrade to 1.2.11 and start using the mentioned plugin from http://www.mantisbt.org/bugs/view.php?id=3444#c32872
I never used this plugin myself, so I can't say if this works for you.

Re: Add selection list User Roles in adding users to a proje

Posted: 25 Sep 2012, 10:16
by cas
The Usergroups plugin will not help since it is supports different functionality:

This plugin allows to assign users to multiple groups.
To be used only with Tasks plugin 2.40 and above !!!
The tasks plugin should be configured to work in Group mode

When assigning a task, one can choose one of the defined groups.
Each member of that group will receive an email of the assigned task.
The person that closes the task will registered as responsible for the task results.

Re: Add selection list User Roles in adding users to a proje

Posted: 25 Sep 2012, 10:34
by namhung1986
Could you please explain the meaning of this in .diff file?

@@ -443,7 +443,6 @@
</tr>
<?php } ?>

-
<!-- Submit Button -->
<tr>
<td class="center" colspan="6">

Does it mean that I should navigate to row 443, count down and select 7 rows after that. Then I replace them with
</tr>
<?php } ?>

-
<!-- Submit Button -->
<tr>
<td class="center" colspan="6">

?

Re: Add selection list User Roles in adding users to a proje

Posted: 27 Sep 2012, 07:46
by namhung1986
thank you atrol and cas for your help!
I made it:)