It's all about the answers!

Ask a question

How I can restrict adding component to a stream by precondition?


silencehill wu (5022632) | asked Sep 01 '13, 12:47 p.m.

I want to write a precondition to prevent adding a component to a stream. But I found after deliver a added component, the precondition of deliver server will not be triggered.

So how I can capture action of the adding component?

We have ever think to set it by setting owner of component, but it seems not fit for user. So at first, I want to know how to trigger the precondition when add a component to stream.


Comments
Simon Eickel commented Sep 02 '13, 2:12 a.m.

there is no precondition to prevent adding a component to a stream.
If you need a precondition this has to be written by your own.

Just take Geoffs solution for this.

2 answers



permanent link
Geoffrey Clemm (30.1k33035) | answered Sep 01 '13, 3:04 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
In order to control who can add a component to a stream, you would use the Permissions on the stream.
In particular, there is the Source_Control -> Save_Stream -> Modify -> Stream -> Modify_the_stream_components -> Add_components_to_the_stream permission.

Cheers,
Geoff


Comments
silencehill wu commented Sep 02 '13, 10:36 a.m.


We name component with some naming rules.
So when we deliver a added component to server, we want to force added component to follow our naming rule.
Permission setting can not resolve the problem.

Please give an advise.


Simon Eickel commented Sep 03 '13, 6:29 a.m.

To get a precondition which can server your problem (only components fitting a special naming convention) should be delivered I fear you have to write your own one.

Greetings,
Simon


Tim Mok commented Sep 03 '13, 9:00 a.m.
JAZZ DEVELOPER

Also, you should note that changing the name of the component will affect every instance where the component is used. If you add the component to streams 'A' and 'B', renaming the component will show the new name in both those streams.


permanent link
Eric Jodet (6.3k5111120) | answered Sep 03 '13, 5:56 a.m.
JAZZ DEVELOPER
 Hello,
enforcing component naming convention / pattern is currently not possible.
There is an OOTB advisor "Ensure Component Names are Unique" to ensure that component names are unique.

You may create a new enhancement for this request and link/add it to Requested SCM Advisors (148313)

Thanks,
Eric.

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.