How to automatically add a user group to a parent/child list

The place to ask a general ClearQuest question
EricZhao
Posts: 5
Joined: Mon Dec 22, 2014 5:30 am

How to automatically add a user group to a parent/child list

Postby EricZhao » Wed Dec 24, 2014 5:38 am

Please see the screenshot attached. It is a list and I have a hook to get a specific user group name. Then I want to have another hook to add this user group to this list. But I'm lack of knowledge how to do this. Can you help? Thanks!
Attachments
Capture.JPG
Capture.JPG (12.39 KiB) Viewed 1311 times

Pavel
Posts: 281
Joined: Fri Dec 12, 2008 12:19 am

Re: How to automatically add a user group to a parent/child

Postby Pavel » Sat Dec 27, 2014 12:36 pm

EricZhao wrote:Please see the screenshot attached. It is a list and I have a hook to get a specific user group name. Then I want to have another hook to add this user group to this list. But I'm lack of knowledge how to do this. Can you help? Thanks!

I am sorry, could you clarify your question, please?
You have a list view control that represents reference_list field on the form, right?
What is the reference list data type?
What do you mean by "hook to get a specific user group name"?

Thank you,
Pavel

EricZhao
Posts: 5
Joined: Mon Dec 22, 2014 5:30 am

Re: How to automatically add a user group to a parent/child

Postby EricZhao » Mon Dec 29, 2014 4:29 am

Hi Pavel,

Hope you had a nice Christmas holiday!

I have two record types in CQ: Product and Bug. My goal is to restrict users access to Bugs: every bug has a product, and only users working in this product team have access to bugs of this product.

In User Admin tool, I created user groups for every product separately. For example, user group "Product_A_Security_Group" is for Product A. Only users in this group can view bugs of Product A.

And then in CQ, I added a field "flag" to Product, which type = Reference and references to "Bug". Check the "Security Context" checkbox for this field.

And then in Bug form, there's a new tab called "ratl_security". I can add user group to control the security access.

So far all the steps can be done manually. What I need is to make this process automated when creating a Bug. I.e. when creating a bug, user set a value in Product field (e.g. Product_A), and then the corresponding user group ("Product_A_Security_Group") is automatically added to the "ratl_security" tab. But I don't know how to realize this using hooks. Can you help me?

Thanks!

Eric

Pavel
Posts: 281
Joined: Fri Dec 12, 2008 12:19 am

Re: How to automatically add a user group to a parent/child

Postby Pavel » Mon Dec 29, 2014 9:10 am

Hi,

It suppose to work this way:
1. you can create a stateless record type called "Product"
2. On the "Bug" record type, you should create a REFERENCE field, "Product", which is a reference to the "Product" record type. It should also have "security context" flag checked. It will add "ratl_context_groups" field to the "Product" record type and "Ratl_Security" tab to the record type form.

For each product, you can select ClearQuest user groups that suppose to have access to the product.
Now, when specific product is selected on a "Bug" record, access to this record will be restricted to the correspondent security groups automatically.

Thank you,
Pavel


Return to “General ClearQuest Questions”

Who is online

Users browsing this forum: No registered users and 1 guest

cron