community-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1760330 - /comdev/reporter.apache.org/trunk/site/render.js
Date Mon, 12 Sep 2016 10:19:38 GMT
Author: sebb
Date: Mon Sep 12 10:19:38 2016
New Revision: 1760330

URL: http://svn.apache.org/viewvc?rev=1760330&view=rev
Log:
Show likely JIRA keys for import dialog

Modified:
    comdev/reporter.apache.org/trunk/site/render.js

Modified: comdev/reporter.apache.org/trunk/site/render.js
URL: http://svn.apache.org/viewvc/comdev/reporter.apache.org/trunk/site/render.js?rev=1760330&r1=1760329&r2=1760330&view=diff
==============================================================================
--- comdev/reporter.apache.org/trunk/site/render.js (original)
+++ comdev/reporter.apache.org/trunk/site/render.js Mon Sep 12 10:19:38 2016
@@ -689,7 +689,12 @@ function renderFrontPage(json) {
 		dialog.setAttribute("id", "dialog_" + pmc);
 		dialog.setAttribute("title", "Fetch data from JIRA for " + pmc)
 		dialog.setAttribute("style", "display: none;")
-		dialog.innerHTML = "<form><b>JIRA Project:</b><input type='text' name='jira'
placeholder='FOO'><br><b>Optional prepend:</b> <input name='prepend'
type='text' placeholder='Foo'/><br>"+
+        if (jsdata.keys[pmc] && jsdata.keys[pmc].length > 0) {
+            dialog.innerHTML = "<p>Suggested JIRA Keys: <kbd>" + jsdata.keys[pmc].join(",
") + "</kbd></p>"
+        } else {
+            dialog.innerHTML = "<p>No JIRA keys found - are you sure this project uses
JIRA?</p>"
+        }
+		dialog.innerHTML += "<form><b>JIRA Project:</b><input type='text'
name='jira' placeholder='FOO'><br><b>Optional prepend:</b> <input
name='prepend' type='text' placeholder='Foo'/><br>"+
 		                   "<input type='button' value='Fetch from JIRA' onclick='fetchJIRA(\""
+ pmc + "\", this.form[\"jira\"].value, this.form[\"prepend\"].value);'></form>"+
 		                   "<p>If you have multiple JIRA projects and they only have the
version number in their release versions, please enter the component name in the 'prepend'
field.</p>"
 		document.getElementById('tab_' + pmc).appendChild(dialog)



Mime
View raw message