I try to update an issue within my plugin. I'm using IssueService for that. See the following code.
IssueInputParameters issueInputParameters = getIssueService().newIssueInputParameters(); issueInputParameters.setSummary("I am a new summary"); issueInputParameters.setDescription("Some awesome new description"); issueInputParameters.setTimeSpent(4560L); issueInputParameters.setFixVersionIds(idList.toArray(new Long[1])); issueInputParameters.addCustomFieldValue(SyncListenerConfig.CUSTOMFIELD_PLANVERSION, newValue); UpdateValidationResult updateValidationResult = getIssueService().validateUpdate(ApplicationUsers.from(event.getUser()), linkedIssue.getId(), issueInputParameters); if (updateValidationResult.isValid()) { IssueResult updateResult = getIssueService().update(ApplicationUsers.from(event.getUser()), updateValidationResult); if (!updateResult.isValid()) { System.out.println("BUUUUHUHHHHHHHHHHH!!!!"); } }
It does update the summary and description. But it doesn't update the timeSpent, fixVersionIds and the custom field.
What am I missing here? There are no errors in the log or in any result object.
Community moderators have prevented the ability to post new answers.
Are those fields available on the edit screen?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Add the following to your code and see if it helps. issueInputParameters.setSkipScreenCheck(true);
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.