stable
Clone or download
In project history, the user who add a new project member thanks to an invitation should not be "None", but the user who invited the project member. This was due to the fact that deep down in the call stack, groupAddHistory was adding the log by requesting the current user from the request. This does not work in our case because the user is currently registering herself, so there is no current user. We should alway pass the project admin who is doing the operation so groupAddHistory is now marked as deprecated. Took the opportunity to switch ProjectHistoryDao to EasyDB, there should not be any functional changes in project history, project history export, or site admin project change history. You can test the invitation by updating by hand an ongoing invitation in the db to add a project in `to_project_id`: once completed, the user is still added to the project, and the corresponding entry in the project history is not made by None. Bonus: InvitationInstrumentation::incrementUsedInvitation() is now used when user is successfully invited to a project. Part of story #30021: Invite buddies to my Tuleap project Change-Id: Ife92454708b943d0076f72b4ba67b8315a3fcdac
Modified Files
Name | ||||
---|---|---|---|---|
M | plugins/statistics/include/ProjectQuotaManager.class.php | +2 | −2 | Go to diff View file |
M | plugins/tracker/include/Tracker/DateReminder/Tracker_DateReminderFactory.class.php | +3 | −3 | Go to diff View file |
M | plugins/tracker/include/Tracker/DateReminder/Tracker_DateReminderManager.class.php | +1 | −1 | Go to diff View file |
M | site-content/fr_FR/LC_MESSAGES/tuleap-core.po | +3 | −0 | Go to diff View file |
M | site-content/pt_BR/LC_MESSAGES/tuleap-core.po | +3 | −0 | Go to diff View file |
M | src/common/InviteBuddy/AccountCreationFeedback.php | +23 | −1 | Go to diff View file |
M | src/common/Project/Admin/ProjectMembers/ProjectMembersController.php | +3 | −3 | Go to diff View file |
M | src/common/Project/Admin/ProjectUGroup/MemberAdditionController.php | +4 | −3 | Go to diff View file |
M | src/common/Project/ProjectCreator.class.php | +1 | −1 | Go to diff View file |
M | src/common/Project/ProjectUGroup.php | +2 | −2 | Go to diff View file |
M | src/common/Project/ProjectXMLImporter.class.php | +4 | −4 | Go to diff View file |
M | src/common/Project/Project_SOAPServer.class.php | +1 | −1 | Go to diff View file |
M | src/common/Project/REST/v1/UserGroupResource.class.php | +1 | −1 | Go to diff View file |
M | src/common/Project/UGroupManager.class.php | +6 | −6 | Go to diff View file |
M | src/common/Project/UGroups/Membership/DynamicUGroups/AddProjectMember.php | +12 | −2 | Go to diff View file |
M | src/common/Project/UGroups/Membership/DynamicUGroups/DynamicUGroupMembersUpdater.php | +18 | −18 | Go to diff View file |
A | src/common/Project/UGroups/Membership/DynamicUGroups/NotProjectAdminException.php | +27 | −0 | Go to diff View file |
M | src/common/Project/UGroups/Membership/DynamicUGroups/ProjectMemberAdder.php | +3 | −2 | Go to diff View file |
M | src/common/Project/UGroups/Membership/DynamicUGroups/ProjectMemberAdderWithStatusCheckAndNotifications.php | +7 | −4 | Go to diff View file |
M | src/common/Project/UGroups/Membership/DynamicUGroups/ProjectMemberAdderWithoutStatusCheckAndNotifications.php | +4 | −4 | Go to diff View file |
M | src/common/Project/UGroups/Membership/MemberAdder.php | +5 | −5 | Go to diff View file |
M | src/common/Project/UgroupDuplicator.php | +6 | −6 | Go to diff View file |
M | src/common/User/Account/Register/InvitationToEmail.php | +2 | −0 | Go to diff View file |
M | src/common/User/UserImport.class.php | +2 | −2 | Go to diff View file |
M | src/common/dao/ProjectHistoryDao.class.php | +92 | −44 | Go to diff View file |
M | src/www/admin/projecthistory.php | +28 | −3 | Go to diff View file |
M | src/www/include/account.php | +1 | −1 | Go to diff View file |
M | src/www/project/admin/project_admin_utils.php | +57 | −61 | Go to diff View file |
A | tests/integration/tests/Project/Admin/History/ProjectHistoryDaoTest.php | +214 | −0 | Go to diff View file |
M | tests/psalm/tuleap-baseline.xml | +168 | −44 | Go to diff View file |
M | tests/unit/common/InviteBuddy/AccountCreationFeedbackTest.php | +165 | −3 | Go to diff View file |
M | tests/unit/common/Project/Admin/ProjectUGroup/MemberAdditionControllerTest.php | +7 | −4 | Go to diff View file |
M | tests/unit/common/Project/UGroups/Membership/DynamicUGroups/AddProjectMemberTest.php | +45 | −14 | Go to diff View file |
M | tests/unit/common/Project/UGroups/Membership/DynamicUGroups/ProjectMemberAdderWithStatusCheckAndNotificationsTest.php | +14 | −10 | Go to diff View file |
M | tests/unit/common/Project/UGroups/Membership/DynamicUGroups/ProjectMemberAdderWithoutStatusCheckAndNotificationsTest.php | +6 | −4 | Go to diff View file |
M | tests/unit/common/Project/UGroups/Membership/MemberAdderTest.php | +14 | −9 | Go to diff View file |
M | tests/unit/common/Project/UgroupDuplicatorTest.php | +9 | −6 | Go to diff View file |