Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

How can an operation advisor know which files are going to be delivered?

Hello,

I am trying to implement an operation advisor that is activated when DELIVER operation on server is attempted.

I have followed this blog that deals with the advisor that, when DELIVER operation is attempted,checks if workitems are of the desired type. If not, delivery is forbidden.

My task is to program a similar advisor, but mine should be able to find out which files are going to be delivered (are modified or new) and then, it should carry out specific checks on that files.

MY GOAL: Get the advisor find out which files are going to be delivered and therefore the advisor should perform specific check on them.

Thank you very much in advance!

0 votes

Comments

I would like to have just a little advice on in which parts of the API I should look at.

I need to get information about which files were modified or added to the repository workspace and are included in a particular changeset and I need to go through all the files and do some operations on them...



One answer

Permanent link
Consider google for "deliver change set Team Concert Advisor" and the like. Limit using site:jazz.net as selection criterion. https://rsjazz.wordpress.com/ also has API examples more in https://rsjazz.wordpress.com/interesting-links/ . A deliver advisor can iterate all items that are to be delivered.

https://rsjazz.wordpress.com/2016/02/03/setting-access-control-permissions-for-scm-versionables/ explains some of the API, I think.

0 votes

Comments

Thank you Ralph, but I have already been google-ing for some days and I am still confused on where to start. I am a student and I am a novice in extending RTC, this is my school work, I would really appreciate just some guidance on which way to go I mean wether to look at com.ibm.team.scm.common or which another part of the API?

   From this  blog have you followed how to set up your environment for debugging and done the extensions workshop? If not, do that and then look at your code again.

Note: deliver delivers changes/change sets. the changes are to files at the end, but a change set does not necessarily impact only one file. https://rsjazz.wordpress.com/2016/02/03/setting-access-control-permissions-for-scm-versionables/ , as mentioned above shows the API to use. Dependent on what operation you use you will have to use SCM API and setControl in above link shows you how to go from an IChangeSet to an IChange to an IVersionableHandle.  

 This is code to get all the change sets in a delivery


IItemServiceIterator changeSetIterator = ItemServiceIteratorFactory.INSTANCE
.createFetchItemsIterator(fItemService, changeSetHandles
.toArray(new IItemHandle[changeSetHandles.size()]),
IRepositoryItemService.COMPLETE);
while (changeSetIterator.hasNext()) {
IChangeSet changeSet = (IChangeSet) changeSetIterator.next();

Your answer

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,927
× 1,201
× 89
× 43

Question asked: Nov 21 '16, 12:20 p.m.

Question was seen: 3,562 times

Last updated: Nov 23 '16, 1:40 p.m.

Confirmation Cancel Confirm