Shinichiro Abe created CONNECTORS-761:
-----------------------------------------

             Summary: Jira connector, we can't save a conneciton
                 Key: CONNECTORS-761
                 URL: https://issues.apache.org/jira/browse/CONNECTORS-761
             Project: ManifoldCF
          Issue Type: Bug
          Components: JIRA connector
            Reporter: Shinichiro Abe
             Fix For: ManifoldCF 1.3


In Jira authority/repository connector, We can not create connections because 
there is startsWith method in JS file.

Then to fix this below:
{noformat}
Index: 
connectors/jira/connector/src/main/resources/org/apache/manifoldcf/authorities/authorities/jira/editConfiguration_jira_server.js
===================================================================
--- 
connectors/jira/connector/src/main/resources/org/apache/manifoldcf/authorities/authorities/jira/editConfiguration_jira_server.js
    (revision 1507207)
+++ 
connectors/jira/connector/src/main/resources/org/apache/manifoldcf/authorities/authorities/jira/editConfiguration_jira_server.js
    (working copy)
@@ -33,7 +33,7 @@
     return false;
   }
 
-  if (editconnection.jirapath.value != "" && 
!editconnection.jirapath.value.startsWith("/"))
+  if (editconnection.jirapath.value != "" && 
editconnection.jirapath.value.lastIndexOf("/", 0) != 0)
   {
     
alert("$Encoder.bodyJavascriptEscape($ResourceBundle.getString('JiraAuthorityConnector.JiraPathMustBeginWithASlash'))");
     editconnection.jirapath.focus();
@@ -78,7 +78,7 @@
     return false;
   }
   
-  if (editconnection.jirapath.value != "" && 
!editconnection.jirapath.value.startsWith("/"))
+  if (editconnection.jirapath.value != "" && 
editconnection.jirapath.value.lastIndexOf("/", 0) != 0)
   {
     
alert("$Encoder.bodyJavascriptEscape($ResourceBundle.getString('JiraAuthorityConnector.JiraPathMustBeginWithASlash'))");
     
SelectTab("$Encoder.bodyJavascriptEscape($ResourceBundle.getString('JiraAuthorityConnector.Server'))");
Index: 
connectors/jira/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/jira/editConfiguration_jira_server.js
===================================================================
--- 
connectors/jira/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/jira/editConfiguration_jira_server.js
 (revision 1507207)
+++ 
connectors/jira/connector/src/main/resources/org/apache/manifoldcf/crawler/connectors/jira/editConfiguration_jira_server.js
 (working copy)
@@ -33,7 +33,7 @@
     return false;
   }
 
-  if (editconnection.jirapath.value != "" && 
!editconnection.jirapath.value.startsWith("/"))
+  if (editconnection.jirapath.value != "" && 
editconnection.jirapath.value.lastIndexOf("/", 0) != 0)
   {
     
alert("$Encoder.bodyJavascriptEscape($ResourceBundle.getString('JiraRepositoryConnector.JiraPathMustBeginWithASlash'))");
     editconnection.jirapath.focus();
@@ -78,7 +78,7 @@
     return false;
   }
   
-  if (editconnection.jirapath.value != "" && 
!editconnection.jirapath.value.startsWith("/"))
+  if (editconnection.jirapath.value != "" && 
editconnection.jirapath.value.lastIndexOf("/", 0) != 0)
   {
     
alert("$Encoder.bodyJavascriptEscape($ResourceBundle.getString('JiraRepositoryConnector.JiraPathMustBeginWithASlash'))");
     
SelectTab("$Encoder.bodyJavascriptEscape($ResourceBundle.getString('JiraRepositoryConnector.Server'))");
{noformat}

Also, even after fixing above, In Jira authority connection, the behavior of 
server tab is clumsy.
Please check this.


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to