java.lang.StringIndexOutOfBoundsException: String index out of range: 0

Issue #494 resolved
BSPB Algo created an issue

Jira 7.2.6 When post function 4 is executed we get following exception in log:

2017-02-01 09:47:34,846 http-nio-36200-exec-5 ERROR oparinig 587x299332x1 zdlx5t 10.64.68.99 /secure/CommentAssignIssue.jspa [c.a.jira.workflow.OSWorkflowManager] Caught exception while attempting to perform action 231 from workflow 10466 on issue 'MG-25' java.lang.StringIndexOutOfBoundsException: String index out of range: 0 at java.lang.String.charAt(Unknown Source) at com.fca.jira.plugins.workflowToolbox.shared.GeneralizedField.getListOfItemsAfterAddOrRemoveOperation(GeneralizedField.java:5658) at com.fca.jira.plugins.workflowToolbox.shared.GeneralizedField.processValueToBeAssigned(GeneralizedField.java:4866) at com.fca.jira.plugins.workflowToolbox.shared.GeneralizedField.setValue(GeneralizedField.java:3837) at com.fca.jira.plugins.workflowToolbox.shared.GeneralizedField.setValue(GeneralizedField.java:3548) at com.fca.jira.plugins.workflowToolbox.shared.AbstractPostfunction.writeRemoteIssue(AbstractPostfunction.java:317) at com.fca.jira.plugins.workflowToolbox.WriteLinkedIssuesFunction.execute(WriteLinkedIssuesFunction.java:128) at com.opensymphony.workflow.AbstractWorkflow.executeFunction(AbstractWorkflow.java:1050) at com.opensymphony.workflow.AbstractWorkflow.transitionWorkflow(AbstractWorkflow.java:1446) at com.opensymphony.workflow.AbstractWorkflow.doAction(AbstractWorkflow.java:564) at com.atlassian.jira.workflow.OSWorkflowManager.doWorkflowActionInsideTxn(OSWorkflowManager.java:829) at com.atlassian.jira.workflow.OSWorkflowManager.doWorkflowAction(OSWorkflowManager.java:786) at com.atlassian.jira.bc.issue.DefaultIssueService.transition(DefaultIssueService.java:492) at com.atlassian.jira.web.action.issue.CommentAssignIssue.doExecute(CommentAssignIssue.java:162) ... 1 filtered at com.atlassian.jira.action.JiraActionSupport.execute(JiraActionSupport.java:63) ... 7 filtered at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) ... 52 filtered at com.atlassian.greenhopper.jira.filters.ClassicBoardRouter.doFilter(ClassicBoardRouter.java:62) ... 7 filtered at com.atlassian.web.servlet.plugin.request.RedirectInterceptingFilter.doFilter(RedirectInterceptingFilter.java:21) ... 58 filtered at com.atlassian.jira.security.JiraSecurityFilter.lambda$doFilter$0(JiraSecurityFilter.java:76) ... 1 filtered at com.atlassian.jira.security.JiraSecurityFilter.doFilter(JiraSecurityFilter.java:74) ... 36 filtered at com.atlassian.jira.servermetrics.CorrelationIdPopulatorFilter.doFilter(CorrelationIdPopulatorFilter.java:30) ... 10 filtered at com.atlassian.web.servlet.plugin.request.RedirectInterceptingFilter.doFilter(RedirectInterceptingFilter.java:21) ... 4 filtered at com.atlassian.web.servlet.plugin.LocationCleanerFilter.doFilter(LocationCleanerFilter.java:36) ... 29 filtered at com.atlassian.jira.servermetrics.MetricsCollectorFilter.doFilter(MetricsCollectorFilter.java:25) ... 27 filtered at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Unknown Source)

It happens when parent epic has no labels.

Comments (11)

  1. Fidel Castro Armario repo owner

    You found a bug. It will be fixed in next version of the plugin. Anyway, as workaround, you can do the following changes in the configuration of your 4th post-function:

    Captura de pantalla 2017-02-01 a las 10.31.43.png

  2. BSPB Algo reporter

    But we want to add parent labels to subtask without overwriting, So far we are just overwriting it, waiting for next release.

  3. Fidel Castro Armario repo owner

    Target field "New labels" doesn't overwrite sub-tasks labels, but simply add new labels to the existing ones. That's exactly what you want to do.

  4. Fidel Castro Armario repo owner

    Hi have tried to reproduce your problem using JIRA Workflow Toolbox 2.2.29 and JIRA 7.2.7, and in my case all is working correctly, as you can see in the attached video.

    Please, double check your configuration. Maybe you selected Labels instead of New labels at target field.

    If don't manage to solve the problem, I will be available for a video-conference with screen-share at Skype tomorrow, from 9:00 UTC to 13:00 UTC. My user is fidel100r.

  5. Log in to comment