Du ser en gammel version af denne side. Se den nuværende version.

Sammenlign med nuværende Vis sidehistorik

Version 1 Næste »

Using the combined facilities of Making a ADG like button and Getting a field value in Read Mode - we can make a button to display a JQL search in a window:

<a id=list1 href="" target="_incidentlist" class="aui-button aui-button-primary aui-style">
Click to see Incident-list for the Machine</a>
&nbsp;
<a id=list2 href="" target="_tasklist" class="aui-button aui-button-primary aui-style">
Click to see task-list for the Machine</a>
<script language=javascript>
var machinenumber=(AJS.$("#customfield_10400-val").text().trim());
if (machinenumber != '')
{
var jql1='"Machine Number" = "' + machinenumber + '" AND IssueType="Incident" ORDER BY CREATED DESC';
var httpurl1='https://jira.nilpeter.com/issues/?jql=' + jql1;
AJS.$("#list1").attr('href', httpurl1);
var jql2='"Machine Number" = "' + machinenumber + '" AND IssueType="Task" ORDER BY CREATED DESC';
var httpurl2='https://jira.nilpeter.com/issues/?jql=' + jql2;
AJS.$("#list2").attr('href', httpurl2);
}
else
{
AJS.$("#list1").hide();
AJS.$("#list2").hide();
}
</script>

Gives:

 

  • Ingen etiketter