- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-18-2024 05:29 AM
Hi,
I am modifying one catalog where I need to manipulate the short description.
My current short description is like "Configuration Incident Response Team - P2P - AnyERP Task - High Memory/CPU - Tenant: KOK - SIDK - ServiceProvider"
but my requirement is "Configuration Incident Response Team - P2P - AnyERP Task - High Memory/CPU - Tenant: ServiceProvider"
So I want to remove this KOK - SIDK from every ticket.
So basically this "KOK - SIDK" is a prefix for each and every tenant but we don't want it in short discription. So how to remove this?
Current code is :
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-18-2024 05:39 AM - edited 09-18-2024 05:39 AM
To remove the prefix "KOK - SIDK" from the short description, add the following code immediately after the line:
// current.short_description += producer.Issue_Category + " - " + "Tenant: " + producer.getDisplayValue("cmdb_ci");
Insert this code
Please mark this response as Correct and Helpful if it helps you can mark more that one reply as accepted solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-18-2024 06:23 AM
okay @Eshwar Reddy
I just made a few changes:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-18-2024 06:24 AM
@ArunG29061990
Cool
my pleasure
Please mark this response as Correct and Helpful if it helps you can mark more that one reply as accepted solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-18-2024 06:31 AM - edited 09-18-2024 06:57 AM
@Eshwar Reddy one quick thing:
can we remove " - " (with space) from ServiceProvider as well?
- ServiceProvider
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-18-2024 07:06 AM - edited 09-18-2024 07:06 AM
@ArunG29061990
Yes it is possible just update prefixToRemove
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-18-2024 07:08 AM - edited 09-18-2024 07:13 AM
yeah, I tried the same (var prefixToRemove = "KOK - SIDK - "😉 but it breaks the code.
after adding this it even stopped removing KOK - SIDK
so now the result is showing like
Configuration Incident Response Team - P2P - AnyERP Task - High Memory/CPU - Tenant: - ServiceProvider
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-19-2024 02:48 AM
@Eshwar Reddy the main problem is var is not considering the value - so we need to check how var can consider this - (hyphen) as well.