diff --git a/src/design/plone/contenttypes/indexers/configure.zcml b/src/design/plone/contenttypes/indexers/configure.zcml
index 74795f3d..eb8c127b 100644
--- a/src/design/plone/contenttypes/indexers/configure.zcml
+++ b/src/design/plone/contenttypes/indexers/configure.zcml
@@ -4,6 +4,10 @@
factory=".events.event_location"
name="event_location"
/>
+
- 7306
+ 7308
profile-redturtle.bandi:default
profile-collective.venue:default
diff --git a/src/design/plone/contenttypes/profiles/default/registry/criteria.xml b/src/design/plone/contenttypes/profiles/default/registry/criteria.xml
index 730d900a..068b2c5a 100644
--- a/src/design/plone/contenttypes/profiles/default/registry/criteria.xml
+++ b/src/design/plone/contenttypes/profiles/default/registry/criteria.xml
@@ -568,4 +568,25 @@
remove="True"
>
+
+ Data effettiva di inizio evento
+ Criterio per ricerche che si basano sulla data effettiva di inizio
+ True
+ True
+
+ plone.app.querystring.operation.date.lessThan
+ plone.app.querystring.operation.date.largerThan
+ plone.app.querystring.operation.date.between
+ plone.app.querystring.operation.date.lessThanRelativeDate
+ plone.app.querystring.operation.date.largerThanRelativeDate
+ plone.app.querystring.operation.date.today
+ plone.app.querystring.operation.date.beforeToday
+ plone.app.querystring.operation.date.afterToday
+ plone.app.querystring.operation.date.beforeRelativeDate
+ plone.app.querystring.operation.date.afterRelativeDate
+
+ Dates
+
+
diff --git a/src/design/plone/contenttypes/upgrades/configure.zcml b/src/design/plone/contenttypes/upgrades/configure.zcml
index d766a20d..05268fd6 100644
--- a/src/design/plone/contenttypes/upgrades/configure.zcml
+++ b/src/design/plone/contenttypes/upgrades/configure.zcml
@@ -898,5 +898,18 @@
destination="7306"
handler=".to_730x.to_7306"
/>
-
+
+
diff --git a/src/design/plone/contenttypes/upgrades/to_730x.py b/src/design/plone/contenttypes/upgrades/to_730x.py
index 1bea0aa3..d5dcdd5d 100644
--- a/src/design/plone/contenttypes/upgrades/to_730x.py
+++ b/src/design/plone/contenttypes/upgrades/to_730x.py
@@ -132,3 +132,29 @@ def to_7306(context):
if behavior not in behaviors:
behaviors.append(behavior)
portal_type.behaviors = tuple(behaviors)
+
+
+def to_7307(context):
+ logger.info("Update registry")
+ update_registry(context)
+ logger.info("Add new effectivestart (DateRecurringIndex) index")
+
+ class extra:
+ recurdef = "recurrence"
+ until = ""
+
+ name = "effectivestart"
+ catalog = api.portal.get_tool(name="portal_catalog")
+ catalog.addIndex(name, "DateRecurringIndex", extra=extra())
+ logger.info("Catalog DateRecurringIndex {} created.".format(name))
+
+
+def to_7308(context):
+ logger.info("Reindex Events")
+ pc = api.portal.get_tool(name="portal_catalog")
+ brains = pc(portal_type="Event")
+ tot = len(brains)
+ for i, brain in enumerate(brains):
+ if i % 15 == 0:
+ logger.info("Progress: {}/{}".format(i, tot))
+ brain.getObject().reindexObject(idxs=["effectivestart"])