Posts Tagged: ‘Authoring’

Extend the Software Item class with licensing information

February 3, 2011 Posted by Anders Asp

Some customer wants to keep track on how certain software are licensed, and one way to do that will be described here.

We will extend the Software item class with a list property, populate that list with some values and create a view based upon that licensing information.

  1. Start your Authoring tool and create a new Management Pack (MP). I’ll name my MP ExtensionOfSoftwareItem.xml
  2. Locate the Class Browser and search for Software Items (If the list is empty, hit the refresh/reload content button first). Right click the Software Items class and choose View.
  3. The sealed MP in which the original Software items class is stored will be loaded in the authoring tool. Next we will have to right click the Software Items class and select Extend class.
  4. A dialogue asking in which MP we want to store our customizations will appear. Press Ok to save it in the MP we just created.
  5. Now we have came to the step where we do the actual extension, so let’s hit the Create Property button.
  6. Enter a good name for our new property and press Create. I’ll name mine SoftwareLicense.
  7. The new property which we just added will be of the default Data Type string. What we would like to do, is creating a list of different licensing models, and in order to do that, we need to change the Data Type to List. So press the dropdown meny labeled Data Type in the Details window and select list. (You might need to press the enter key after you’ve selected List)
  8. A new dialogue box will appear in which all existing lists will be presented. But since our list doesn’t exist, we need to create a new one. So press the Create List… button.
  9. Enter a Internal name, a display name and a description and press Create followed by Ok.
  10. That’s actually all we need to do in the Authoring Tool. If the Software items class would have it’s own form, we could have edited that form to place our new list where we wanted it, but since it’s based upon the generic form, we won’t need to do that. So let’s save our MP and import it into Service Manager. (To import the MP, go to Administration -> Management Packs in the SCSM console and use the import task on your right hand side)
  11. After the MP has been imported, our new list should appear under Library -> Lists. So let’s go there and add a few licensing models.
  12. Now let’s go to the All Software view in the Configuration Items wunderbar. Locate a software CI of your choice and open it. The form should now have additional field named Software License.
  13. So you are now able to assign a software license form for all your applications, great. But if you would like to see all your Software Items in a fast and easy way, we would need to create a view for that. So let’s do that as well.Right click on the folder on your left hand side named Software and select Create view, or click the task on your right hand side that is named the same.
  14. Give the view an appropriate name and scroll down to the Criteria section. The default class here will be Configuration Item, so let’s change that to Software Items instead. Do that by pressing the Browse button. In this dialogue box, we will have to change the view to “All basic classes” first. Then we can do a search for Software Items. When you have located Software Items class, mark it and press ok.
  15. Now we can select the criteria for this view. Leave the Object status does not equal Pending delete as it is, but mark Software Licens in the list and press Add. A new row should appear in the Criteria box below. Let’s edit that so it says Software License Equals Freeware.
  16. The last and final step of creating the view, is to select which information the view should display. In this example I’ll just choose Display Name, Software license and Time added. After you’ve selected which columns to display, press Ok.
  17. Your new view should now be created and should only view the Software items in which we have spcified the Software license as Freeware.

To sum up: We extended the Software Items class in the Autoring Tool with a property of the type list. We then added some items to this list and created a view based on on of those values. This is a pretty common task for anyone working with Service Manager, and with the help of the Authoring tool it is an easy thing to do.

How to create a view that has two “AND” in criteria instead of “AND” and “OR”

January 28, 2011 Posted by Stefan Allansson

There is a default view called “All open incidents”, that shows all incidents except resolved and closed.
Maybe you want to create a new view that shows all incidents except resolved and closed and has a specific Support Group(in my case the Support Group is called IT-Support)

If you do that in the console, the criteria look like this:


Everything seems good so far, but when you open that view you will see all incidents, including resolved and closed incidents. So how do you solve this?
We have to do some changes in the XML file.
Right click your view and choose edit to see which management pack you have saved it into:


Export your management pack and open your XML file.

If you have more views in the same management pack, you can search in the file for a display name that matches your view.

<DisplayString ElementID=”View.a1ac40bb826b49d88485931b22022ece”>
          <Name>IT-Support Open Incidents</Name>

Do a new search in the XML file for the name that represents the “DisplayString ElementID”. In my case View.a1ac40bb826b49d88485931b22022ece, and you will find this:

<View ID=”View.a1ac40bb826b49d88485931b22022ece”

Scroll down a little bit more and you find <Criteria>where you have three values for the criteria you specified in your view.
The first criteria, in my case “Support Group” is under <Operator>Equal</Operator> and  the second, which is the status “Resolved” is under <Operator>NotEqual</Operator>.
Between those values there is <Expression>  and <Or>. Delete those two. After the last criteria you have </Or> and </Expression> which you also have to delete.


Save your XML file and import it again.
Restart your console before you open your view.
Now you will see all incidents except resolved and closed incidents.
If you look at your view in edit mode in the console it now looks like this:


And before we edited the XML it looked like this:

How to make the description field in Incident to grow with its content

January 24, 2011 Posted by Anders Asp

Okay, so this is a fairly common request. Quite often you enter more than three lines of text in the description field on an incident, and end up with something like this:

Out of the box behaviour

As you can see (and probably have noticed when working in the console) you’ll get a scrollbar. This make descriptions over several lines very hard to read.

What we want to achive with this blogpost, is to make the description field to grow with it’s content. So let’s get started!

  1. Start the Authoring Tool. For those of you who haven’t installed it yet, you can find the installation package here:
  2. Localize the Form Browser and find the form named System.WorkItem.Incident.ConsoleForm. Right click it and choose View. (If the form browser is empty, try hitting the refresh button once.)
  3. Form Browser

  4. The original Incident form will be loaded and displayed. To be able to customize the form, we need to press the Customize button in the orange header.
  5. A new dialogue box name Targeted Management Pack will be displayed. In this box you will have to specify where you want to save the changes we are about to make. If you haven’t customized the Incident form before, you should hit the New… button. However, if you have customized the form before, you are forced to save these changes within the same management pack (MP). Otherwise you won’t be able to import this  MP into SCSM as we can only have one customization MP per form.
  6. Give the new MP a suitable name, like IncidentFormCustomization, choose where to save it and press Save followed by Ok.
  7. We are now able to customize the form, and all changes will be saved in the MP we defined in the previous step.

    Everything you do at this point, will be written to the MP, even if you change the same value several times. This means, that if you modifiy the same value four times, four “posts” will be added to the MP. My way of tackling this, is to just do the basic things within the authoring tool, and then adjust the settings in the MP itself (with an XML editor). We won’t do that in this post though.
  8. So what we would need to do at this point, is basicly changing the Height property for the description field to Auto. However (you knew it wasn’t going to be that easy, right?), there is some code behind the description field, that will cause this not work as expected. Take a look at the following screenshots:

    Editing the height in the authoring tool Creating a new incident with our customized MP imported Looking at the same incident we just created

    Picture 1: Here is what I changed in the authoring tool
    Picture 2: The MP I created is imported into SCSM and this picture show the incident form when creating a new incident. Hey, it seems to work!
    Picture 3: After saving the incident and re-opening it, this is how it looks. The height of the description field is locked to a fixed value again…

  9.  What we have to do instead, is hiding the original description field and adding our own. First, let’s add the new field by dragging a Text Box from the For Customization Toolbox into our form and release it ontop of our description field. This will cause our new textbox to be placed within the container of the original description field. Be sure that the description field and title is outlined with a grey dashed border, as shown in the picture below.
    How to add a textbox in the authoring tool
  10. Now, click on the original description field, and change the Visibility value from Visible to Collapsed in the Details panel.
    How to change the value to collapsed
  11. Mark the textbox we added in step 8 by clicking on it, and change the following values: Height = Auto, Horizontional Alignment = Stretch, Minimum Height = 55, Width = Auto, Accepts the ENTER key = True, Text Wrapping = Wrap.
  12. Finally, we have to bind this field to the description property. This is done by clicking the … button on Binding Path and selecting Description.
  13. Our MP should now be done, so let’s save it and import it into SCSM (To import the MP in SCSM, go to Administration –> Management Packs. Then choose Import from the list of Tasks)
  14. Now go on and create a incident with a description that span over several lines. If everything was done correctly, the description field should grow whenever needed. You should also try to open the incident after saving it, to make sure the description field works when viewing it in this way.

After importing our new MP, this is how the description field should look like:

The result