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

matchish added 2 commits May 25, 2020 06:55
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? 🙂

@juliusknorr
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)

matchish added 2 commits June 4, 2020 15:41
Signed-off-by: Sergey Shliakhov <husband.sergey@gmail.com>
Signed-off-by: Sergey Shliakhov <husband.sergey@gmail.com>
@matchish matchish force-pushed the transfer-ownership branch from 2990d80 to 4daa051 Compare June 8, 2020 04:26
Signed-off-by: Sergey Shliakhov <husband.sergey@gmail.com>
@matchish matchish force-pushed the transfer-ownership branch from 4daa051 to d8ceb8c Compare June 8, 2020 04:27
@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>
@juliusknorr juliusknorr self-requested a review June 9, 2020 18:37
@juliusknorr
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.

@juliusknorr
Copy link
Member

The code in general looks good to me 👍

@juliusknorr
Copy link
Member

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

@juliusknorr
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 matchish force-pushed the transfer-ownership branch from 53600cf to 0b85ccc Compare July 18, 2020 04:46
@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

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

#1955 (comment)
Signed-off-by: Sergey Shliakhov <husband.sergey@gmail.com>
@juliusknorr juliusknorr mentioned this pull request Nov 3, 2020
6 tasks
@juliusknorr
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.

@juliusknorr juliusknorr closed this Nov 3, 2020
juliusknorr 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>
juliusknorr pushed a commit that referenced this pull request Mar 14, 2022
…board

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

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

#1955 (comment)
Signed-off-by: Sergey Shliakhov <husband.sergey@gmail.com>
juliusknorr 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