Custom fields in merge requests
<!--IssueSummary start-->
<details>
<summary>
Everyone can contribute. [Help move this issue forward](https://handbook.gitlab.com/handbook/marketing/developer-relations/contributor-success/community-contributors-workflows/#contributor-links) while earning points, leveling up and collecting rewards.
</summary>
- [Close this issue](https://contributors.gitlab.com/manage-issue?action=close&projectId=278964&issueIid=31926)
</details>
<!--IssueSummary end-->
### Problem to solve
Add an option in merge request form for custom fields and dropdowns and save this info as meta data. This allows to integrate with internal systems. E.g. we have a customer issue tracking system where customer reported issues are maintained. We want to link merge requests to these issues. As of today, we've to use the description template and after submission parse that issue number and link it internally. With a clear field it gives a lot more cleaner and flexible way.
### Intended users
<!-- Who will use this feature? If known, include any of the following: types of users (e.g. Developer), personas, or specific company roles (e.g. Release Manager). It's okay to write "Unknown" and fill this field in later. -->
* [Parker (Product Manager)](https://about.gitlab.com/handbook/marketing/product-marketing/roles-personas/#parker-product-manager)
* [Delaney (Development Team Lead)](https://about.gitlab.com/handbook/marketing/product-marketing/roles-personas/#delaney-development-team-lead)
* [Sasha (Software Developer)](https://about.gitlab.com/handbook/marketing/product-marketing/roles-personas/#sasha-software-developer)
### Further details
Goal is to make integration with internal and third party systems easier with attaching meta data for each merge request.
### Proposal
1. At the project level, define "custom fields" for merge requests.
2. When merge request is created show these custom fields and text inputs.
3. Add validation (via API calls).
4. Save this data as meta data with the merge request.
5. Display the metadata on the merge request page.
6. Return this metadata with /merge_request API call
### Permissions and Security
Project owners can add custom fields. Developers will simply see these fields when creating merge requests.
### Documentation
<!-- See the Feature Change Documentation Workflow https://docs.gitlab.com/ee/development/documentation/feature-change-workflow.html
Add all known Documentation Requirements here, per https://docs.gitlab.com/ee/development/documentation/feature-change-workflow.html#documentation-requirements
If this feature requires changing permissions, this document https://docs.gitlab.com/ee/user/permissions.html must be updated accordingly. -->
### Testing
This is an add-on/opt-in feature. So testing can focus on only when the custom fields are defined.
### What does success look like, and how can we measure that?
Ability to add custom metadata to merge requests
### What is the type of buyer?
<!-- Which leads to: in which enterprise tier should this feature go? See https://about.gitlab.com/handbook/product/pricing/#four-tiers -->
### Links / references
issue