Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for #829: Under maintenance project should not get back to "Draft… #25

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

niksj
Copy link
Member

@niksj niksj commented May 28, 2016

@@ -134,6 +134,9 @@ public static ProjectModelStatus getStatus(final String status) {
// "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
2 participants