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

./console customvariables:set-max-custom-variables should run in no interaction mode #8469

Closed
oswaldquek opened this issue Jul 30, 2015 · 5 comments
Assignees
Labels
answered For when a question was asked and we referred to forum or answered it. c: Usability For issues that let users achieve a defined goal more effectively or efficiently. Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc. Help wanted Beginner friendly issues or issues where we'd highly appreciate community's help and involvement.

Comments

@oswaldquek
Copy link

This faq http://piwik.org/faq/how-to/#faq_17931 describes how to add a custom variable to piwik.
If I just run ./console however it says I can run it with --no-interaction. However this doesn't work. Looking at https://github.com/piwik/piwik/blob/3.0/plugins/CustomVariables/Commands/SetNumberOfCustomVariables.php#L58 it looks like the code doesn't check to see if the --no-interaction was specified before prompting the user for confirmation.

@tsteur
Copy link
Member

tsteur commented Jul 30, 2015

We currently do not really respect this option.

We could try to remove this option and completely ignore it, or respect it for some commands where it is possible. Not sure how many there are. I presume it shouldn't be that many as we usually do not ask for input if all needed information is provided. If not all information is provided and --no-interaction is set, we'd probably need to exit immediately showing an error? That would be some more work I reckon

@tsteur tsteur added Help wanted Beginner friendly issues or issues where we'd highly appreciate community's help and involvement. and removed Help wanted Beginner friendly issues or issues where we'd highly appreciate community's help and involvement. labels Jul 30, 2015
@oswaldquek
Copy link
Author

I'm not sure how many commands could do without interaction mode either. But maybe it could work for the use case of ./console customvariables:set-max-custom-variables? The only interaction is asking the user to enter 'y' or 'N'. Something that isn't really necessary. And probably easy to fix (except I don't know php so stopped short of fixing it).

Just to give context, I was trying to add a custom variable via puppet rather than going to all my environments which had a piwik instance running and manually adding the custom variable. This was not doable since I couldn't run set-max-custom-variables in no interaction mode.

@tsteur
Copy link
Member

tsteur commented Jul 30, 2015

Already thought you have such a use case. It shouldn't be too much work to make it work indeed

@oswaldquek
Copy link
Author

Thanks :)

@mattab mattab changed the title ./console can't run in no interaction mode ./console customvariables:set-max-custom-variables should run in no interaction mode Sep 18, 2015
@mattab mattab added the Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc. label Sep 18, 2015
@mattab
Copy link
Member

mattab commented Sep 18, 2015

Restricted scope of issue. @oswaldquek Pull request is welcome :-)

@mattab mattab added this to the Short term milestone Sep 20, 2015
@mattab mattab added c: Usability For issues that let users achieve a defined goal more effectively or efficiently. Help wanted Beginner friendly issues or issues where we'd highly appreciate community's help and involvement. labels Sep 20, 2015
@sgiehl sgiehl self-assigned this Jan 3, 2016
sgiehl added a commit that referenced this issue Jan 3, 2016
@mattab mattab added the answered For when a question was asked and we referred to forum or answered it. label Oct 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
answered For when a question was asked and we referred to forum or answered it. c: Usability For issues that let users achieve a defined goal more effectively or efficiently. Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc. Help wanted Beginner friendly issues or issues where we'd highly appreciate community's help and involvement.
Projects
None yet
Development

No branches or pull requests

4 participants