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

Enable Activity Integration #2

Closed
Rello opened this issue Nov 15, 2019 · 3 comments
Closed

Enable Activity Integration #2

Rello opened this issue Nov 15, 2019 · 3 comments
Assignees

Comments

@Rello
Copy link
Owner

Rello commented Nov 15, 2019

Activity settings for Reports and Report Data

Screenshot 2019-11-16 at 21 41 52

Activities for various events

Screenshot 2019-11-16 at 21 56 33

Activity filter

Screenshot 2019-11-16 at 21 57 28

Subjects:

const SUBJECT_DATASET_ADD = 'dataset_add';
const SUBJECT_DATASET_DELETE = 'dataset_delete';
const SUBJECT_DATASET_SHARE = 'dataset_share';
const SUBJECT_DATA_ADD = 'data_add';
const SUBJECT_DATA_ADD_API = 'data_add_api';
@Rello Rello changed the title Enable Activities Enable Activity Integration Nov 16, 2019
@Rello Rello self-assigned this Nov 16, 2019
Rello added a commit that referenced this issue Nov 16, 2019
@Rello Rello mentioned this issue Nov 16, 2019
31 tasks
@Rello
Copy link
Owner Author

Rello commented Nov 16, 2019

@juliushaertl
I integrated Activity into my new app. works quite well - your Deck helped here as a reference
I have one issue, where I can't proceed. I hope you have a suggestion

within OCA\Analytics\Activity\ActivityManager i am referring to a service, because I need to read a name-tag from the dataset.
use OCA\Analytics\Service\DatasetService;
works until here

but within DatasetService I want to trigger activities. As soon as I include the ActivityManager within the same service as mentioned before, PHP stalls.
use OCA\Analytics\Activity\ActivityManager;

I assume that I can't do it in both ways because I am creating a cycle? is this correct?

Rello added a commit that referenced this issue Nov 17, 2019
@juliushaertl
Copy link
Contributor

Yes, you have introduced a cyclic dependency between ActivityManager and DatasetService. Without having a deeper look at the code, it's hard to give a quick solution, but you could extract the reading in a separate class (as i assume that reading doesn't need the ActivityManager as a dependency). Otherwise try to move the "read a name tag" out of your activityManager and make sure that the data is passed into the method itself.

@Rello
Copy link
Owner Author

Rello commented Nov 20, 2019

I solved it by accessing the DbController and not the DatasetService. not 100% nice but still clearer from the reading

thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants