Added workflow date indexes
authorThierry Florac <thierry.florac@onf.fr>
Wed, 12 Jul 2017 11:42:15 +0200
changeset 101 0ec0c7bee139
parent 100 2aa1c599a3ea
child 102 58cde0290f69
Added workflow date indexes
src/pyams_content/generations/__init__.py
--- a/src/pyams_content/generations/__init__.py	Wed Jul 12 11:41:38 2017 +0200
+++ b/src/pyams_content/generations/__init__.py	Wed Jul 12 11:42:15 2017 +0200
@@ -16,7 +16,7 @@
 # import standard library
 
 # import interfaces
-from pyams_catalog.interfaces import DATE_RESOLUTION
+from pyams_catalog.interfaces import MINUTE_RESOLUTION, DATE_RESOLUTION
 from pyams_content.interfaces import IBaseContent
 from pyams_content.component.links.interfaces import IInternalLink, IInternalReferencesList
 from pyams_content.root.interfaces import ISiteRootToolsConfiguration
@@ -77,10 +77,19 @@
                                                                    'resolution': DATE_RESOLUTION}),
                     ('publication_date', DatetimeIndexWithInterface, {'interface': IWorkflowPublicationInfo,
                                                                       'discriminator': 'publication_date',
-                                                                      'resolution': DATE_RESOLUTION}),
+                                                                      'resolution': MINUTE_RESOLUTION}),
+                    ('effective_date', DatetimeIndexWithInterface, {'interface': IWorkflowPublicationInfo,
+                                                                    'discriminator': 'publication_effective_date',
+                                                                    'resolution': MINUTE_RESOLUTION}),
+                    ('push_end_date', DatetimeIndexWithInterface, {'interface': IWorkflowPublicationInfo,
+                                                                   'discriminator': 'push_end_date_index',
+                                                                   'resolution': MINUTE_RESOLUTION}),
+                    ('expiration_date', DatetimeIndexWithInterface, {'interface': IWorkflowPublicationInfo,
+                                                                     'discriminator': 'publication_expiration_date',
+                                                                     'resolution': MINUTE_RESOLUTION}),
                     ('first_publication_date', DatetimeIndexWithInterface, {'interface': IWorkflowPublicationInfo,
                                                                             'discriminator': 'first_publication_date',
-                                                                            'resolution': DATE_RESOLUTION}),
+                                                                            'resolution': MINUTE_RESOLUTION}),
                     ('link_reference', FieldIndexWithInterface, {'interface': IInternalLink,
                                                                  'discriminator': 'reference'}),
                     ('link_references', KeywordIndexWithInterface, {'interface': IInternalReferencesList,