Opened 16 months ago

Closed 13 months ago

Last modified 11 months ago

#3636 closed New feature (fixed)

Add new parmeter &pattern= to MultiSites.getAll to allow searching for websites

Reported by: tsteur Owned by: matt
Priority: major Milestone: 1.12 - The Great 1.x Backlog
Component: Core Keywords:
Cc: Sensitive: no

Description

Hi,

for new Piwik Mobile version, I need a MultiSite enhancement. Talked with some Piwik users and we need to improve the "Available Websites" view in next version. It'll be more like an "All Websites Dashboard". Usually, I'd just use MultiSites.getAll, but I need the possibility to search for websites. Because some users have thousands of websites.

Is it possible to
a) Add a parameter "pattern" to MultiSite.getAll to return only websites, that matches the given pattern. Similar to "SitesManager.getPatternMatchSites"?
b) Add a new method MultiSite.getPatternMatchSites(pattern, period, date, segment = , enhanced = )?

I need either a) or b). It also has to support "filter_limit" parameter.

On tablets, the "All websites dashboard" view will nearly display all data returned by the MultiSites API. Of course, I could use method "SitesManager.getPatternMatchSites" to fetch list of available websites and then use MultiSites.getOne via "batch API requests". But I think this will be slow especially when requesting 50 websites. In addition, "SitesManager.getPatternMatchSites" returns lots of data I don't need. I just need idSite + website name which I'll get via MultiSite.

Is it possible to get this in the next 4 weeks? Is it difficult?

Change History (7)

comment:1 Changed 16 months ago by matt (mattab)

  • Owner set to matt

Working on it, good idea - will go for a)

comment:2 Changed 16 months ago by matt (mattab)

  • Resolution set to fixed
  • Status changed from new to closed

(In [7717]) Fixes #3636 Hopefully I haven't broken anything!

Added new parmeter &pattern= to MultiSites.getAll

Thomas let me know if any feedback on this!

comment:4 Changed 14 months ago by matt (mattab)

  • Resolution fixed deleted
  • Status changed from closed to reopened

comment:5 Changed 14 months ago by matt (mattab)

  • Milestone changed from 1.12.x - Piwik 1.12.x to 1.12 - Piwik 1.12
  • Priority changed from major to critical

comment:6 Changed 13 months ago by matt (mattab)

  • Resolution set to fixed
  • Status changed from reopened to closed

In 5001bdda1f78c27a5040be3da5b596ee2ba90238:

fixes #3636
Now returning zero result when no site matches the pattern
Sorry for the delay Thomas!

comment:7 Changed 11 months ago by matt (mattab)

  • Priority changed from critical to major
  • Summary changed from Need MultiSite API enhancement to Add new parmeter &pattern= to MultiSites.getAll to allow searching for websites
Note: See TracTickets for help on using tickets.