stable

Clone or download

Read-only

fix: Close request #29996 Artifact can wrongly be closed by a git commit done in another project

Since story #26802 (have smart commit with Tuleap Git), we have the ability to close artifacts with a pushed Git commit message. We are only able to close artifact located in the same project than the Git repository. However, in some circumstances, this feature wrongly allows to close artifacts located in another project. This must be fixed. Note: this patch also add an other check like on tracker to see if it is not deleted. How to reproduce initial issue ------------------------------ * In a project A, have a git repository with smart commits enabled * In this project A, have a tracker (we will use the shortname ```bug``` for the example) * In a project B, have a Tracker with Done semantic defined and with an artifact (we will use the artifact ID ```123``` in the exemple) * Do a commit in the Git repository in the project A with a commit message like "fix bug #123" (which is a mix of tracker shortname from project A and artifact ID from project B) => The artifact 123 in project B will be wrongly closed. Change-Id: I15d7df8bfdbb64072eb4b25149f1cf46798d745a

Modified Files

Name
M plugins/tracker/include/Tracker/Artifact/Closure/ArtifactClosingReferencesHandler.php +7 −0 Go to diff View file
M plugins/tracker/tests/unit/Artifact/Closure/ArtifactClosingReferencesHandlerTest.php +65 −2 Go to diff View file