theonedev/onedev · error · NotAcceptableException

Cannot move issue "{0}" as it has already been moved

Error message

Cannot move issue "{0}" as it has already been moved

What it means

During move(), each issue is checked with checkNoWorkspaces and for a prior move; if issue.getMovedTo() is already set the issue was previously moved to another project and moving it again is not allowed. The message names the issue.

Source

Thrown at server-core/src/main/java/io/onedev/server/service/impl/DefaultIssueService.java:1146

						dao.persist(clonedLink);
					}
				}
			});
		});
		
		listenerRegistry.post(new IssuesCopied(sourceProject, targetProject, cloneMapping));
	}
	
	@Transactional
	@Override
	public void move(User user, Collection<Issue> issues, Project sourceProject, Project targetProject) {
		Map<Long, Long> numberMapping = new HashMap<>();
		List<Issue> sortedIssues = new ArrayList<>(issues);
		Collections.sort(sortedIssues);
		for (Issue issue: sortedIssues) {
			checkNoWorkspaces(issue, "move");
			if (issue.getMovedTo() != null) {
				throw new NotAcceptableException(MessageFormat.format(
						"Cannot move issue \"{0}\" as it has already been moved",
						issue.getReference().toString(issue.getProject())));
			}
		}

		// Remember source identity so we can leave a bare stub after the move
		Map<Long, Issue> stubInfos = new LinkedHashMap<>();
		for (Issue issue: sortedIssues) {
			Issue stubInfo = new Issue();
			stubInfo.setTitle(issue.getTitle());
			stubInfo.setState(issue.getState());
			stubInfo.setStateOrdinal(issue.getStateOrdinal());
			stubInfo.setProject(issue.getProject());
			stubInfo.setNumberScope(issue.getNumberScope());
			stubInfo.setNumber(issue.getNumber());
			stubInfo.setSubmitter(issue.getSubmitter());
			stubInfo.setSubmitDate(issue.getSubmitDate());
			stubInfo.setConfidential(issue.isConfidential());

View on GitHub (pinned to d44925c47c)

Solutions

  1. Skip issues whose movedTo is already set and follow the movedTo link to the new location.
  2. Only move issues that have never been moved.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at server-core/src/main/java/io/onedev/server/service/impl/DefaultIssueService.java:1146 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of theonedev/onedev@d44925c47c (2026-09-06). Data as JSON: /api/errors/903eec9de3ab7a34. Report an issue: GitHub.