Make "Exactly one issue key must be mentioned in the commit message" messages more expressive

For example:

JQL condition: project = ABC and AND fixVersion = "1.0.0" AND status = "In - Progress"

The commiter has only ABC in the commit message but the remainder of the the JQL conditions fails correctly. for example they didn't put the correct fix version or set the state to "In - Progress"

However, it always display the COMMIT[xxx] Exactly one issue key must be mentioned in the commit message "ABC etc. etc"

This is confusing if they already have a single correct ABC jira on the commit message. In reality it is the the state of the jira that is not meeting the remainder of the JQL condition, not the commit message.

Please correct this behavior make that message optional or allow it to be overridden by the 'Additional reject message' option.

Ticket #10894

Have more questions? Submit a request

2 Comments

  • 1
    Avatar
    Gary Miner

    The amount of text displayed when a user is confronted by a rejected commit can be overwhelming. Cutting down the messages to only what is relevant is highly desirable and creates less resistance from the developers who are subject to the policies enforced by this tool. I eagerly wait for this to be implemented.

  • 0
    Avatar
    Aron Gombas

    I completely understand and agree with showing the minimal amount of rejection messages to decrease the frustration. 

    At the same time, please note that if you have a rule with conditions A, B and C, and a commit violates all the three, then printing the reason only for "A" would be minimal, but then, if the developer fixes that problem, pushes again and then he receives that now "B" is violated, and then the same for "C", then it a terrible experience. That was the story why implemented the "all conditions that are applicable and violated should be returned, so that the committer can fix all those in one go".

    If it were possible to define a custom rejection message at the condition level (not at the rule level), would that solve this problem?

     

Please sign in to leave a comment.