It's all about the answers!

Ask a question

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


Anthony Tuel (1131) | asked Mar 12 '10, 12:53 p.m.
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?

One answer



permanent link
Michael Valenta (3.7k3) | answered Mar 15 '10, 9:15 a.m.
FORUM MODERATOR / JAZZ DEVELOPER
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?

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.