Parent service on Incident is not lised in Business Service

thereseg
Kilo Contributor

Hi,

On our Incident/Problem and Change forms we ask our users to fill in Service Offering and from there we automatically populate the "Parent Service" (the Business Service connected to the Service offering).

When I was looking into the Business services to see how many incidents we've had on the Business Service as a whole (Not just the sub-part of the different Service Offerings) all the related lists were empty (Task, Incident, Change etc).

Somehow even though each incident has a Business Service listed as Parent service I have nothing linked to the Business Service.

As we are looking into starting using the outage module and measuring availability (on Service Offering and by extension Business Services) this is crucial for us.

Can anyone advise why these aren't connected? Looking up Business Service there are no related records

Here are some of the technical specs that might be interesting.

On service offering we have a field called "Parent Service" which links the Service Offering to a Business Service.

Dictionary Info:

service_offering.parent       Close

Table: cmdb_ci_service

Field: parent

Type: reference

Reference: cmdb_ci_service

On our Incident Form we have the following fields:

find_real_file.png

Dictionary Info:

incident.service_offering       Close

Table       task

Field       service_offering

Type       reference

Reference       service_offering

Dictionary Info:

incident.service_offering.parent       Close

Table       task

Field       service_offering

Type       reference

Reference       service_offering

Thanks

1 ACCEPTED SOLUTION

I was assuming you were trying to access existing data. If you're building a new capability or enhancing current, you could certainly populate the Incident.Business Service field with Incident.Service Offering.Parent.



The SO Parent field must reference a Business Service or another Service Offering--Service Offering is extended off of Business Service.


View solution in original post

7 REPLIES 7

Ah, I see.


Your assumption is incorrect. That "Parent" field shown on the incident is not a direct relationship. It's actually a "related" or "derived" field, so you won't be able to directly see the list on a business service form.



In my example, the Offering is "1-User phone system" and the Parent service is "Voice Communication". In your screenshot above, notice the Filter parameter on the "Incident" related list shown: Business service = OGS


I'll assume that the other "Incident" related list is actually Configuration Item = OGS



The query being run to show incidents is on the Incident table, so you have to think about the report we made first -- Service offering > Parent.



Now in this example (and your system also), the "Business service" field is blank:


Screen Shot 2017-03-31 at 9.56.59 AM.png



In order to get a Related List with data, we have to replicate the report query we ran. In order do that, you have to create a custom relationship record.


1. Navigate to System Definition > Relationships and create a new one.


Make the form look like mine:


Screen Shot 2017-03-31 at 10.02.29 AM.png


Script:


(function refineQuery(current, parent) {


      current.addQuery("service_offering.parent", parent.sys_id);


})(current, parent);



2. Then, add your new relationship as a related list on the "Business Service" form (note that the related list name is the same as we gave it in step 1 above, and there's no "->" indicator in the name, showing that it's a custom query):


Screen Shot 2017-03-31 at 10.03.42 AM.png



3. Now, you'll see the data you're looking for on the "Voice Communication" Business Service record!


Screen Shot 2017-03-31 at 10.04.12 AM.png


thereseg
Kilo Contributor

Hi,



I understand what your saying but since we have a Business Service field on Incidents and   Business Service -> Incident related lists wouldn't it be easier to automatically populate Business Service from Service Offering on the Incident form (Now that I Realize that Parent does not do this)?



There should be a link between Service Offering and Business Service out of the box I could use right?



Does the "Parent" of a Service Offering have to be a Business Service? Because in that case it should be possible to populate Business Service on the Incident based using parent right?



As I said I'm a newbie at this.


I was assuming you were trying to access existing data. If you're building a new capability or enhancing current, you could certainly populate the Incident.Business Service field with Incident.Service Offering.Parent.



The SO Parent field must reference a Business Service or another Service Offering--Service Offering is extended off of Business Service.