gnl42 / JiraConnector

Other
19 stars 2 forks source link

Synchronization is not working #46

Closed tkupka closed 1 year ago

tkupka commented 1 year ago

Synchronization with JIRA is failing with following exception: java.lang.IllegalStateException: Duplicate key adminngo (attempted merging values User [groups=null, avatarUris={48x48=https://host.com/jira/secure/useravatar?avatarId=10242, 24x24=https://host.com/jira/secure/useravatar?size=small&avatarId=10242, 16x16=https://host.com/jira/secure/useravatar?size=xsmall&avatarId=10242, 32x32=https://host.com/jira/secure/useravatar?size=medium&avatarId=10242}, timezone=Europe/Berlin, toString()=BasicUser [self=https://host.com/jira/rest/api/2/user?username=adminngo, name=adminngo, displayName=Admin NGO, accountId=null, emailAddress=eml@xx.com, active=true]] and User [groups=null, avatarUris={48x48=https://host.com/jira/secure/useravatar?avatarId=10242, 24x24=https://host.com/jira/secure/useravatar?size=small&avatarId=10242, 16x16=https://host.com/jira/secure/useravatar?size=xsmall&avatarId=10242, 32x32=https://host.com/jira/secure/useravatar?size=medium&avatarId=10242}, timezone=Europe/Berlin, toString()=BasicUser [self=https://host.com/jira/rest/api/2/user?username=adminngo, name=adminngo, displayName=ADMINNGO, accountId=null, emailAddress=eml@xx.com, active=true]]) at java.base/java.util.stream.Collectors.duplicateKeyException(Collectors.java:135) at java.base/java.util.stream.Collectors.lambda$uniqKeysMapAccumulator$1(Collectors.java:182) at java.base/java.util.stream.ReduceOps$3ReducingSink.accept(ReduceOps.java:169) at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1625) at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509) at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499) at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:921) at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:682) at me.glindholm.connector.eclipse.internal.jira.core.model.JiraProject.setAssignables(JiraProject.java:273) at me.glindholm.connector.eclipse.internal.jira.core.JiraAttributeMapper.getOptions(JiraAttributeMapper.java:202) at org.eclipse.mylyn.tasks.core.data.TaskAttributeMapper.getValueLabels(TaskAttributeMapper.java:266) at me.glindholm.connector.eclipse.internal.jira.core.JiraAttributeMapper.getValueLabels(JiraAttributeMapper.java:105) at org.eclipse.mylyn.tasks.core.data.TaskAttributeMapper.getValueLabel(TaskAttributeMapper.java:253) at me.glindholm.connector.eclipse.internal.jira.core.JiraAttributeMapper.getValueLabel(JiraAttributeMapper.java:97) at org.eclipse.mylyn.tasks.core.data.TaskMapper.getValue(TaskMapper.java:376) at org.eclipse.mylyn.tasks.core.data.TaskMapper.getOwner(TaskMapper.java:278) at org.eclipse.mylyn.tasks.core.data.TaskMapper.applyTo(TaskMapper.java:66) at me.glindholm.connector.eclipse.internal.jira.core.JiraRepositoryConnector.updateTaskFromTaskData(JiraRepositoryConnector.java:517) at org.eclipse.mylyn.internal.tasks.core.data.TaskDataManager.updateTaskFromTaskData(TaskDataManager.java:267) at org.eclipse.mylyn.internal.tasks.core.data.TaskDataManager.access$5(TaskDataManager.java:263) at org.eclipse.mylyn.internal.tasks.core.data.TaskDataManager$3.execute(TaskDataManager.java:208) at org.eclipse.mylyn.internal.tasks.core.TaskList.run(TaskList.java:731) at org.eclipse.mylyn.internal.tasks.core.TaskList.run(TaskList.java:722) at org.eclipse.mylyn.internal.tasks.core.TaskList.run(TaskList.java:718) at org.eclipse.mylyn.internal.tasks.core.data.TaskDataManager.putUpdatedTaskData(TaskDataManager.java:197) at org.eclipse.mylyn.internal.tasks.core.sync.SynchronizeTasksJob.updateFromTaskData(SynchronizeTasksJob.java:314) at org.eclipse.mylyn.internal.tasks.core.sync.SynchronizeTasksJob.synchronizeTask(SynchronizeTasksJob.java:249) at org.eclipse.mylyn.internal.tasks.core.sync.SynchronizeTasksJob.runInternal(SynchronizeTasksJob.java:220) at org.eclipse.mylyn.internal.tasks.core.sync.SynchronizeTasksJob.run(SynchronizeTasksJob.java:153) at org.eclipse.mylyn.internal.tasks.core.sync.SynchronizeTasksJob.run(SynchronizeTasksJob.java:135) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)

gnl42 commented 1 year ago

Not sure how two accounts with the same id were created.

Fixed with 4.3.0