It's all about the answers!

Ask a question

Exclude work item types from being used in plans

Ilona Krammer (159345) | asked Sep 26 '16, 9:18 a.m.
Is there a way to exclude work item types from being used in plans. I need some administrative work item types that must not be planned - they shouldn't be created from a plan or inserted into a plan.

Is there a way to do that?

Accepted answer

permanent link
Ralph Schoon (63.0k33645) | answered Sep 26 '16, 10:44 a.m.
Illona, there is nothing special to work items with respect to "created in plans".

A plan is just a query on the work items. Stop thinking about a plan being something else. A plan for the most part does not even store anything (there is some few information that is not reflected in work items and life calculated in the plan or stored in its context (e.g. ranking)). But for the most part a plan is just a query. See for some more basic info,

Regardless how you create them, any work item can show up in a plan, if the filed against and planned for is matching the query search scope. You can configure plans to not show execution items  and also to filter some data, but what you request is not supported and does not make sense in my opinion either.

You can work with permissions and revoke the ability to set the planned for attribute for roles, if you wish. That is pretty much what I think you can do,
Ilona Krammer selected this answer as the correct answer

Ilona Krammer commented Sep 27 '16, 2:05 a.m.

Hi Ralph,
since we cannot store basic master data in RTC in any other place than in a work item there are indeed items that must not be used in a plan (which makes absolute sense in that case)

It also seems like mandatory or readonly attributes are completely ignored when creating items in plans. How can I fix that because that really is unacceptable for our work - if I could set Planned For and Filed Against readonly and that would actually work in plans that would at least prevent the user from saving everything I guess.

Obviously working with permissions and roles does not work since there are work items types that I want to use in plans. Not all of them represent master data.

Ralph Schoon commented Sep 27 '16, 3:14 a.m. | edited Sep 27 '16, 3:15 a.m.

Read only and required works with plans. As you can see below, the filed against should have been set by being created in the plan, but it has not that is why the required attribute complains.

You have to obviously make the attribute read only and not the attribute presentation in an editor presentation.

You can also consider to remove the permission to save these attributes for the work item type in the permissions.

You will not be able to save the items in the plan if you do so, as you can't save these attributes.

The items are cached, so you would see them in the plan until the next refresh though.

Ilona Krammer commented Sep 27 '16, 5:42 a.m.

Thank you so much! I have no idea why it didn't seem to work before (maybe I didn't save or didn't wait for the saving process to finish)

So at least I can prevent users from saving the items even though I can't really prevent them from adding them. Though I'm hoping it is going to be obvious for our users which item types should be planned and which shouldn't.

Thanks again!

Ralph Schoon commented Sep 27 '16, 6:38 a.m.

Please have a look at the permissions also, that won't prevent them from picking the item type, but you can have only specific roles that are able to create them as well.

One other answer

permanent link
Geoffrey Clemm (30.1k33035) | answered Sep 29 '16, 2:01 a.m.
One possible way to prevent a work item of a particular type from appearing in a plan is to create a Category that is never used in a plan, and then have a custom work_item_save precondition that requires that the Filed Against value for that type of work item be that category.

Your answer

Register or to post your answer.