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

How to restrict creation of a workitem for a particular workitem type not more than one (1 Nos)

Hi ,
I have created a new workitem type " My_Master_Data" which has lot of customized field where I am capturing ONCE ONLY all Project Related and other Important Information .

I do not want to create any other record based on this new customized workitem type as it will be for one time record keeping .

So my question -- How I can restrict of creating a new record of type "My_Master_Data" not more than once .

Since it is urgent , I am requesting your all help .

Thanks

PKC

Prasanta Kumar Chaudhuri



0 votes



2 answers

Permanent link
Once you have your "one and only" instance of that work item type, you could remove the permission to create a work item of that type from all roles.  This would not allow anyone of any role to create a work item of that type anymore.

Susan

0 votes

Comments

I assume he meant programmatically

Sorry, I went with generically, since I assume if no role has permissions to create one, it cant' be created programmatically, either.


Permanent link
Thanks for your Reply . Currently since I do not have option , I am exactly doing the same thing by withdrawing the Permission for that " My_Master_Data" workitem type for all . BUT I MYSELF IS BREAKING THE RULE .

What I am expecting -- Using Program /Hook

Program /Hooks will check whether "My_Master_Data" workitem type has any record or not . If NOT , then it will allow the role having permission to create "My_Master_Data" workitem either from Browser or from RTC Client , else restrict.

There should be facility to disable the program / Hook in case it is required ,

Can some one help on this please

Thanks

PKC

Prasanta Kumar Chaudhuri



0 votes

Comments

Creating a plugin advisor to provide enforcement here should be pretty easy..

enabling/disabling, like Susan suggested, only allow for certain role. that role does not have the plugin configured..  then when you need to do something, assign that role for that one person temporarily.

An example advisor would be https://rsjazz.wordpress.com/2014/05/26/only-owner-can-close-workitem-advisor/
You would modify it to have an expression similar to the one in https://rsjazz.wordpress.com/2012/11/19/using-an-expression-to-synchronize-attributes-for-work-items-of-a-specific-type/ and if the result set contains data you would prevent from saving. 

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
× 12,129

Question asked: Mar 12 '15, 8:01 a.m.

Question was seen: 5,532 times

Last updated: Mar 12 '15, 9:26 a.m.

Confirmation Cancel Confirm