Only show Jira requirement project setting when the project has an active Jira integration
Problem to solve
Currently the Require an associated issue from Jira
checkbox in Project > Settings is always visible and can be checked. This can create an unsolvable situation in MRs when there is no active Jira integration on the project.
Suggested solution
The Require an associated issue from Jira
checkbox in Project > Settings should only be visible and enforced when the project has an Jira integration and it's active.
Additional details
The frontend will only block an MR if the project has both jira_issue_association_required_to_merge_enabled?
and prevent_merge_without_jira_issue
true. Thus if either returns false the MR can be merged without needing an integration. So this should be solvable by only updating jira_issue_association_required_to_merge_enabled?
on the backend.
Edited by Jiaan Louw