RE: Adding Links to WorkItems using WorkItems.xml
- From: hongyes@xxxxxxxxxxxxxxxxxxxx ("Hongye Sun [MSFT]")
- Date: Mon, 29 Sep 2008 05:28:19 GMT
Thanks for your patience, Steve.
After confirming with product team, the <Hyperlink> tag is not supporting
to link to SharePoint document. $$WSSSITE$$/$$PROJECTNAME$$ are only
supported in <Field> tags. But hopefully, for your situation, I have found
one workaround.:)
Work item supports using an HTML field as a rich-text box. By using this
feature, we could put hyperlinks into HTMLFieldControl. Just like that we
have a webpage with links to SharePoint documents. Here are the way to
implement it.
Defining a new field in work item type definition. For example, in
task.xml, we define a new field named "MyLinks", refname is "My.Links" and
type is "HTML" instead of "PlainText".
<FIELD name="MyLinks" refname="My.Links" type="HTML">
</FIELD>
Note that we must keep refname as a new name instead of existing field such
as "System.Description". Since we are not able to change the existing
fields' type, for example, "System.Description" is defined as "PlainText"
originally.
After defining the new field, we need to add a HTMLFieldControl associated
with it. In the example, we wrap it in a tab control.
<Tab Label="My Links">
<Control Type="HtmlFieldControl" FieldName="My.Links" Label="My Links:"
LabelPosition="Top" Dock="Fill"/>
</Tab>
Now we can assign initial HTML value to My.Links field in workitems.xml.
<FIELD refname="My.Lists" value="<P><A
href='$$WSSSITE$$/$$PROJECTNAME$$/Process%20Guidance/Supporting%20Files/Brai
nstormScenarios.htm'>Service Requirement</A></P>
<P><A
href='$$WSSSITE$$/$$PROJECTNAME$$/Project%20Management/Issues.xls'>Issues
</A></P>" />
The value has been replaced by escape character such as "<", ">"
because it is defined in an xml document. The target HTML value looks like:
<P><A
href='$$WSSSITE$$/$$PROJECTNAME$$/Process%20Guidance/Supporting%20Files/Brai
nstormScenarios.htm'>Service Requirement</A></P>
<P><A
href='$$WSSSITE$$/$$PROJECTNAME$$/Project%20Management/Issues.xls'>Issues</A
</P>
$$WSSSITE$$/$$PROJECTNAME$$ will be replaced by its real value in work item
<Field> tags.
This is a quite simple sample for your situation. You could enrich the HTML
value by yourself.
Please try the workaround above, and let me know if it works for you.
Thanks.
Regards,
Hongye Sun (hongyes@xxxxxxxxxxxxxxxxxxxx, remove 'online.')
Microsoft Online Community Support
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
msdnmg@xxxxxxxxxxxxxx
This posting is provided "AS IS" with no warranties, and confers no rights.
.
- References:
- Adding Links to WorkItems using WorkItems.xml
- From: Steve Barker
- RE: Adding Links to WorkItems using WorkItems.xml
- From: "Hongye Sun [MSFT]"
- RE: Adding Links to WorkItems using WorkItems.xml
- From: Steve Barker
- RE: Adding Links to WorkItems using WorkItems.xml
- From: "Hongye Sun [MSFT]"
- RE: Adding Links to WorkItems using WorkItems.xml
- From: Steve Barker
- Adding Links to WorkItems using WorkItems.xml
- Prev by Date: RE: Adding Links to WorkItems using WorkItems.xml
- Previous by thread: RE: Adding Links to WorkItems using WorkItems.xml
- Index(es):
Relevant Pages
|