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
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
2 answers
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
Susan
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
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
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.