Skip to content

WIP: Minimum changes in models to support issue relationships

Drew Blessing requested to merge dblessing/gitlab-ce:related_issues into master

What does this MR do?

Adds the necessary models changes to facilitate issue relationships. Currently, only supports 'blocks' and 'blocked_by', but more relationships can be added easily.

This does not add any user usable features - there is no way for someone to add issue relationships or to see existing relationships. There are two minimum follow ups to this MR:

  • Slash commands to manage relationships
  • UI to view the relationships

Are there points in the code the reviewer needs to double check?

The easiest and cheapest way I could find to handle these relationships is to automatically create and destroy inverse relationships. It means 2 database records per relationship, but it seemed less hacky than alternatives.

Why was this MR needed?

Issue relationships would be awesome! Meta issues would have more meaning, we can eventually add things like sub-tasks, etc. Highly requested in https://gitlab.com/gitlab-org/gitlab-ce/issues/4058

Screenshots (if relevant)

POC with UI added (not on this branch). Uses same UI as related merge requests.

Screen_Shot_2016-12-22_at_11.53.30_PM

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

https://gitlab.com/gitlab-org/gitlab-ce/issues/4058

Merge request reports