[ 
https://issues.apache.org/jira/browse/CONNECTORS-761?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13720584#comment-13720584
 ] 

Karl Wright commented on CONNECTORS-761:
----------------------------------------

r1507236 (trunk)

                
> Jira connector, we can't save a connection
> ------------------------------------------
>
>                 Key: CONNECTORS-761
>                 URL: https://issues.apache.org/jira/browse/CONNECTORS-761
>             Project: ManifoldCF
>          Issue Type: Bug
>          Components: JIRA connector
>    Affects Versions: ManifoldCF 1.3
>            Reporter: Shinichiro Abe
>            Assignee: Karl Wright
>             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