Designs can't be uploaded to moved or locked issues
Summary
Discovered by @aalakkad @esybrant https://gitlab.slack.com/archives/CETG54GQ0/p1589473801345500
Original issue: customers-gitlab-com#1210 (moved) Moved to: #217804 (closed)
I can no longer get designs to upload to the original issue. Because the designs didn't move to the new issue, I was trying to finish up the review / revision process on the original issue, but it won't let me upload updated designs. The "Add design" and "Delete design" buttons are also gone. cc @Christen Dybenko
@.luke any insight as to why @esybrant can't add to the original issue? - would it have auto-closed and need to be re-opened?
It was auto closed, but we reopened it to we could finish the review process. That's when I realized that it wouldn't let me upload any new designs.
Steps to reproduce
- Move an issue
- Go back and open up the old issue and try to upload a design
What is the current bug behavior?
- Not able to upload
What is the expected correct behavior?
- Should be able to upload
Proposal
Align the design permissions so they behave the same as comments:
- When an issue is moved, designs can still be uploaded on the original issue.
- When an issue is locked, only project members can still upload designs.
Design policy: https://gitlab.com/gitlab-org/gitlab/blob/c295db2fdf639ee7a302f86109b430a0183d5c5c/app/policies/issue_policy.rb#L38
Comment policy: https://gitlab.com/gitlab-org/gitlab/blob/c295db2fdf639ee7a302f86109b430a0183d5c5c/app/policies/issuable_policy.rb#L23