Sidehistorik
Now-a-days:
Tip |
---|
Along the line, I have replaced this with the excellent Issue Matrix add-on, that can do this, and better. Real neat and GUI configurable add-on |
Prerequsite:
A Custom Field holding servernames (Her called Affected Devices - customfield_13320)
...
Kodeblok |
---|
<img src="collapse.jpg" onclick="AJS.$('#related').toggle('fast');"> <div id="related">No Issues found</div> <script type="text/javascript"> AJS.$("#rowForcustomfield_14236").css("display","none") var affecteddevices=AJS.$("#customfield_13320-val").text().trim() var html = ""; AJS.$.ajax({ url: "/rest/api/2/search?jql='Devices+Affected'+in+%28" + affecteddevices + "%29+or+summary+%7E'" + affecteddevices + "'+order+by+updated+desc&tempMax=1000&fields=id,summary,priority,updated&maxResults=15", type: 'get', dataType: 'json', async: false, success: function(data) { html="<table width=100%><tr><th width=25 align=center><b>P</b></th><th nowrap><b>Key</b></th><th><b>Summary</b></th><th nowrap><b>Updated</b></th></tr>" AJS.$.each(data.issues, function (k, v) { html=html+"<tr><td valign=top width=25 align=center><img src='" + v.fields.priority.iconUrl +"'><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></td><td nowrap>' + v.fields.updated.substring(0,10) + '</td></tr>'; }) html=html+"</table>" AJS.$("#related").html(html); AJS.$("#related").css("border","1px solid #E6E6E6") AJS.$("#related").css("padding","5px") AJS.$("#rowForcustomfield_14236").css("display","block") } }); </script> |
...
Screnshot: