locked
Show CI in View RRS feed

  • Question

  • Hi there,

    want to show the display name of a CI in a view for class service request. There are a Service Request (Related Config Item) type projection. Tried to create view based on this type projection. I'm able to select properties from CIs under the tab criteria, but not under view? Is it possible to show a property of a CI with respect to related config items without building a 1-1 relationship in the service request class as it exists for affected user and other?


    • Edited by Zero3000 Thursday, July 9, 2020 5:04 PM
    Thursday, July 9, 2020 5:02 PM

Answers

  • Hi Zero3000, you can create a view with a column pointing to a 1:many relationship, but you need to do this manually in XML. If you follow Andrea's link to the Litware blog post, you find instructions how to do this. However, please note that this approach will only allow you to display the first related item, and not all of them. If you would like to see all related items in one column (e.g. separated by semicolon), you will need to either develop your custom WPF converter, or purchase 3rd party, such as the Enterprise version of the Advanced View Editor.
    • Marked as answer by Zero3000 Thursday, July 30, 2020 8:06 AM
    Monday, July 13, 2020 1:54 PM

All replies

  • Maybe this is helpful: 

    Displaying “one-to-many” data in a Service Manager view


    Andreas Baumgarten

    Friday, July 10, 2020 6:01 AM
  • Hi Zero3000, you can create a view with a column pointing to a 1:many relationship, but you need to do this manually in XML. If you follow Andrea's link to the Litware blog post, you find instructions how to do this. However, please note that this approach will only allow you to display the first related item, and not all of them. If you would like to see all related items in one column (e.g. separated by semicolon), you will need to either develop your custom WPF converter, or purchase 3rd party, such as the Enterprise version of the Advanced View Editor.
    • Marked as answer by Zero3000 Thursday, July 30, 2020 8:06 AM
    Monday, July 13, 2020 1:54 PM
  • Hi,

    in the link above they show how to display a item from relationship "AboutConfigItem" by selecting one item from the array via index notation {Binding Path=AboutConfigItems[0].DisplayName}. If I point to items based on differnt classes in the "AboutConfigItem" relationship, then is it possible to select it via condition like {Binding Path=AboutConfigItem.where(x => x.name =="myclass" )}?  



    • Edited by Zero3000 Monday, July 13, 2020 5:47 PM
    Monday, July 13, 2020 5:44 PM
  • I followed this tutorial to build a converter but with small changes because I want access to the RelatesToConfigItem Relationship. So I create a view on a TypeProjection that contains

    <Component Path="$Target/Path[Relationship='WorkItem_Library!System.WorkItemRelatesToConfigItem']$" Alias="RelatedConfigItem" />

    In my view I build a column where I tried to access the RelatedConfigItem

    <mux:Column Name="PriorityColor" Width="110" DisplayName="Header_LocationCI" Property="Priority" DataType="s:Int32">					
    <mux:Column.CellTemplate>
      <DataTemplate>
    	  <TextBlock Text="{Binding Path=RelatedConfigItem, Converter={x:Static configItem:LocationConverter.Default}}" VerticalAlignment="Center" Margin="0"  HorizontalAlignment="Center"/>
      </DataTemplate>
    </mux:Column.CellTemplate>
    </mux:Column>


    But if I debug my converter I can't find the RelatedConfigItems in the value object. I know I can get all the information I want just by passing a string of the IR-ID. But I accpected that the value object gives me access to the RelatedConfigItem array somehow, but there is no item in "IDataItem obj in (DataItemCollection)value". How to solve this properly?

    • Edited by Zero3000 Wednesday, July 29, 2020 4:19 PM
    Tuesday, July 28, 2020 9:24 AM