You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@community.apache.org by hu...@apache.org on 2019/08/06 10:37:28 UTC

svn commit: r1864500 - /comdev/reporter.apache.org/trunk/site/getjson.py

Author: humbedooh
Date: Tue Aug  6 10:37:28 2019
New Revision: 1864500

URL: http://svn.apache.org/viewvc?rev=1864500&view=rev
Log:
sometimes another TLP has our TLP as category, but that doesn't mean it's our JIRA. So check if it belongs elsewhere, and only append to our list if not.

Modified:
    comdev/reporter.apache.org/trunk/site/getjson.py

Modified: comdev/reporter.apache.org/trunk/site/getjson.py
URL: http://svn.apache.org/viewvc/comdev/reporter.apache.org/trunk/site/getjson.py?rev=1864500&r1=1864499&r2=1864500&view=diff
==============================================================================
--- comdev/reporter.apache.org/trunk/site/getjson.py (original)
+++ comdev/reporter.apache.org/trunk/site/getjson.py Tue Aug  6 10:37:28 2019
@@ -156,9 +156,16 @@ def getJIRAProjects(project):
         pass
     
     for entry in x:
-        if entry['name'].replace("Apache ", "").strip().lower() == project:
-            jiras.append(entry['key'])
-        elif 'projectCategory' in entry and fixProjectCategory(entry['projectCategory']['name']) == project:
+        # Check if this is actually a TLP not ours
+        mayuse = True
+        for xtlp in charters:
+            if xtlp['name'] == entry['name'] and xtlp['id'] != project:
+                mayuse = False
+                break
+            elif xtlp['name'] == entry['name'] and xtlp['id'] == project:
+                jiras.append(entry['key'])
+                break
+        if mayuse and 'projectCategory' in entry and fixProjectCategory(entry['projectCategory']['name']) == project:
             jiras.append(entry['key'])
     return jiras