Sidehistorik
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:
Kodeblok |
---|
<a id=list1list0 href="" target="_incidentlistblank" class="aui-button aui-button-primary" aui-style"> Click to see Incident-list for the Machine</a> <a id=list2 href="" target="_tasklist" class="aui-button aui-button-primary aui-style"> Click to see task-="background-image: linear-gradient(rgb(200, 200, 200) 0%, rgb(100,100,100) 100%); border-color: white;"> Complete list for the Machine</a> <script language=javascript> var machinenumber=(AJS.$("#customfield_10400-val").text().trim()); if (machinenumber != '') { var jql1jql0='"Machine Number" =~ "' + machinenumber + '" AND IssueType="Incident" ORDER BY CREATED DESC'; var httpurl1httpurl0='https://jira.nilpeter.com/issues/?jql=' + jql1; AJS.$("#list1").attr('href', httpurl1)jql0; var jql2='"Machine Number" = "' + machinenumber + '" AND IssueType="Task" ORDER BY CREATED DESC'; var httpurl2='https://jira.nilpeter.com/issues/?jql=' + jql2; AJS.$("#list2#list0").attr('href', httpurl2httpurl0); } else { AJS.$("#list1#list0").hide(); AJS.$("#list2").hide(); } </script> |
Gives:
The Style
Kodeblok |
---|
style="background-image: linear-gradient(rgb(200, 200, 200) 0%, rgb(100,100,100) 100%); border-color: white;" |
Gives the alternate color (grey)