Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transfer ownership #1955

Closed
wants to merge 9 commits into from
Closed

Conversation

matchish
Copy link
Contributor

Summary

Add deck:transfer-ownership command

TODO

  • Add tests

Checklist

  • [ x] Code is properly formatted
  • [ x] Sign-off message is added to all commits
  • Tests (unit, integration, api and/or acceptance) are included
  • [ x] Documentation (manuals or wiki) has been updated or is not required

Signed-off-by: Sergey Shliakhov <husband.sergey@gmail.com>
Signed-off-by: Sergey Shliakhov <husband.sergey@gmail.com>
@matchish
Copy link
Contributor Author

Before add tests I would like to have small feedback about the command.
Also I wondering it's ok if I add integration tests for the command instead of unit?
I don't see a way to create good unit tests for the command.

@stefan-niedermann
Copy link
Member

Can you please also update the REST API documentation so 3rd party clients can implement this new feature? 🙂

@juliushaertl
Copy link
Member

Thanks a lot for looking into this. ❤️

Before add tests I would like to have small feedback about the command.
Also I wondering it's ok if I add integration tests for the command instead of unit?

Sure, I agree that an integration test makes the most sense here.

@matchish
Copy link
Contributor Author

matchish commented May 28, 2020

Can you please also update the REST API documentation so 3rd party clients can implement this new feature?

It's an occ command. Not a REST API. What documentation I have to update?

@stefan-niedermann
Copy link
Member

Oh - uhm... Basically to gain feature parity we would need a REST endpoint additionally then? Should i open a new issue then?

How does the vue app trigger an owner change? Doesn't it has to call some kind of REST endpoint, too? Or am i completely wrong here?

@matchish
Copy link
Contributor Author

I believe this feature mostly for admins and they have access to occ commands. And if we want REST endpoint for the feature I think is better to open a new issue for it(for me smaller tasks always better)

Signed-off-by: Sergey Shliakhov <husband.sergey@gmail.com>
Signed-off-by: Sergey Shliakhov <husband.sergey@gmail.com>
Signed-off-by: Sergey Shliakhov <husband.sergey@gmail.com>
@matchish
Copy link
Contributor Author

matchish commented Jun 8, 2020

Ready for review again) There is one issue. If user already participant of some card or in acl then command will stop with error unique constrain violation. Do you think this could be a new task(issue), because this implementation already has an value?

Signed-off-by: Sergey Shliakhov <husband.sergey@gmail.com>
@juliushaertl juliushaertl self-requested a review June 9, 2020 18:37
@juliushaertl
Copy link
Member

Sorry for taking so long to review.

There is one issue. If user already participant of some card or in acl then command will stop with error unique constrain violation. Do you think this could be a new task(issue), because this implementation already has an value?

I'd love to get this addressed before merge, since that is probably a common use case that the ownership is transferred to a user that is already part of the board. I'm not sure if there is an easy solution without manually iterating over the entries and update them one by one.

MySQL would support an UPDATE IGNORE statement modifier but this doesn't seem to be available in PostgreSQL or sqlite so that is not an option for us here.

@juliushaertl
Copy link
Member

The code in general looks good to me 👍

@juliushaertl
Copy link
Member

Lint / php-cs check (pull_request) Failing after 34s — php-cs check

@juliushaertl
Copy link
Member

The BoardServiceTest needs to be adjusted to the additional constructor parameter

…board

nextcloud#1955 (comment)
Signed-off-by: Sergey Shliakhov <husband.sergey@gmail.com>
@matchish
Copy link
Contributor Author

matchish commented Jul 18, 2020

The BoardServiceTest needs to be adjusted to the additional constructor parameter

I'm not sure I understand you. What do you mean?

@matchish
Copy link
Contributor Author

@juliushaertl There is failed check https://drone.nextcloud.com/nextcloud/deck/4233/2/2
Could you help me with debug, don't understand how to reproduce it locally? All my tests pass locally

@juliushaertl juliushaertl mentioned this pull request Sep 17, 2020
@juliushaertl juliushaertl modified the milestones: ⭐ 1.1.0, 💥 1.2.0 Oct 2, 2020
juliushaertl pushed a commit that referenced this pull request Nov 3, 2020
…board

#1955 (comment)
Signed-off-by: Sergey Shliakhov <husband.sergey@gmail.com>
@juliushaertl juliushaertl mentioned this pull request Nov 3, 2020
6 tasks
@juliushaertl
Copy link
Member

Sorry for the delay, unfortunately I totally missed your message. I've rebased and pushed it to a branch of this repo which makes collaborating on the branch a bit easier #2496

Since you are a member of the nextcloud organization you should also have push access to that.

juliushaertl pushed a commit that referenced this pull request Nov 10, 2020
…board

#1955 (comment)
Signed-off-by: Sergey Shliakhov <husband.sergey@gmail.com>
max-nextcloud pushed a commit that referenced this pull request Feb 9, 2022
…board

#1955 (comment)
Signed-off-by: Sergey Shliakhov <husband.sergey@gmail.com>
juliushaertl pushed a commit that referenced this pull request Mar 14, 2022
…board

#1955 (comment)
Signed-off-by: Sergey Shliakhov <husband.sergey@gmail.com>
juliushaertl pushed a commit that referenced this pull request Mar 22, 2022
…board

#1955 (comment)
Signed-off-by: Sergey Shliakhov <husband.sergey@gmail.com>
juliushaertl pushed a commit that referenced this pull request Mar 22, 2022
…board

#1955 (comment)
Signed-off-by: Sergey Shliakhov <husband.sergey@gmail.com>
juliushaertl pushed a commit that referenced this pull request Mar 22, 2022
…board

#1955 (comment)
Signed-off-by: Sergey Shliakhov <husband.sergey@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

New Owner for a board
3 participants