ServiceDesk has the ability to import the knowledge base libraries created for Help Desk 6. This is very helpful in allowing customer who spent considerable time and energy creating a knowledge base library and don't want to have to recreate them in a new server or leave their existing Help Desk 6 server running to house their Knowledge Base.
The SD.KBMigrationWizard project is not a user editable project. However it was decided that the need to modify this project was necessary, especially with the fact that with the next release of ServiceDesk the options to import Helpdesk 6 incidents and knowledge base articles is being removed.
Problem
The Knowledge Base Migration project was designed to only import Help Desk 6 articles that were created using the Problem / Cause / Solution template. However Help Desk had two default templates the aforementioned Problem and a Question / Answer template.
Since the wizard was designed only to import Problem articles any articles created with the Question template or a custom template generates an error and fails to import.
Solution
Attached to this article is an updated SD.KBMigrationWizard that has been updated with the necessary logic to properly read and process articles created using the Question / Answer template. I will also discuss what additional modification would need to be made to the project to handle additional template formats. Changes made to attached project.
The SD.KBMigrationWizard project required modifying a single model inside the project to enable the ability to properly process the Question / Answer articles. These modifications were made to the GetKBComment model. The screen shot below shows the modifications made in the model.
Going over the modifications
By default this model contains 3 blocks containing a Text Matches Rule, Add New Data Elements, the Extract Text linked model, a Texts Exists, and finally a Merge HTML component in each block.
Modifying the Text Matches Rule
The Text Matches Rule is to find the HTML header information for each section of knowledge base article. In this case we are looking to find the Question section of the article. The Help Desk knowledge base creation tool created the section header information using one of four styles. The styles vary between using single & double quotes and having spaces before & after the section heading.
<div class="articleSection"> Question:</div>
<div class='articleSection'> Question:</div>
<div class="articleSection">Question:</div>
<div class='articleSection'>Question:</div>
If you have a custom template you would change the text Question: to match you're heading.
Modifying the Set Element components
The Set Element components are used to define the header text information that is used in the Extract Text linked model. The value of this variable that is set needs to match the text value that it's connected to from the Matches Rule.
Modifying the Extract Text Linked Model
The only modification that needs to be done to the Extract Text Linked model is to simply change the Return Mapping of the model saved the ExtractedText variable into a new variable called the same as your article section. In this case we called the variable Question.
Modifying the Text Exists Rule
This component needs to be modified to now reference your newly created variable that contains the text outputted from the Extract Text linked model. In this case it checks to make sure Question exists.
If you examine the previous screen shot showing all the modifications made to the GetKBComment model you will see that a Copy Data to New Location component exists in the modified section that doesn't exist in the original Problem / Cause / Solution section of the model. The reason for this is that the linked model is configured to always return the variable Problem as output. This variable is then used later in the project to create the new knowledge base articles summary text. To keep the modification simple we simply copy the contents of the variable Question into Problem.
Modifying the Merge HTML component
The Merge HTML component is used to build the body of the new article. As the project moves through the model it will build upon the ArticleBody variable to create the layout of the new article. As this component is currently the first section defined in the Question / Answer template we configure the component as it is shown in the screen shot.
Now the screen shot doesn't show it, but the text Question: is set to be bolded.
The merge component will look a little different for the Answer section of the model as you need to make sure that it included the previously merged text.