Uploaded image for project: 'ManifoldCF'
  1. ManifoldCF
  2. CONNECTORS-761

Jira connector, we can't save a connection

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • ManifoldCF 1.3
    • ManifoldCF 1.3
    • JIRA connector
    • 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.

      Attachments

        Activity

          People

            kwright@metacarta.com Karl Wright
            shinichiro abe Shinichiro Abe
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: