Skip to content

Conversation

@niksj
Copy link
Member

@niksj niksj commented May 28, 2016

// "USED" status is only allowed to shift to "UNAVAILABLE" status.
return new Pair<Boolean, String>(false, I18N.CONSTANTS.usedModelStatusChangeError());

} else if (currentStatus == ProjectModelStatus.USED && !currentModel.isUnderMaintenance() && targetStatus == ProjectModelStatus.DRAFT) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test doesn't seem to match with issue description. Your line of code sends an error if a project model status which is Used and NOT under maintenance is changed to Draft. But actually, the issue appears for project model in Used and under maintenance status.

@osarrat
Copy link
Member

osarrat commented Jun 8, 2016

Hi !
The fix you proposed seems to be partial and not completely correct. I've reported the error of understanding directly in a line of code comment.
The fix is also partial because the issue occurs when a user unchecks the "Under maintenance" checkbox and clicks on "Save", then the project model is sometimes shift automatically to "Draft" status. Your fix doesn't seem yet to deal with this case.
A bit more work is still required to finish it. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants