Jira开发-设置受影响的版本
Jira development - set affected version
我无法更新受影响版本的问题....
使用 VersionManager 检索版本的版本。
但是我不明白为什么在validateUpdate方法之后,validateVersionUpdate没有任何affectedVersion的数据。验证不报错,版本和问题在同一个项目中。有什么想法吗?
MutableIssue componentUpdateSubTask = subtaskIssue.getIssue();
IssueInputParameters versionValues = issueService.newIssueInputParameters();
versionValues.setAffectedVersionIds(version.getId());
UpdateValidationResult validateVersionUpdate = issueService.validateUpdate(applicationUser, componentUpdateSubTask.getId(), versionValues);
if (!validateVersionUpdate.isValid()) {
throw new Exception(validateVersionUpdate); }
IssueResult versionResult = issueService.update(applicationUser, validateVersionUpdate);
if (!versionResult.isValid()) {
throw new Exception(versionResult); }
希望以下link对您有所帮助
https://answers.atlassian.com/questions/97829/cannot-set-new-affects-version-s
代码终于可以正常工作了。那是项目中某些设置出了什么问题。我必须将受影响的版本字段设置为可编辑。
我无法更新受影响版本的问题.... 使用 VersionManager 检索版本的版本。 但是我不明白为什么在validateUpdate方法之后,validateVersionUpdate没有任何affectedVersion的数据。验证不报错,版本和问题在同一个项目中。有什么想法吗?
MutableIssue componentUpdateSubTask = subtaskIssue.getIssue();
IssueInputParameters versionValues = issueService.newIssueInputParameters();
versionValues.setAffectedVersionIds(version.getId());
UpdateValidationResult validateVersionUpdate = issueService.validateUpdate(applicationUser, componentUpdateSubTask.getId(), versionValues);
if (!validateVersionUpdate.isValid()) {
throw new Exception(validateVersionUpdate); }
IssueResult versionResult = issueService.update(applicationUser, validateVersionUpdate);
if (!versionResult.isValid()) {
throw new Exception(versionResult); }
希望以下link对您有所帮助 https://answers.atlassian.com/questions/97829/cannot-set-new-affects-version-s
代码终于可以正常工作了。那是项目中某些设置出了什么问题。我必须将受影响的版本字段设置为可编辑。