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

[WIP] Fixed group share members search for mail notifications #12030

Closed
wants to merge 3 commits into from
Closed

[WIP] Fixed group share members search for mail notifications #12030

wants to merge 3 commits into from

Conversation

popov-d
Copy link
Contributor

@popov-d popov-d commented Nov 7, 2014

Issue #11808, my changes described there yesterday.

@ghost
Copy link

ghost commented Nov 7, 2014

Thanks a lot for your contribution! Contributions to the core repo require a signed contributors agreement http://owncloud.org/contribute/agreement/ Alternatively you can add a comment here stating that this contribution is MIT licensed. Some more details about out pull request workflow can be found here: http://owncloud.org/code-reviews-on-github/

@LukasReschke
Copy link
Member

@nickvergessen Care to review this? Thanks!

@LukasReschke
Copy link
Member

@owncloud-bot This is okay to test.

@LukasReschke
Copy link
Member

@owncloud-bot Retest this please.

@ghost
Copy link

ghost commented Nov 7, 2014

💣 Test FAILed. 💣
Refer to this link for build results (access rights to CI server needed):
https://ci.owncloud.org//job/pull-request-analyser-ng-simple/2368/

Build result: FAILURE

[...truncated 10 lines...] > git config remote.origin.fetch +refs/heads/:refs/remotes/origin/ # timeout=10 > git config remote.origin.url https://github.com/owncloud/core.git # timeout=10Cleaning workspace > git rev-parse --verify HEAD # timeout=10No valid HEAD. Skipping the resetting > git clean -fdx # timeout=10Fetching upstream changes from https://github.com/owncloud/core.git > git fetch --tags --progress https://github.com/owncloud/core.git +refs/pull/:refs/remotes/origin/pr/ > git rev-parse origin/pr/12030/merge^{commit} # timeout=10Checking out Revision 2521a5f53c49ad5045b4cb3b0ff5913dfad55229 (detached) > git config core.sparsecheckout # timeout=10 > git checkout -f 2521a5f53c49ad5045b4cb3b0ff5913dfad55229 > git rev-list 79fbe9f32cf37db2c34d11fd8d23cfd7984c130e # timeout=10 > git remote # timeout=10 > git submodule init # timeout=10 > git submodule sync # timeout=10 > git config --get remote.origin.url # timeout=10 > git submodule update --init --recursiveTriggering pull-request-analyser-ng-simple » vm-slave-02pull-request-analyser-ng-simple » vm-slave-02 completed with result FAILUREStarted calculate disk usage of buildFinished Calculation of disk usage of build in 0 secondsStarted calculate disk usage of workspaceFinished Calculation of disk usage of workspace in 2 second
💣 Test FAILed. 💣

@LukasReschke
Copy link
Member

@popov-d Thanks for your contribution. This seems to fail for some unit tests as pointed out at https://ci.owncloud.org//job/pull-request-analyser-ng-simple/2368/label=vm-slave-02/. The SQL query seems also to be wrong according to the Jenkins log.

Can I ask you to take a look at this? - If you need help to setup a proper test environment we can gladly help you with that.
Basically, it's just installing ownCloud and then executing "bash autotest.sh sqlite", all tests will then get executed (can take some time) and the failing tests will be shown to you allowing you to test your changes locally.

@popov-d
Copy link
Contributor Author

popov-d commented Nov 7, 2014

It seems that \OC_Group::getUserGroups($user) returns empty list. That can't happen when this method is called for a mail group notification, but in current version it is called also from other places. I need another commit. Should I make another pull request when it is ready?

@LukasReschke
Copy link
Member

I need another commit. Should I make another pull request when it is ready?

You can directly commit to your fork and it will appear on this pull request automatically. That's the cool thing about them :-)

Avoid searching for empty group list in getItemSharedWithUser().
Broke tests in previous commit, #12030.
@popov-d
Copy link
Contributor Author

popov-d commented Nov 7, 2014

Here is the commit. When group list is empty, calling group query is useless. Just avoided it instead of making an SQL error.

WHERE
`' . $column . '` = ? AND `item_type` = ? AND `share_with` in (?)'
);
if(count($groups) > 0) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just use if (!empty($groups)) { instead

@popov-d
Copy link
Contributor Author

popov-d commented Nov 7, 2014

Sorry, I am not a PHP expert. A little more used with Perl. Changed.

@scrutinizer-notifier
Copy link

The inspection completed: 2 updated code elements

@ghost
Copy link

ghost commented Nov 21, 2014

Thanks a lot for your contribution! Contributions to the core repo require a signed contributors agreement http://owncloud.org/contribute/agreement/ Alternatively you can add a comment here stating that this contribution is MIT licensed. Some more details about out pull request workflow can be found here: http://owncloud.org/code-reviews-on-github/

@popov-d
Copy link
Contributor Author

popov-d commented Dec 1, 2014

A question about previous note from owncloud-bot. I have already signed and sent the agreeemet when making first version of pull request. Should I repeat it or that version is enough?

@LukasReschke
Copy link
Member

@karlitschek Can you confirm?

@popov-d
Copy link
Contributor Author

popov-d commented Dec 1, 2014

I sent mail with the signed scan to frank@owncloud.com, as was suggested. From popov@krista.ru at 07.11.2014 16:12 MSK(+03). I can re-send it once more if needed, may be to another address?

@karlitschek
Copy link
Contributor

@popov-d Sorry. Could you email it again?

@popov-d
Copy link
Contributor Author

popov-d commented Dec 1, 2014

I sent it again to the same address.

@karlitschek
Copy link
Contributor

@LukasReschke confirmed

@LukasReschke
Copy link
Member

@owncloud-bot Retest this please.

@ghost
Copy link

ghost commented Dec 1, 2014

🚀 Test PASSed. 🚀
Refer to this link for build results (access rights to CI server needed):
https://ci.owncloud.org//job/pull-request-analyser-ng-simple/3531/
🚀 Test PASSed. 🚀

@LukasReschke LukasReschke changed the title Fixed group share members search for mail notifications [WIP] Fixed group share members search for mail notifications Feb 24, 2015
@LukasReschke
Copy link
Member

@popov-d Sorry for the delay on this one. Could you rebase this PR so we can finally merge it? Thanks! 😄

@popov-d
Copy link
Contributor Author

popov-d commented Feb 24, 2015

I don't think it's needed anymore. There was a slightly different change in the same place in 7.0.3 or 7.0.4 that also fixed the problem. It worked for me since that update and works now in 8.0, without any patching. Don't know who did it, but I think you better thank that person.

@LukasReschke
Copy link
Member

Thanks for the feedback. Closing this one then 😄

PVince81 pushed a commit that referenced this pull request May 24, 2016
#24800)

* Fixed group share searching for members of
multiple group. Issue #11808.

* Fixed group share searching, continued.

Avoid searching for empty group list in getItemSharedWithUser().
Broke tests in previous commit, #12030.

* Simler check for group count.

* Fix for #24783 , described there

* Now it's #24272, 24783 was a duplicate. Previous change was also not very good. Now we don't create ZIP with a single file inside.
PVince81 pushed a commit that referenced this pull request Jun 2, 2016
#24800)

* Fixed group share searching for members of
multiple group. Issue #11808.

* Fixed group share searching, continued.

Avoid searching for empty group list in getItemSharedWithUser().
Broke tests in previous commit, #12030.

* Simler check for group count.

* Fix for #24783 , described there

* Now it's #24272, 24783 was a duplicate. Previous change was also not very good. Now we don't create ZIP with a single file inside.
@lock lock bot locked as resolved and limited conversation to collaborators Aug 13, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants