|
From: <lac...@us...> - 2007-10-05 08:46:25
|
Revision: 56
http://td2jira.svn.sourceforge.net/td2jira/?rev=56&view=rev
Author: lacostej
Date: 2007-10-05 01:46:29 -0700 (Fri, 05 Oct 2007)
Log Message:
-----------
add a config parameter to fail if a mapping between a TD user and Jira user is missing
Modified Paths:
--------------
trunk/td2jira/docs/ReleaseNotes.txt
trunk/td2jira/etc/td2jira.properties.example
trunk/td2jira/src/td2jira/Config.java
Modified: trunk/td2jira/docs/ReleaseNotes.txt
===================================================================
--- trunk/td2jira/docs/ReleaseNotes.txt 2007-10-05 08:19:57 UTC (rev 55)
+++ trunk/td2jira/docs/ReleaseNotes.txt 2007-10-05 08:46:29 UTC (rev 56)
@@ -17,6 +17,7 @@
TODO document differences between both connectors
* FEATURE Add support for setting up priority when creating the issue and updating it.
The list of priorities is currently hardcoded to the default JIRA / TD settings. See Config class
+* FEATURE add a config parameter to fail if a mapping between a TD user and Jira user is missing
Old release
Modified: trunk/td2jira/etc/td2jira.properties.example
===================================================================
--- trunk/td2jira/etc/td2jira.properties.example 2007-10-05 08:19:57 UTC (rev 55)
+++ trunk/td2jira/etc/td2jira.properties.example 2007-10-05 08:46:29 UTC (rev 56)
@@ -33,6 +33,8 @@
jira.project=FILLME
jira.summary.prefix=FILLME
jira.assign.to=FILLME
+# uncomment if you want td2jira to fail when a mapping between a TD assignee and Jira is missing.
+#jira.assignee.required=true
# HTTP Proxy, if required
# http.proxyHost=myproxy.here.com
Modified: trunk/td2jira/src/td2jira/Config.java
===================================================================
--- trunk/td2jira/src/td2jira/Config.java 2007-10-05 08:19:57 UTC (rev 55)
+++ trunk/td2jira/src/td2jira/Config.java 2007-10-05 08:46:29 UTC (rev 56)
@@ -37,6 +37,7 @@
public static String TD_READ_ONLY = "td.readonly";
public static String TD_PASSWORD = "td.password";
public static String JIRA_ASSIGN_NEW_ISSUE_TO = "jira.assign.to";
+ public static String JIRA_ASSIGNEE_REQUIRED = "jira.assignee.required";
public static String TD_LEAD = "td.lead";
public static String SYNC_RULES = "sync.rules";
@@ -150,7 +151,12 @@
}
public static String getJIRADeveloperForTDDeveloper(String assignedInTD) {
- return tdDevelopersToJiraDevelopers.get(assignedInTD);
+ String jiraDeveloper = tdDevelopersToJiraDevelopers.get(assignedInTD);
+ boolean assigneeRequired = Config.JIRA_ASSIGNEE_REQUIRED.equals("true");
+ if (jiraDeveloper == null && assigneeRequired) {
+ throw new IllegalStateException("Missing Jira assignee mapping for TD assignee: " + assignedInTD);
+ }
+ return jiraDeveloper;
}
// public static String getProperty(String key, String defaultValue) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|