Sidehistorik
Prerequsite: A Custom field holding servernames (Her called Affected Devices - customfield_13320)
Kodeblok |
---|
<div id=related style="background-color: #CCFFFFborder: 1px solid #E6E6E6; padding: 5px;">xxxx</div> <script type="text/javascript"> var useraffecteddevices=AJS.$("#customfield_13320-val").text().trim() console.log(affecteddevices); var html = ""; AJS.$.ajax({ url: "/rest/api/2/search?jql='Devices+Affected'+in+%28tidy-ldap01.incuba.e.netic.dk%29%28" + affecteddevices + "%29&tempMax=1000&fields=id,summary&maxResults=1020", type: 'get', dataType: 'json', async: false, success: function(data) { html="<table width=100%>" AJS.$.each(data.issues, function (k, v) { html=html+"<a<tr><td nowrap valign=top><a href='https://jira.netic.dk/browse/" + v.key + "' target=_blank>" + v.key + "</a></td><td valign=top><a href='https://jira.netic.dk/browse/" + v.key + "' target=_blank>" + v.fields.summary + '</a><br>a></td></tr>'; }) html=html+"</table>" AJS.$( "#related" ).html(html); } }); </script> |