kb affected products
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-14-2011 04:33 AM
Hi all,
we have a macro named kb_affected_products in Service now.What this macro does is it makes a List of products to which a Knowledge article pertains. Now as per my requirement i want when name of CI attached to particular knowledge article is list user should be able to click that ci link and go to particular ci.
Current code
<?xml version="1.0" encoding="utf-8" ?> <j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null"> <!-- list of products to which this article pertains --> <j:set var="jvar_kb_show_products" value="${gs.getProperty('glide.knowman.affected_products.display','true')}"/> <j:if test="${jvar_kb_show_products}"> <g2:evaluate var="cis" jelly="true" expression=" var cis = new GlideRecord('m2m_kb_ci'); cis.addQuery('kb_knowledge','$[kb.sys_id]'); cis.orderBy('cmdb_ci.name'); cis.query(); "/> <j2:if test="$[cis.hasNext()]"> <tr> <td width="99%" class="label label_spacing" style="background-color:#eeeeee;"> <span style="margin-right:3px; margin-left:1px;">$[SP]</span>Affected products:</td> <td> <j2:while test="$[cis.next()]"> <div> <img src="images/icons/kb_ci.gifx" alt="$[HTML:cis.cmdb_ci.name]" />$[HTML:cis.cmdb_ci.name] </div> </j2:while> </td> </tr> </j2:if> </j:if> </j:jelly>
Thanks
- Labels:
-
Knowledge Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-17-2011 03:23 PM
Hi--
I asked around on this and the general consensus seems to be that this goes into enhancement request territory.
Cheers,
Wally
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-28-2011 04:00 AM
thanks guys !!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-17-2011 04:34 PM
If you really want to customize (and thus own, so you don't get future updates to) that UI Macro, you could replace the div with the following:
<div>
<img src="images/icons/kb_ci.gifx" alt="$[HTML:cis.cmdb_ci.name]" />
<j2:if test="$[cis.cmdb_ci.canReadRef()]">
<a href="$[HTML:cis.cmdb_ci.sys_class_name].do?sys_id=$[cis.cmdb_ci]">$[HTML:cis.cmdb_ci.name]</a>
</j2:if>
<j2:if test="$[!cis.cmdb_ci.canReadRef()]">
$[HTML:cis.cmdb_ci.name]
</j2:if>
</div>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-17-2011 09:22 PM
By the way, I just checked this in as an enhancement for the next Release. If you can wait, you'll get it for free without having to customize/own that UI Macro.
It was a good idea. Thanks!
--J