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

Locking a workitem programitacally using plugin.

Hi,

We have created a plugin which has scheduler to update work item at a regular interval of time. These intervals are defined in process configuration source. Scheduler updates few attributes using one admin account defined.
The problem is when normal user is updating a work item at the same time if admin updates the work item then user have to refresh the WI and loose his changes. Is it possible to lock WI by admin before to it does the updates.
This should lock WI editor for all other users before performing updates.

Regards,
Rhishi

0 votes



One answer

Permanent link
There is, as far as I know, no locking mechanism for Work Items. There is none in the UI that I am aware of and none in the API. The user will not recognize a work item is changed while he is doing changes and will have to refresh if that is the case, like if some other user did a change.

0 votes

Comments

Consider to run your automation during the night when the user activity is light.

You may be able to do a server-side Validator which could tell if it is during this "locked" timeframe and give an error, but as you noted in your original question, this doesn't lock the WI editor, only doesn't allow the save to go through after the user has made all of his/her changes in the editor.

You may be able to add a text attribute at the top of the work item and do a calculated field which would tell the user if the work item is "locked" or not (without actually locking it).  But this is about the best I can think of.

Thanks Ralph for the info. Actually the scheduler is stopped during night. But it needs to update attributes during business hours and the update of attributes is triggered by save operation either by Admin account(which performs update at defined interval) or by user doing some fields update. So there is no locking mechanism that can be possible using programing in plugin.

@Hanson Thanks for your reply. Will check on implementation of such locking indicator however i am afraid that still will cause trouble for the users.

I wonder what the updates actually are. If possible I would

  • implement them in a follow up action on saving the work item
  • Or implement them using value provides (e.g. caluculated values).
In that case collisions would be less likely.

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
× 10,938

Question asked: Sep 23 '14, 3:55 a.m.

Question was seen: 3,954 times

Last updated: Sep 24 '14, 4:26 a.m.

Confirmation Cancel Confirm