It's all about the answers!

Ask a question

Preconditions on Baseline Deliver action


Ankur Sharma (151194) | asked Jul 16 '09, 6:47 a.m.
Hi all

Currently if there is some precondition written for a 'change set' (eg there must be a workitem attached to it), it only applies when we deliver the change set. But before delivering the change set to the stream if I make a baseline of the component and include this change set in the baseline and deliver the baseline, then the precondition doesn't work i.e. the change set will be delivered as a child of baseline without any workitem attached to it.
So I want to write the precondition for delivering the baselines, so that all the change sets in the baselines have workitem attached to them. My doubt is if one delivers more than one baseline for same component in a single deliver operation, how to find all the change sets under all those baselines which are being delivered in single deliver operation ? Since API only provides the method to get a single baseline per component.

Thanks
-Ankur

5 answers



permanent link
Geoffrey Clemm (30.1k33035) | answered Jul 17 '09, 8:39 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
You can write a pre-condition which is run when you deliver a baseline.
What we've been discussing is how you would have such a pre-condition
validate something about all change-sets that are effectively being
delivered by delivering that baseline.

Logically, any rules that you have in place for validating delivery of
change sets should be applied to the delivery of baselines, since
logically a baseline is just a way of collecting a set of change sets,
and delivering them as a group. It would be prohibitively expensive
(and unnecessary) to run the check on every change set in the baseline,
since only the "new change-sets" in that baseline need to be checked
(i.e. change sets that aren't already in the stream you are delivering
to). But computing the list of new change-sets and applying change-set
rules to all of them can still be expensive, which is one of the issues
discussed in work item 53173 (and probably why that feature hasn't yet
been implemented).

So you could try to do that computation yourself, but that will be hard
for you to make acceptably efficient. So I believe that what is really
needed here is for the system to apply change-set deliver rules to
change sets delivered via baselines (i.e. work item 53173).

Cheers,
Geoff

askankur wrote:
Does that mean I can't write any precondition which checks while
delivering a baseline ? Basically 2nd half of my initial query is
still not answered. i.e. I want to write the precondition for
delivering the baselines, so that all the change sets in the
baselines have workitem attached to them. My doubt is if one delivers
more than one baseline for same component in a single deliver
operation, how to find all the change sets under all those baselines
which are being delivered in single deliver operation ? Since API
only provides the method to get a single baseline per component.

permanent link
Ankur Sharma (151194) | answered Jul 17 '09, 3:33 a.m.
Does that mean I can't write any precondition which checks while delivering a baseline ? Basically 2nd half of my initial query is still not answered. i.e. I want to write the precondition for delivering the baselines, so that all the change sets in the baselines have workitem attached to them. My doubt is if one delivers more than one baseline for same component in a single deliver operation, how to find all the change sets under all those baselines which are being delivered in single deliver operation ? Since API only provides the method to get a single baseline per component.

permanent link
Geoffrey Clemm (30.1k33035) | answered Jul 17 '09, 12:31 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Note that one workaround is to disallow the delivery of baselines, and
only allow the delivery of change sets.

Cheers,
Geoff

Jared Burns wrote:
On Thu, 16 Jul 2009 10:53:03 +0000, askankur wrote:
Currently if there is some precondition written for a 'change set' (eg
there must be a workitem attached to it), it only applies when we
deliver the change set. But before delivering the change set to the
stream if I make a baseline of the component and include this change set
in the baseline and deliver the baseline, then the precondition doesn't
work i.e. the change set will be delivered as a child of baseline
without any workitem attached to it.

This is a known limitation, tracked here:

53173: When delivering baseline process rules are different than for individual change sets
https://jazz.net/jazz/resource/itemName/com.ibm.team.workitem.WorkItem/53173


permanent link
Jared Burns (4.5k29) | answered Jul 16 '09, 1:57 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
On Thu, 16 Jul 2009 10:53:03 +0000, askankur wrote:
Currently if there is some precondition written for a 'change set' (eg
there must be a workitem attached to it), it only applies when we
deliver the change set. But before delivering the change set to the
stream if I make a baseline of the component and include this change set
in the baseline and deliver the baseline, then the precondition doesn't
work i.e. the change set will be delivered as a child of baseline
without any workitem attached to it.

This is a known limitation, tracked here:

53173: When delivering baseline process rules are different than for individual change sets
https://jazz.net/jazz/resource/itemName/com.ibm.team.workitem.WorkItem/53173


--
Jared Burns
Jazz Process Team

permanent link
Andrew Hoo (1.0k1) | answered Jul 16 '09, 1:24 p.m.
JAZZ DEVELOPER
You could use IFileSystemView.compareAsWorkspaces to compare your
workspace to the stream. That can get you a list of different baselines.
Then you could compare baselines to get the changesets within the
baselines.

This should be effective for your general case where your workspace and
streams are similar; however, you could potentially hit performance issues
if you are comparing two vastly different targets.

Also, just a small technical correction. When there are multiple baselines
outgoing on the same component, and you do a 'deliver all', under the hood
you are not delivering 'multiple' baselines to the target. You are
delivering the top-most baseline that builds ontop of the ones below it.

On Thu, 16 Jul 2009 06:53:03 -0400, askankur
<ankshar4> wrote:

Hi all

Currently if there is some precondition written for a 'change set' (eg
there must be a workitem attached to it), it only applies when we
deliver the change set. But before delivering the change set to the
stream if I make a baseline of the component and include this change
set in the baseline and deliver the baseline, then the precondition
doesn't work i.e. the change set will be delivered as a child of
baseline without any workitem attached to it.
So I want to write the precondition for delivering the baselines, so
that all the change sets in the baselines have workitem attached to
them. My doubt is if one delivers more than one baseline for same
component in a single deliver operation, how to find all the change
sets under all those baselines which are being delivered in single
deliver operation ? Since API only provides the method to get a
single baseline per component.

Thanks
-Ankur

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.