It's all about the answers!

Ask a question

Deliver all changesets associated with a particular component for approved work items at a particular state


Richard Good (77528) | asked May 17 '16, 12:45 p.m.

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



permanent link
Shashikant Padur (4.0k27) | answered May 17 '16, 11:53 p.m.
JAZZ DEVELOPER
There is a precondition named "Require work items to match query" where you can provide a query that matches the approved workitems. It will only deliver the change sets for the matched workitems.
If that does not work for you then you have to write a custom precondition to achieve this functionality.

Comments
Richard Good commented May 18 '16, 5:23 a.m.

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


Ralph Schoon commented May 18 '16, 5:42 a.m. | edited May 18 '16, 5:43 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

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.

  1. 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?
  2. How? It might be doable if there are no conflicts, but if there are, then there is no way to just do it.
I am not convinced that this is a feasible approach. The API (server) might not support this either. The SCM API on the server might not allow to do this either. I have seen some API's requiring a client API for certain operations. 


permanent link
Richard Good (77528) | answered May 18 '16, 6:43 a.m.

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
Ralph Schoon commented May 18 '16, 7:59 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

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.


Ralph Schoon commented May 18 '16, 8:02 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Ralph Schoon commented May 18 '16, 8:08 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

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.


Richard Good commented May 18 '16, 9:42 a.m.

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


Ralph Schoon commented May 18 '16, 9:48 a.m. | edited May 18 '16, 9:52 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

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.


Richard Good commented May 18 '16, 10:04 a.m.

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.


Ralph Schoon commented May 18 '16, 10:18 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

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.


Richard Good commented May 18 '16, 11:27 a.m.

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

showing 5 of 8 show 3 more comments

Your answer


Register or to post your answer.