Value Stream Analytics and MR before commit

I’m a little confused with the expected use of Issues/Merge Requests in relation to Value Stream Analytics. If anyone can clarify this, I’d really appreciate it.

I understand that the Code stage is started by pushing a commit that references the issue number, but is it the “first commit that references the issue number”, or the “first commit on the branch”?

Next, the Code stage ends when the Merge Request is created. Documentation suggests that the MR must include the “closing pattern”, e.g. “Closes #123”, but would it also work with “Relates to #123”, if your workflow doesn’t close issues when MRs are merged?

Also, when you’re on the Issue page, the UI leads you to create and MR and branch at the same time using the “Create Merge Request” button. When this DRAFT MR is created, is that counted as closure of the Code stage, even when it’s ahead of any commits?

Many thanks