ServiceDesk

 View Only
  • 1.  Show all equipment attached to a location on GeneralIncidentSubmitForm

    Posted Aug 14, 2013 09:35 AM

    Hi.

    I would modify workflow GeneralIncidentSubmitForm to allow user to select any equipment that is attached to his location.

    i already modified asset search model and i used the component "Get Assets for location".
    But the result is not correct. It always give all asset regardless selected location.
    I don't find why and what i do bad.

    any suggestion?

    Thanks.



  • 2.  RE: Show all equipment attached to a location on GeneralIncidentSubmitForm

    Broadcom Employee
    Posted Aug 20, 2013 12:56 PM

    The Get Assets for Location component is simply calling a report from the SMP console. Its a possiblity that the report definiation isn't set properly.  



  • 3.  RE: Show all equipment attached to a location on GeneralIncidentSubmitForm

    Broadcom Employee
    Posted Aug 23, 2013 03:41 PM

    In general, I would strongly advice against doing that in the General Submit form. I do not know the specifics of your environment but generally there is a large number of assets in every Location, making this a very expensive (time/performance-wise) change. You would at least want to put that search to an embedded model and enable caching on it so that you wouldn't query SMP every time.

    What version of ServiceDesk are you trying this on? The component with location search should search just fine. I don't have a test box handy but the one thing I can think of is that IIRC search criterias work with GUIDs, not names.



  • 4.  RE: Show all equipment attached to a location on GeneralIncidentSubmitForm

    Posted Sep 04, 2013 09:39 AM

    Hi.

    Due to our organization, there are only few asset by location (between 10 or 20 assets).

    I use v7.1 SP2 of ServiceDesk. I also tried to use this component in a new project just to test it. Result was the same, all assets are given regardless the location selected (criteria is Location ID)

    GetAssetsForLocation.jpg

     

    If component only call a report, can you tell me which it is? 

     



  • 5.  RE: Show all equipment attached to a location on GeneralIncidentSubmitForm

    Posted Sep 04, 2013 10:08 AM

    The report is just named Assets By Location. It MIGHT be hidden in the console.

    The guid of the report item is {8e05b836-d1e6-4c6e-83c1-1c3fc8067fe0}. It you need to make it visible, just set the Attributes of the item row for it equal to zero in the CMDB.

    If you do alter the report, it is important to NOT add, remove, or change the name of columns returned. Jusst due to the fact that it will conflict with the generated report comp associated with it. I would export the report item to XML first, just so you can reimport it back if you make a mistake.



  • 6.  RE: Show all equipment attached to a location on GeneralIncidentSubmitForm

    Posted Sep 04, 2013 10:43 AM

    ok.

    i found this report and make it visible.

    indeed, it doesn't seem to work well. Location is empty for all assets on this report (with IT Analytics / Assets by location, locations are not empty).

    Sql is not my speciality... so it will take me a little bit more time to find why it doesn't work.
    If you have any idea....



  • 7.  RE: Show all equipment attached to a location on GeneralIncidentSubmitForm

    Broadcom Employee
    Posted Sep 17, 2013 10:20 AM

    Looking at the report, you want to change it to use just a normal join instead of left join for ResourceAssociation. If you did what reecardo suggested, you already have the report visible in the Symantec Management Console and editable.

    Find this line in the Data Source > Parameterised Query tab and remove the left from the beginning:
    left join ResourceAssociation raAL

    Then save the report and see if that works better.

    After you have finished changing it, I would definitely recommend setting the Attributes for the report back to where it was (19).



  • 8.  RE: Show all equipment attached to a location on GeneralIncidentSubmitForm
    Best Answer

    Posted Sep 19, 2013 06:03 AM

    Hi.

    Finally, i've modified the join on resourcesAssociation. Put normal join instead of left join was not enough.

    A test on the ChildResourceGuid was necessary to make correct join. Here is the final query:inner join

    select distinct vi.[Name] As [AssetName],
    va.[_ResourceGuid] [_ResourceGuid], va.[Asset Type] [Asset Type], va.[Asset Tag] [Asset Tag], htLoc.Name [Location], va.[Serial Number] [Serial Number], va.[System Number]    
          from    
           vAsset va
    left outer Join vItem vi on vi.[Guid] = va.[_ResourceGuid]
           join ResourceTypeHierarchy rth    
            on (rth.ResourceTypeGuid = va._ResourceTypeGuid)    
           left join ResourceAssociation raAL    
            on (raAL.ResourceAssociationTypeGuid = '05DE450F-39EA-4AAE-8C5F-77817889C27C')    
            and (raAL.ParentResourceGuid = va._ResourceGuid)    
           inner join fnAssetHierarchyTreeExcludeChildren    
           (    
            '834BC951-D70F-48F4-9E8E-D7E32C68788D',    
            '',    
            default,    
            '%LocationId%',    
            default    
           ) htLoc    
             on (htLoc.Guid=raAL.ChildResourceGuid)
          order by [Asset Type], htLoc.[Name]

     

    All seems to be good now.

    thanks for your help.