TFS 2010 - default value for field in html format
-
lundi 5 mars 2012 11:15
I set a default value for a field in html format (I needed a template for the repro steps field, title in bold then steps to reproduce (with automatic numbering)).
The template is displayed correctly in TFS and TFS web, but I can't save new bugs in the web and I can't edit existing work items in the web.
Is there a way to set default value for the web in html format?
Or set default value only for win forms layout (ignore the default value in web)?
Thanks,
Toutes les réponses
-
lundi 5 mars 2012 16:58
The below post talks about how to customize work items controls for TWA (TFS 2010).
Please remember to mark the replies as answers if they help Thanks, --Kuldeep
- Modifié Kuldeep S Chowhan lundi 5 mars 2012 16:59
- Proposé comme réponse Kuldeep S Chowhan mardi 6 mars 2012 14:02
- Non proposé comme réponse Billy_mk mardi 6 mars 2012 14:10
-
mardi 6 mars 2012 14:11
The post is on web custom controls.
I wanted to know about default value in html format.
-
mardi 6 mars 2012 15:10
Billy_mk
I've tried what you said and it is working fine on the TWA and in the Team Explorer.
I've created a new work item and created a default value in the Repro Step field. Saved the work item and then used a value from the TFS database: dbo.WorkItemsLongText to copy and paste the value to the WorkItem Editor as a default value.
What are your steps to create a default value and what value exactly are you using?
Please remember to mark the replies as answers if they help. --- Success, Damir
- Modifié Damir Varga mardi 6 mars 2012 15:11
-
mardi 6 mars 2012 15:47
Hi,
I'm editing the work item's xml file:
<FIELD name="Scenario" refname="xxx.Scenario" type="HTML"> <REQUIRED /> <DEFAULT from="value" value="<P><STRONG>Scenario steps:</STRONG></P><P></P><OL><LI></LI></OL><P></P><P>&nbsp;</P><P><STRONG>The Bug:</STRONG></P><P>&nbsp;</P><P><STRONG>Expected results:</STRONG></P>" /> <HELPTEXT>The scenario of reproducing the bug</HELPTEXT> </FIELD>the text displayed is:
Scenario steps:
The Bug:
Expected results:
even if I set only short string like
<DEFAULT from="value" value="<P><STRONG>Scenario steps:</STRONG></P>" />
I can't seem to save the work item in TWA.
Thanks
-
mardi 6 mars 2012 16:27
Billy,
I'm using following values and it is working fine:
<FieldDefinition refname="Microsoft.VSTS.TCM.ReproSteps" name="Repro Steps" type="HTML"> <DEFAULT from="value" value="<P><STRONG>Repro steps</STRONG></P>
<P>&nbsp;</P>
<OL>
<LI>Hello 1</LI>
<LI>Hello 2</LI>
<LI>Hello 3</LI></OL>" /> <HELPTEXT>How to see the bug. End by contrasting expected with actual behavior.</HELPTEXT> </FieldDefinition>
Maybe it is issue with the Internet Browser? What type/version are you using?Please remember to mark the replies as answers if they help. --- Success, Damir
- Proposé comme réponse Jakcy Wong vendredi 24 août 2012 09:41
-
mercredi 7 mars 2012 07:43
Damir,
Thank you for your response, I'm using explorer 8 and chrome and in both browsers the bug items are not saved if I add the default value.
any ideas?
Thanks.
-
jeudi 8 mars 2012 07:27Modérateur
Hi Bill,
Thanks for your post.
I also reproduced this scenario in my VS 2010 and TFS Web Access too, both create and save work item fine.
Have you tried to create and save that work item using TFS Web Access on other clients? Please try that. And what’s the detailed message you occurred when you can’t save it in Web Access.
If you have any further research of this issue, please share your experience here.
John Qiao [MSFT]
MSDN Community Support | Feedback to us
-
dimanche 11 mars 2012 09:10
Hi,
I tried to save the work item from several clients but the work items are not saved.
I don't get any error message but the "Saving" message is displayed, and if I don't close it manually it's stays for hours.
If I remove the default value the items are saved.
-
lundi 12 mars 2012 07:02Modérateur
Hi Bill,
Thanks for your reply.
Please try to create and add(using TFS Power Tools) the following field in your Work Item Type, then test this field in VS and TFS Web Access separately.
<FieldDefinition refname="demo.html" name="HTML" type="HTML">
<REQUIRED />
<DEFAULT from="value" value="<P>Expect result:</P> <P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1&nbsp; Steps</P> <P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2&nbsp; Steps</P> <P>&nbsp;</P>" />
</FieldDefinition>
John Qiao [MSFT]
MSDN Community Support | Feedback to us
-
vendredi 24 août 2012 09:42
It woks well for TWA and Team Explorer.Billy,
I'm using following values and it is working fine:
<FieldDefinition refname="Microsoft.VSTS.TCM.ReproSteps" name="Repro Steps" type="HTML"> <DEFAULT from="value" value="<P><STRONG>Repro steps</STRONG></P>
<P>&nbsp;</P>
<OL>
<LI>Hello 1</LI>
<LI>Hello 2</LI>
<LI>Hello 3</LI></OL>" /> <HELPTEXT>How to see the bug. End by contrasting expected with actual behavior.</HELPTEXT> </FieldDefinition>
Maybe it is issue with the Internet Browser? What type/version are you using?
Please remember to mark the replies as answers if they help. --- Success, Damir

