4
Vote

Generated document contains HTML tags

description

When I generate a document the description of a workitem contains HTML + the content

Requirement 14: UC1


Description of UC1

My configuration is:
  • Visualstudio.com (e.g. TFS 2012)
  • TFS2010 object model
  • forward compatebility patch
  • word 2007
  • Visual Studio 2010
  • Word Add-in + required office patch + registry change

file attachments

comments

robjarratt wrote Feb 13, 2013 at 8:30 PM

Apologies for the delay in replying.

This will be mismatch between the definition of the field in the layout you are using and type of field in the Team Project. The layout uses a content control, for HTML fields the content control must be Rich Text and not Plain Text. I suggest you try the Layout Designer to edit the layout, delete the problem field and add it back again, taking care to use the actual Team Project you are importing fields from.

Hope this helps

Rob

amujovic wrote Mar 15, 2013 at 4:59 PM

Hey, I'm having the exact same problem as described above, using TFS2012 and Word 2010. The description field is being imported into Word with all the HTML tags. If the description has not been modified with formatting (bold, bullets etc) it imports just fine...

I looked at your suggestion Rob, but, my problem is with the System.Description field. It is Type HTML and the layout type is HtmlFieldControl...

Any help, suggestions would be great, cause this tool is definitely something that we need :)

robjarratt wrote Mar 18, 2013 at 7:59 AM

When the TFS field is of type HTML the content control used in the layout must be a Rich Text content control. You should modify the layout using the Layout Designer. Follow these steps:
  • Open the Layout Designer
  • Connect to your Team Project
  • Select the layout you want to change.
  • Delete each instance of the description field and replace it with the description field in the list of fields. To do this you double-click the field and this adds it to the layout at the current cursor position.
  • When you have done this for all instances of the field, click Save Changes.
Once you have done this any new imports with this layout should format the description correctly.

amujovic wrote Mar 18, 2013 at 7:54 PM

Thanks for the fast response.

I tried deleting and re-adding the control as you said, but, this did not help.

Also, when looking at the layout type options, I do not see the option for Rich Text, only HtmlFieldControl, FieldControl etc..changes to these did not help.

Unless you meant that I should not be using System.Description and instead I should be using a new field. However, field definitions don't have Rich Text type either, only string, integer...html...?

robjarratt wrote Mar 18, 2013 at 9:11 PM

Where are you looking to see HtmlFieldControl etc? I would like to check that we are talking about the same thing; to get to the layout designer you run Word, click on the Team ribbon and select Layout Designer from there. That will open another Word document where you can edit the layout. You should use the task pane on the right to add the System.Description field, from the Team Project you are working with, to your layout.

I apologise in advance if that is already what you are doing, but please confirm this.

Regards

Rob

amujovic wrote Mar 18, 2013 at 10:02 PM

Thank you for clarifying Rob, indeed I was NOT doing that, I thought you meant that I should edit the WIT in Visual Studio lol.

Yes, editing the template in Word definitely fixed the HTML issue. What happens now is Word asks me from which document type to convert, I select HTML and all is well with formatting thank you!

The only thing is, now I have to click OK with every WI that is imported to tell it yes HTML. While for now this is OK since I have 15 WI (so, 15x click OK), this will get rather troublesome when trying to export more...any suggestions?

Thanks again for your help and clarification!

robjarratt wrote Mar 19, 2013 at 11:39 AM

I am puzzled by the prompts you are getting. What exactly are you doing when the prompt comes up and what is the exact message? It looks like you can attach files to posts, could you attach a screenshot?

Thanks

Rob

wschaub wrote Mar 19, 2013 at 3:02 PM

amujovic, can you please use psr.exe steps recorder to record a session of what you are doing? This will give us the exact steps and views you are seeing.

amujovic wrote Mar 19, 2013 at 6:44 PM

Hey guys,

The psr turned out to be 5.2MB (compressed), the limit is 4MB. Here is a screenshot of the issue.

Workflow:
  1. Click Team Tab in Word
  2. Click Import
  3. Select Server and project
  4. Select Query
  5. Select Layout
    System begins importing, pop up occurs (see attachment)
  6. Select OK to import as HTML
    This will import the Description Field correctly. Repeat this step until all WI are imported

wschaub wrote Mar 19, 2013 at 7:28 PM

amujovic, thanks for recording the session. Can you share it temporarily on another share, i.e. SkyDrive, so that we can pull it down and review recording? I will save it in our repo for future reference.

robjarratt wrote Mar 20, 2013 at 9:11 AM

I have never seen that before! I would love to get a repro of this. Can you tell me what version of Word you are using, what version of TFS, which process template are you using etc.

Regards

Rob

amujovic wrote Mar 20, 2013 at 3:37 PM

@wschaub Here is the psr: http://sdrv.ms/WVchaC

@Rob: Word 2010, TFS 2012, MSF for Agile Software Development 6.1

Thanks for your support guys!

robjarratt wrote Mar 21, 2013 at 8:30 AM

Could you post a copy of an empty document created on the problem machine so I can try to repro the problem?

Thanks

Rob

amujovic wrote Mar 22, 2013 at 2:02 PM

Hey Rob,

Here you go, let me know if you need anything else from my end!

:)

robjarratt wrote Mar 25, 2013 at 8:31 AM

I was unable to repro the problem with your blank document :-(

Can you repro the problem when using the online TFS service (https://tfs.visualstudio.com/)?

Could you also let me have a screen shot of Word's cut, copy and paste option settings? They are on the Advanced options page. There is also a Settings button in those options, can you include those settings in the screen shot too please?

Thanks

Rob

amujovic wrote Mar 25, 2013 at 6:44 PM

Here you go Rob.

Could it be related to how it opens - is there a setting somewhere that tells word to take the last used type by default or to make a guess without prompting when opening? Or is the importer copy/pasting?

amujovic wrote Mar 25, 2013 at 6:57 PM

On a hunch, I changed the Options->Advanced->General "Confirm conversion at Open" from checked to unchecked and now it is processing beautifully! No problems here now, and I am loving this tool!

Just wanted to share the info just in case someone else runs into this problem.

Thank you so much guys for your time and attention to this, it is GREATLY appreciated. You rock!

robjarratt wrote Mar 25, 2013 at 10:14 PM

Thanks for spotting this setting. I had been hunting around for a setting like this and had failed to spot it. I should now be able to repro the problem and hopefully produce a fix that prevents this setting affecting the operation of the tool.

Thanks again for your help in finding this!

Regards

Rob

robjarratt wrote Mar 26, 2013 at 10:10 PM

I have been able to repro the issue and have a fix. The fix will be in the next release.

Thanks for bringing this bug to our attention!

Regards

Rob