Deliver all changesets associated with a particular component for approved work items at a particular state
Hello,
We have a development stream where there are no strict gates for delivering files from workareas into the stream other than you must associate a work item. At a point in time we want to deliver all changesets associated with approved work items to a verification stream from the development stream for the components contained in the development stream, the verification stream flows from the development one, we do not want any changes associated with unapproved work items. How best would I achieve the stated aim. I would like to automate this as my criteria are fairly fixed. Thanks for any help
Richard
2 answers
If that does not work for you then you have to write a custom precondition to achieve this functionality.
Comments
Thanks for the advice Shashikant!
That precondition would appear to apply to every stream in a team area. Maybe I can add "team variables" to make my query team specific, but it seems a bit hidden. Maybe a naming convention of streams would help in that I could ignore all streams beginning with Development and apply different clauses of my query if the Stream name begins with Verification, is this a sensible way forward?
As you can guess I really want it to apply my delivery rules to selected streams not all streams.
Ideally I want the act of putting a work item status to "Authorised" to deliver all attached change sets to the flowed to Stream, anyone done that? What's the best way to do it?
Cheers for any advice
Richard
So you have a work item and change sets associated to that work item. Now the state of the work item changes. Assume we act in a server work item save operation. You want a delivery.
-
Where? There is no notion of a Stream in the work item or referenced change set that I am aware of. The change set only contains the changes itself. As far as I can tell, it does not know the workspaces or streams it belongs to. We have the locate change sets for exactly that reason. How to decide where to go/deliver to?
- How? It might be doable if there are no conflicts, but if there are, then there is no way to just do it.
Hi Ralph,
Ran out of comment space so incorrectly adding my comment as an answer
Thanks for the usual good advice, maybe I should ask the question in a more generic way. You may remember me from my Dimensions to RTC migration questions. In Dimensions the verification of the work items had a direct affect on the state of the files and whether or not the particular version appeared in a formal build or not. We are all about replicating this sort of function in RTC, but I at least am open to different ways of achieving it.
So whilst the work items associated with changes go through a formal change the delivery of actual source code/ file changes is not governed by changing their state. I need some way of distinguishing in an automated fashion between those changes that are reviewed and approved and those that are work in progress/ unapproved. I want to be able to move approved changes to a particular stream but be prevented from moving unapproved changes, RTC does not seem to lend itself to this sort of requirement or I am quite possibly missing something. How would you achieve what I require both automatically (ideally) and manually.
Re my proposed work item save follow up action: I see your point, it would not be feasible without asking for the stream you are coming from along with cross referencing the pending changes from that stream to any flowed to stream, but in some circumstances this sort of information provided on a pre-condition when changing to a resolved/ deliver to config area state might be acceptable to my customer, acceptable answers on the precondition would then initiate a follow up action to deliver the changesets to the formal stream.
Thanks for any ideas/ advice
Richard
Comments
Richard,
you should maybe go away from designing the solution to what the requirement is. You think Dimensions but for RTC, you need to think RTC.
So if you want to achieve that "only reviewed/approved/found good code goes into a stream", you would use a pre-condition that checks the fact that the change set is good based on some criteria - which could be carried by work items - and prevents delivering if that is not the case.
Shashikant answered with some proposals already and there are more e.g. based on code review in 6.0.x. You can write your own pre-conditions.
This is a good approach, because users use it and are prevented to do something bad, but special roles can get the permission to overrule this if needed.
Another good approach is to deliver good public builds to a green stream.
It is maybe possible to create some kind of automation that works along your thoughts, but it will likely be a lot of work and my examples of missing information needs to be taken into consideration.
I usually don't trust that kind of automation either. Humans should press the red button.
Here an example for a very basic custom precondition https://rsjazz.wordpress.com/2012/11/01/restrict-delivery-of-changesets-to-workitem-types-advisordelivery-of-changesets-associated-to-wrong-work-item-types-advisor/ .
Ran out of space as well.
The Idea in RTC is basically, that you can keep code away from a stream. Developers have the repository workspace to continue development until their code is approved.
The Idea in RTC is basically, that you can keep code away from a stream. Developers have the repository workspace to continue development until their code is approved
This might be my major conceptual error. Can the reviewer see the change sets in a users private workspace before it's delivered to the stream, kind of assumed that the changes had to be delivered before the reviewers could see them (because of the private thing) if the user is just required to check them in to make them visible to others then I see how this could work - is that what you are saying?
Cheers
Richard
It is possible to see the (completed) change sets on a work item, even if it is not yet delivered. The review feature allows that as far as I can tell as well. You can even accept a (completed) change set from a work item into a repository workspace e.g. to run a build and test.
So, yes, you don't have to deliver to review and approve.
I'll go off and do a few tests, I need to put the gatekeeper between the workspace and stream for some team areas/ streams and not for others, don't really want everything in a project guarded in the same way, sounds like this is best done with work item attributes or team area properties, but the require work item to match query sounds the way to go. Thanks for the hints.
You can configure different operational behavior for different team areas/roles. You can make custom pre conditions configurable for a stream. It might get confusing and you could look into a custom condition with configuration as well.
There is unfortunately no trivial solution for all requirements.
Custom pre-conditions for a stream sounds like a bridge too far, think I'll settle for configuring on a team/ role basis. Time for a bit of experimentation...