Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
ManifoldCF 1.3
-
None
Description
In Jira authority/repository connector, We can not create connections because there is startsWith method in JS file.
Then to fix this below:
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'))");
Also, even after fixing above, In Jira authority connection, the behavior of server tab is clumsy.
Please check this.