p4ic4idea icon indicating copy to clipboard operation
p4ic4idea copied to clipboard

Submit enabled even with Empty commit message

Open thsaravana opened this issue 9 years ago • 5 comments

"Submit" button should not be enabled when there is no "commit message". I checked both the Eclipse plugin and the P4V Client, both does not let the user Submit without a Commit Message.

thsaravana avatar Jun 12 '15 10:06 thsaravana

Thanks for the bug report. This is definitely an issue, because it causes the UI to allow an invalid checkin (causing an error). Unfortunately, IntelliJ doesn't provide an API hook into changing the submit button state, as far as I can tell. There is a flag that a user can manually set in the settings Version Control / Confirmation dialog for "Force non-empty checkin comments", but even that doesn't alter the behavior of the submit button state.

There might be an area of opportunity to change this behavior indirectly that I'm investigating, but I fear that it might not be supported for past and future versions.

groboclown avatar Jun 15 '15 20:06 groboclown

The new Idea 15 has been released, and I'm going to investigate whether this is easier to implement there once the 0.7.0 plugin is released.

groboclown avatar Nov 02 '15 19:11 groboclown

This still is really not possible. With some work, I could monitor the state of the comments text (the text is easily accessible, and the monitor thread wouldn't be too much effort), but then actually disabling the button would require all kinds of reflection magic that it would just scream fragile. I'll leave this open as an enhancement, and I'll see if I can work with the IntelliJ community edition folks to make this a new feature for future releases.

groboclown avatar Nov 20 '15 03:11 groboclown

Even now, in the IntelliJ 18.3 release, the IDE does not give any hooks into setting the state of the submit button based on the contents of the comment. I don't think this will ever be fixed by them. I'm instead going to just mitigate the issue as much as possible.

groboclown avatar Nov 27 '18 19:11 groboclown

The UI now reports the error without trying to perform the submit. Not great, but a bit better than before.

groboclown avatar Nov 28 '18 21:11 groboclown