Conversation
| require "spec_helper" | ||
|
|
||
| RSpec.describe WorkPackages::UpdateService, "sprint preservation on project change", type: :model do | ||
| shared_let(:user) { create(:admin) } |
There was a problem hiding this comment.
I wouldn't use an admin here. The permissions play a role in whether the change is possible or not. At least with the implementation being what it currently is. The sprint property is guarded by a permission. If the user lacks the permission in the moved to project, the contract will fail.
Failing can be prevented by wrapping the nil-ing with a
model.change_by_system do
model.sprint = nil
end
But it would be good to have the specs to catch the lack of this wrapping.
Sidenote: version is also guarded by specific permission. The change should have also be wrapped. But on the other hand, this behaviour will disappear after 17.3.
There was a problem hiding this comment.
Good find. Working on fixing this. After basing on dev, the previously existing specs broke, working on fixing that. But I will first finish reviewing #22393, so this will be on hold a bit. Pushed my broken WIP state.
1d28e72 to
b3b0001
Compare
Ticket
https://community.openproject.org/wp/73135
Merge checklist