priority state and etc fields values are not included in the incident XML

KushalL
Tera Contributor

I exported the incident xml, and found the priority , state, impact and etc values are missing only the id is present.

<impact>3</impact>
<incident_state>1</incident_state>
<state>2</state>

i need to value to be present in the exported xml as mentioned below, how to achieve ?

<state>New</state>
3 REPLIES 3

GlideFather
Tera Patron

Hi @KushalL,

 

can you please explain how did you get the Incident's XML?

 

If you are on a particular Incident, click the three bars and then:

GlideFather_0-1756059929087.png

 

and there it is:

GlideFather_1-1756059956808.png

 

Let me know how did you happen to get a XML without Priority as this field is calculated based on metrics of Urgency and Impact and these can never be empty and thus Priority can neither be empty at any situation...

———
/* If my response wasn’t a total disaster ↙️ drop a Kudos or Accept as Solution ↘️ Cheers! */


Bhuvan
Tera Sage

@KushalL 

 

It is expected behavior, take for example below incident record

Bhuvan_0-1756074248784.png

When you check xml for the record, you can see choice and reference data type fields would have integer value and sys_id value. 

Bhuvan_1-1756074248864.png

For example, take priority field which is a choice data type. In the incident record you can see display value is '5 - Planning' but backend database it would be stored as 5. Similarly, for reference fields, it would show sys ID in the database and you can use getDisplayValue() function to show the display value.

Bhuvan_2-1756074248931.png

If this helped to answer your query, please mark it helpful & accept the solution.

 

Thanks,

Bhuvan

@KushalL 

 

Did you get a chance to review this ?

 

If my response helped to answer your query, please mark it helpful & accept the solution.

 

Thanks,

Bhuvan