Skip to content

Show validation error if link creation fails

Jan Provaznik requested to merge epic_link_message into master

What does this MR do?

It updates Issue and Epic link creation:

  • we try to create all possible links - until now if one of created links failed we raised an exception. But because links creation is not in transaction (and can't be because of notes creation - this would require more refactoring), some links (before exception was raised) were created and some not. Now we don't raise an exception but rather to try create all possible links
  • if any of link creation fails we return an error with a message about what links were not created and why
  • links creation is idempotent - if issue link already exists we don't reacreate the link again (this behavior is unchanged)

Related to #219244 (closed)

Screenshots

Before: Missing error message why adding issues failed

epic_issue_before

After: The reason why an issue couldn't be added is displayed in the widget

epic_issue_link

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team
Edited by Jan Provaznik

Merge request reports