Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

Checking if particular field in Work Item is edited or not?

Hi,

My requirement is to allow a person with particular role say "Project Manager" to edit particular field say "estimate" in work item and If the person saving the workitem has different role then stop it.

The approach what I think is,

1.) Getting the old value of the "estimate" field and comparing it with the value after "Save" is performed.
Or Putting some Listener for that field (if available) to detect the change.

2.) Check the role of person who has logged in RTC and who is saving the workitem.Compare it with "Project Manager ID" and proceed with rest of the logic.

So, There are two things which I want to ask.

1.) One is , How to detect the change in a particular field in workitem.

In precondition can it be checked OR I have to use workitem history for getting that?
What is the best option for doing it?

2.) How can I know the roles of the person who is saving the workitem?
 

0 votes


Accepted answer

Permanent link
If I understood rightly, the requirement is to control editing of a specific attribute based on the role associated with an user.  This is possible directly by using OOTB permissions associated with the specific role.

create a specific role which has permissions to edit attribute
assign this role to all users who should have the capability to edit the attribute.

additionally, verify that other roles do not allow editing of the attribute

for this you may want to look at :
Project Area opened in the Eclipse Client > Process Configuration > Team Configuration Permissions > Select a specific Role
From Permitted Actions > Work Items > Save Work Item > Modify the work item > Modify the work item's estimate

hope it helps



Sarthak Sharma selected this answer as the correct answer

1 vote

Comments

In addition to it, Suppose if a particular user doesn't have permission to save a particular field and we want this workitem to go for approval(to the approvers defined in the work item) before it is reflected. Is that possible ?


5 other answers

Permanent link
Hi Sarthak,
The easiest option would probably be to use Preconditions for saving a work item.  https://jazz.net/library/article/997/#dynamic walks you through the steps.  What you will likely want to do is configure a Precondition of "Read-Only Attributes for Type and State" for every role type except Product Manager.  Set the precondition for every state of the work item type.

0 votes


Permanent link
Is this applicable for RTC 3.0.1.2 also?

0 votes

Comments

According to the article, this functionality was added in 4.0.


Permanent link
You understood it correctly and it is very simple solution.
Thanks Dinesh.

0 votes


Permanent link
@Dinesh , One more thing, Suppose if a particular user doesn't have permission to save a particular field and we want this workitem to go for approval(to the approvers defined in the work item) before it is reflected. Is that possible ?

0 votes


Permanent link
can you expand on what it means when you say "before it is reflected?" sorry about my ignorance if its something obvious..

PS: you can reach an user by using @userid, like you tried to and the userid can be known by hovering over the user name and user id appears at the very end of the url... for eg. https://jazz.net/forum/users/din, using this url @<bold part> will take you to the respective user.

0 votes

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details

Question asked: Oct 26 '12, 6:10 a.m.

Question was seen: 5,218 times

Last updated: Nov 28 '12, 6:22 a.m.

Confirmation Cancel Confirm