It's all about the answers!

Ask a question

How to associate user with custom attribute(System) and assign work item to the associated user after save


Sajjad Ali Khan (311451) | asked Aug 29 '15, 5:55 a.m.
edited Aug 29 '15, 5:55 a.m.
I need to design customize work item of change request where i want to associate single or multiple user with the attribute(System) in back-end hence in front-end when user select system from drop-down of (System) then on the basis of selected system, associated user(s) with that system will dsiplay in a read-only format below system attribute.

Secondly, when user save the work item then work item will also be assign to the same user who is associated with the selected system.

How can i achieve the above requirements ? please guide me 

3 answers



permanent link
Donald Nong (14.4k313) | answered Aug 30 '15, 11:26 p.m.
Have you ever used ClearQuest before? Your requirement is very similar to what ClearQuest can do. If fact, your first requirement can be easily fulfilled in ClearQuest using a "stateless record type" (same for your other post https://jazz.net/forum/questions/205633/ui-control-in-rtc-which-can-allow-to-save-multiple-risks-with-different-values). Of course there is no such thing in RTC. To achieve a similar effect, you can consider using the dependent and parameterized HTTP Value Set detailed in the below article.
https://jazz.net/library/article/1257

For a general description of RTC attribute customization, see the following article.
https://jazz.net/library/article/1003

Your second requirement can be easily fulfilled with a "calculated value" script (see above article for details).

Comments
Sajjad Ali Khan commented Aug 31 '15, 2:45 a.m. | edited Aug 31 '15, 5:26 a.m.

Hi Donald Nong,


:) yes you are right we are actually doing sort of migration from ClearQuest to RTC.

Regarding first paragraph; with dependent and parameterized HTTP Value Set i can only set System & Subsystems but i need to actually associate users with System, like System A would have specific user associated with it and System B would have different users, is there any other alternate by which i can achieve this ?

Your second requirement can be easily fulfilled with a "calculated value" script.... Can you please guide little more how can i get the help from this ? 

Regards
SAJJAD.



Donald Nong commented Aug 31 '15, 5:59 a.m.

Since there is no "stateless record type", you can't really associate Users with System, unless you want to create a new work item type called "System", and associate contributes to it. Since RTC and ClearQuest are a bit different, you need to change your mind set, and also the design to achieve something similar. As you cannot associate, you can translate the relationship to "depends", i.e. "users" dependent on "system".

As for the calculated value, same as your other requests, you should start with the same article.
https://jazz.net/library/article/1003

You can also find some codes developed by other users on this forum, such as this one.
https://jazz.net/forum/questions/95825/rtc-calculated-value-dependent-on-status-is-triggered-by-any-change


Sajjad Ali Khan commented Aug 31 '15, 4:15 p.m. | edited Sep 03 '15, 9:22 p.m.

 Donald Nong Thanks for replying but brother i'm unable to totally get your idea behind this line "As you cannot associate, you can translate the relationship to "depends", i.e. "users" dependent on "system". " can you please elaborate


And also with creating new work item type, i think you meant to say New attribute of system which type would be contributor. right ???

Secondly, regarding your suggestion "To achieve a similar effect, you can consider using the dependent and parameterized HTTP Value Set detailed in the below article. https://jazz.net/library/article/1257 "
I have followed the HTTP Value Set Provider but its while Performing Test its gives an error "The entity name must immediately follow the '&' in the entity reference."


Donald Nong commented Sep 03 '15, 9:27 p.m.

If I ask you to replace "subsystems" with "users" in the dependent and parametrized HTTP Value Set sample, will you understand the idea and what you can do?

About the error in the HTTP Value Set Provider, I would suggest you open a new post.


permanent link
Sajjad Ali Khan (311451) | answered Sep 05 '15, 4:40 a.m.
 Donald Nong I understand your idea but there is no way to create enumeration for users. how can i make enumeration for users other than HTTP Value set ?

Comments
sam detweiler commented Sep 05 '15, 10:19 a.m. | edited Sep 05 '15, 10:24 a.m.

only thing you could do is use the Contributor List  data type and add/remove users from that to manage your 'association'
but U will have to manage the list in some code, and having the list of users doesn't give them any permissions or anything.. its just like another enum


Sajjad Ali Khan commented Sep 05 '15, 10:25 a.m.

 sam detweiler I need to design customize work item of change request where i want to associate single or multiple user with the attribute(System) in back-end(By Admin user) hence in front-end(Normal User) when user select system from drop-down of (System) then on the basis of selected system, associated user(s) with that system will display in a read-only format below system attribute also when user save the work item then work item will also be assign to the same user who is associated with the selected system.

The suggestion which you have given will not work in above requirement.


sam detweiler commented Sep 05 '15, 10:27 a.m.

ok, I don't understand 'attribute' 'System' then.   the use case is still unclear to me


permanent link
Sajjad Ali Khan (311451) | answered Sep 05 '15, 10:37 a.m.
edited Sep 05 '15, 10:37 a.m.
 sam detweiler By system i mean custom attribute which probably have enumeration list of all the systems and with each value (like system A, system B etc) there will be some users associated with it therefore when user select system A then associated user will displayed below the field then when user click Save button then work-item will also be assigned(Same liek Ownby operation) to all the associated users

I hope now you understand the issue

Comments
sam detweiler commented Sep 05 '15, 10:44 a.m.

Ok, getting clearer

1. workitem can only be owned by ONE contributor. group is not a contributor. so cannot be the owner..
2. the workitem will need another field, contributor LIST  which you manage (some code somewhere)  to hold the list of one or more users 'assigned' to this workitem..
3. having this list does not send email or anything if the status changes,so YOU will have to write code to do this.  (participant to send mail on workitem save if appropriate changes)
4. there is no UI code that will change the list of potential users when the workitem editor person selects the different enum (system) in the drop down.

Your answer


Register or to post your answer.