It's all about the answers!

Ask a question

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


PRASANTA CHAUDHURI (11031925) | asked Mar 12 '15, 8:01 a.m.
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



2 answers



permanent link
PRASANTA CHAUDHURI (11031925) | answered Mar 12 '15, 8:52 a.m.
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




Comments
sam detweiler commented Mar 12 '15, 8:56 a.m.

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.


Ralph Schoon commented Mar 12 '15, 9:26 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

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. 


permanent link
Susan Hanson (1.6k2201194) | answered Mar 12 '15, 8:07 a.m.
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

Comments
sam detweiler commented Mar 12 '15, 8:16 a.m.

I assume he meant programmatically


Susan Hanson commented Mar 12 '15, 8:36 a.m.

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

Your answer


Register or 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.