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

svn link to work item in commit hook (not scheduled task)

So I have a svn commit hook that will update RTC work item comments with the changes made. I was going to run the rtc/svn scheduled task to create the links as well, but there are some topics here that seem to indicate this can be done directly during the commit rather than suffer the lag in waiting for the next scan.


I think the git examples that are hosted at https://jazz.net/library/content/articles/rtc/2.0/source-control/git-integration/hooks/post-commit show me how to create a link: via posting:

{"rdf:resource":"$SCMURL","oslc_cm:label":"$someComment"}

to

$HOST/oslc/workitems/$WI//rtc_cm:com.ibm.team.workitem.linktype.relatedartifact.relatedArtifact



Assuming this is correct, what should the $SCMURL be? Is it a link to the revision in svn which is something like this:

http://$mySCMHost/svn/$myREPOName/!svn/bc/$commitedRevision/



And I assume that multiple commits under the same work item that create multiple links (each to their own revision) here would not cause a problem?

0 votes



One answer

Permanent link
The URL you provide is a link to your SVN revision as you have
suggested. You want to to be of a form that supports navigation via
http. The example you provided looks reasonable but I don't know enough
about the web interface for SVN to say for sure.

You can add multiple links to the work item.

Michael

atuel wrote:
So I have a svn commit hook that will update RTC work item comments
with the changes made. I was going to run the rtc/svn scheduled task
to create the links as well, but there are some topics here that seem
to indicate this can be done directly during the commit rather than
suffer the lag in waiting for the next scan.


I think the git examples that are hosted at
https://jazz.net/library/content/articles/rtc/2.0/source-control/git-integration/hooks/post-commit
show me how to create a link: via posting:

{"rdf:resource":"$SCMURL","oslc_cm:label":"$someComment"}

to

$HOST/oslc/workitems/$WI//rtc_cm:com.ibm.team.workitem.linktype.relatedartifact.relatedArtifact




Assuming this is correct, what should the $SCMURL be? Is it a link to
the revision in svn which is something like this:

http://$mySCMHost/svn/$myREPOName/!svn/bc/$commitedRevision/



And I assume that multiple commits under the same work item that
create multiple links (each to their own revision) here would not
cause a problem?

0 votes

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

Question asked: Mar 12 '10, 12:53 p.m.

Question was seen: 4,458 times

Last updated: Mar 12 '10, 12:53 p.m.

Confirmation Cancel Confirm