Commit 9e75aa25 authored by Roque's avatar Roque Committed by Roque

Project management improvements

/reviewed-on nexedi/erp5!1000
parent eed166fb
Pipeline #7166 passed with stage
in 0 seconds
return [
context.Base_generateDomain(parent, 'validated', 'Validated', 'simulation_state', 'validated'),
context.Base_generateDomain(parent, 'not_validated', 'Not Validated', 'simulation_state', ['submitted', 'suspended', 'draft', 'invalidated']),
context.Base_generateDomain(parent, 'not_validated', 'Not Validated', 'simulation_state', ['submitted', 'suspended', 'invalidated']),
context.Base_generateDomain(parent, 'cancelled', 'Cancelled', 'simulation_state', ['cancelled', 'deleted'])
]
return [
context.Base_generateDomain(parent, 'started', 'Open', 'simulation_state', ['confirmed', 'ready']),
context.Base_generateDomain(parent, 'closed', 'Solved/Closed', 'simulation_state', ['delivered', 'stopped']),
context.Base_generateDomain(parent, 'not_started', 'Not Confirmed', 'simulation_state', ['draft', 'cancelled'])
context.Base_generateDomain(parent, 'not_started', 'Cancelled', 'simulation_state', ['cancelled'])
]
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Base Domain" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Add_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Add_portal_folders_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Copy_or_Move_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Delete_objects_Permission</string> </key>
<value>
<tuple>
<string>Assignor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Modify_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Assignee</string>
<string>Assignor</string>
<string>Manager</string>
<string>Owner</string>
</tuple>
</value>
</item>
<item>
<key> <string>_identity_criterion</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>_range_criterion</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>domain_generator_method_id</string> </key>
<value> <string>Base_generateDateMilestoneDomain</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>date_milestone_domain</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Base Domain</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Date Milestone Domain</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
from DateTime import DateTime
criterion_property = "delivery.stop_date"
now = DateTime()
domain_list = []
parents_criterion_dict = {}
def appendNewTempDomain(id, criterion_dict=None, **kw):
if criterion_dict is None:
criterion_dict = parents_criterion_dict
else:
criterion_dict.update(parents_criterion_dict)
domain = parent.generateTempDomain(id=id)
domain.edit(
criterion_property_list=criterion_dict.keys(),
**kw
)
for property_id, criterion_kw in criterion_dict.items():
domain.setCriterion(property_id, **criterion_kw)
domain_list.append(domain)
appendNewTempDomain(
id="future",
title="Future",
criterion_dict={criterion_property: {"min": now, "max": DateTime('9999/01/01 00:00')}},
)
appendNewTempDomain(
id="past",
title="Past",
criterion_dict={criterion_property: {"min": DateTime('1000/01/01 00:00'), "max": now}},
)
return domain_list
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>depth, parent, **kw</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Base_generateDateMilestoneDomain</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
return [
context.Base_generateDomain(parent, 'confirmed', 'Confirmed', 'validation_state', ['shared', 'released', 'published', 'shared_alive', 'released_alive', 'published_alive']),
context.Base_generateDomain(parent, 'not_confirmed', 'Not Confirmed', 'validation_state', ['submitted', 'draft', 'requested', 'assigned', 'translated', 'split']),
context.Base_generateDomain(parent, 'not_confirmed', 'Not Confirmed', 'validation_state', ['submitted', 'requested', 'assigned', 'translated', 'split']),
context.Base_generateDomain(parent, 'archived_discarded', 'Archived/Discarded', 'validation_state', ['archived', 'deleted', 'cancelled', 'hidden'])
]
return [
context.Base_generateDomain(parent, 'started', 'Started', 'validation_state', 'validated'),
context.Base_generateDomain(parent, 'not_started', 'Not Started', 'validation_state', ['draft', 'invalidated', 'suspended'])
context.Base_generateDomain(parent, 'not_started', 'Not Started', 'validation_state', ['invalidated', 'suspended'])
]
return [
context.Base_generateDomain(parent, 'confirmed', 'Confirmed', 'simulation_state', 'confirmed'),
context.Base_generateDomain(parent, 'not_confirmed', 'Not Confirmed', 'simulation_state', ['planned', 'ordered', 'draft']),
context.Base_generateDomain(parent, 'not_confirmed', 'Not Confirmed', 'simulation_state', ['planned', 'ordered']),
context.Base_generateDomain(parent, 'cancelled', 'Cancelled', 'simulation_state', ['cancelled', 'deleted'])
]
return [
context.Base_generateDomain(parent, 'started', 'Confirmed', 'simulation_state', 'confirmed'),
context.Base_generateDomain(parent, 'not_started', 'Not Confirmed', 'simulation_state', 'draft'),
context.Base_generateDomain(parent, 'closed', 'Closed', 'simulation_state', ['delivered', 'stopped'])
]
from Products.ZSQLCatalog.SQLCatalog import Query, ComplexQuery
kw.pop('relative_url', None)
kw.pop('follow_up_uid', None)
portal_catalog=context.getPortalObject().portal_catalog
project_object_list = portal_catalog(
portal_type=portal_type,
source_project_title=context.getTitle(), **kw)
kw['query'] = Query(relative_url='%s/%%' % context.getRelativeUrl().replace('_', r'\_'))
if project_object_list:
kw['query'] = ComplexQuery(
kw['query'],
Query(uid=[x.getUid() for x in project_object_list]),
logical_operator='or')
return portal_catalog(portal_type=portal_type, limit=limit, **kw)
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>portal_type= [], limit=None, **kw</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Project_getRelatedObjectList</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ERP5 Form" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>action</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>action_title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>edit_order</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>encoding</string> </key>
<value> <string>UTF-8</string> </value>
</item>
<item>
<key> <string>enctype</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>group_list</string> </key>
<value>
<list>
<string>left</string>
<string>right</string>
<string>center</string>
<string>bottom</string>
<string>hidden</string>
</list>
</value>
</item>
<item>
<key> <string>groups</string> </key>
<value>
<dictionary>
<item>
<key> <string>bottom</string> </key>
<value>
<list>
<string>listbox</string>
</list>
</value>
</item>
<item>
<key> <string>center</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>hidden</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>left</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>right</string> </key>
<value>
<list/>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Project_viewActivityList</string> </value>
</item>
<item>
<key> <string>method</string> </key>
<value> <string>POST</string> </value>
</item>
<item>
<key> <string>name</string> </key>
<value> <string>Base_viewDocumentList</string> </value>
</item>
<item>
<key> <string>pt</string> </key>
<value> <string>form_list</string> </value>
</item>
<item>
<key> <string>row_length</string> </key>
<value> <int>4</int> </value>
</item>
<item>
<key> <string>stored_encoding</string> </key>
<value> <string>UTF-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Activities</string> </value>
</item>
<item>
<key> <string>unicode_mode</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>update_action</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>update_action_title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -69,6 +69,14 @@
<key> <string>columns</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>domain_root_list</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>domain_tree</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>editable_columns</string> </key>
<value> <string></string> </value>
......@@ -285,7 +293,7 @@
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: [[t, t] for t in list(context.getPortalDocumentTypeList())+list(context.getPortalEmbeddedDocumentTypeList())]</string> </value>
<value> <string>python: [[t, t] for t in list(context.getPortalDocumentTypeList())+list(context.getPortalEmbeddedDocumentTypeList()) if t != \'Discussion Thread\']</string> </value>
</item>
</dictionary>
</pickle>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ERP5 Form" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>action</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>action_title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>edit_order</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>encoding</string> </key>
<value> <string>UTF-8</string> </value>
</item>
<item>
<key> <string>enctype</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>group_list</string> </key>
<value>
<list>
<string>left</string>
<string>right</string>
<string>center</string>
<string>bottom</string>
<string>hidden</string>
</list>
</value>
</item>
<item>
<key> <string>groups</string> </key>
<value>
<dictionary>
<item>
<key> <string>bottom</string> </key>
<value>
<list>
<string>listbox</string>
</list>
</value>
</item>
<item>
<key> <string>center</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>hidden</string> </key>
<value>
<list>
<string>listbox_int_index</string>
<string>listbox_quantity</string>
<string>listbox_stop_date</string>
<string>listbox_title</string>
</list>
</value>
</item>
<item>
<key> <string>left</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>right</string> </key>
<value>
<list/>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Project_viewMilestoneList</string> </value>
</item>
<item>
<key> <string>method</string> </key>
<value> <string>POST</string> </value>
</item>
<item>
<key> <string>name</string> </key>
<value> <string>Base_viewDocumentList</string> </value>
</item>
<item>
<key> <string>pt</string> </key>
<value> <string>form_list</string> </value>
</item>
<item>
<key> <string>row_length</string> </key>
<value> <int>4</int> </value>
</item>
<item>
<key> <string>stored_encoding</string> </key>
<value> <string>UTF-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Milestones</string> </value>
</item>
<item>
<key> <string>unicode_mode</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>update_action</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>update_action_title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>all_columns</string>
<string>anchor</string>
<string>columns</string>
<string>domain_root_list</string>
<string>domain_tree</string>
<string>editable_columns</string>
<string>portal_types</string>
<string>report_root_list</string>
<string>report_tree</string>
<string>selection_name</string>
<string>sort</string>
<string>title</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>listbox</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>Base_viewSearchResultList</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>all_columns</string> </key>
<value>
<list>
<tuple>
<string>quantity</string>
<string>Estimated Time</string>
</tuple>
<tuple>
<string>description</string>
<string>Description</string>
</tuple>
<tuple>
<string>outcome_description</string>
<string>Outcome</string>
</tuple>
</list>
</value>
</item>
<item>
<key> <string>all_editable_columns</string> </key>
<value>
<list>
<tuple>
<string>int_index</string>
<string>Index</string>
</tuple>
<tuple>
<string>quantity</string>
<string>Estimated Time</string>
</tuple>
<tuple>
<string>start_date</string>
<string>Begin</string>
</tuple>
<tuple>
<string>stop_date</string>
<string>End</string>
</tuple>
</list>
</value>
</item>
<item>
<key> <string>anchor</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>columns</string> </key>
<value>
<list>
<tuple>
<string>int_index</string>
<string>Index</string>
</tuple>
<tuple>
<string>title</string>
<string>Title</string>
</tuple>
<tuple>
<string>stop_date</string>
<string>End Date</string>
</tuple>
</list>
</value>
</item>
<item>
<key> <string>domain_root_list</string> </key>
<value>
<list>
<tuple>
<string>date_milestone_domain</string>
<string>Milestone Date</string>
</tuple>
</list>
</value>
</item>
<item>
<key> <string>domain_tree</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>editable_columns</string> </key>
<value>
<list>
<tuple>
<string>int_index</string>
<string>Index</string>
</tuple>
<tuple>
<string>quantity</string>
<string>Estimated Time</string>
</tuple>
<tuple>
<string>stop_date</string>
<string>End Date</string>
</tuple>
<tuple>
<string>title</string>
<string>Title</string>
</tuple>
</list>
</value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_view_mode_listbox</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewFieldLibrary</string> </value>
</item>
<item>
<key> <string>portal_types</string> </key>
<value>
<list>
<tuple>
<string>Project Milestone</string>
<string>Project Milestone</string>
</tuple>
<tuple>
<string>Sale Order Milestone</string>
<string>Sale Order Milestone</string>
</tuple>
</list>
</value>
</item>
<item>
<key> <string>report_root_list</string> </key>
<value>
<list>
<tuple>
<string>parent</string>
<string>Object Tree</string>
</tuple>
</list>
</value>
</item>
<item>
<key> <string>report_tree</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>selection_name</string> </key>
<value> <string>project_milestone_selection</string> </value>
</item>
<item>
<key> <string>sort</string> </key>
<value>
<list>
<tuple>
<string>id</string>
<string>id</string>
</tuple>
</list>
</value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Project Milestones</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>listbox_int_index</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_integer_value</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewFieldLibrary</string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="FloatField" module="Products.Formulator.StandardFields"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>listbox_quantity</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
<item>
<key> <string>not_float</string> </key>
<value> <string>You did not enter a floating point number.</string> </value>
</item>
<item>
<key> <string>required_not_found</string> </key>
<value> <string>Input is required but no input given.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_maxwidth</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_width</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>external_validator</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>extra</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>required</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>whitespace_preserve</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_maxwidth</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_width</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>external_validator</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>extra</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>required</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>whitespace_preserve</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string>figure</string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_maxwidth</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_width</string> </key>
<value> <int>10</int> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>external_validator</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>extra</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>input_style</string> </key>
<value> <string>-1 234.5</string> </value>
</item>
<item>
<key> <string>precision</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>required</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>listbox_quantity</string> </value>
</item>
<item>
<key> <string>whitespace_preserve</string> </key>
<value> <int>0</int> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>display_width</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>listbox_title</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>display_width</string> </key>
<value> <int>80</int> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_title</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewFieldLibrary</string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -52,11 +52,7 @@
}
.gadget-content div.project_links {
margin-top: 40px;
}
.gadget-content div.project_links.top {
margin-top: 20px;
margin-top: 12px;
}
button:disabled{
......@@ -69,14 +65,15 @@ input[type="submit"] {
.gadget-content a.first-line-buttons {
padding: 6pt;
margin-top: 30pt;
margin-top: 12px;
margin-right: 6pt;
background-color: #FFF;
color: #111;
border-radius: 0.325em;
border-width: 1px;
border-style: solid;
min-width: 8em;
text-align: center;
display: inline-block;
}
.gadget-content span.test-result {
......@@ -99,6 +96,10 @@ input[type="submit"] {
visibility: hidden;
}
.gadget-content svg.test-result {
margin-right: 7px;
}
.gadget-content svg.test-result.fail {
fill: red;
}
......
......@@ -12,41 +12,19 @@
<body>
<div class="ui-field-contain project_links top">
<div>
<p>
<a id="activity_link" class="first-line-buttons ui-disabled" data-i18n="[value]Activities" disabled >Activities</a>
<a id="milestone_link" class="first-line-buttons ui-disabled" data-i18n="[value]Milestones" disabled >Milestones</a>
<a id="support_request_link" class="first-line-buttons ui-disabled" data-i18n="[value]Support Requests" disabled >Support requests</a>
<a id="document_link" class="first-line-buttons ui-disabled" data-i18n="[value]Documents" disabled >Documents</a>
</p>
</div>
<div class="ui-field-contain project_links">
<p>
<a id="bug_link" class="first-line-buttons ui-disabled" data-i18n="[value]Bugs" disabled >Opened Bugs</a>
<a id="closed_bug_link" class="first-line-buttons ui-disabled" data-i18n="[value]Closed Bugs" disabled >Closed Bugs</a>
</p>
</div>
<div class="ui-field-contain project_links">
<p>
<a id="support_request_link" class="first-line-buttons ui-disabled" data-i18n="[value]Support Requests" disabled >Support requests</a>
<a id="task_link" class="first-line-buttons ui-disabled" data-i18n="[value]Confirmed Tasks" disabled >Confirmed Tasks</a>
<a id="not_confirmed_task_link" class="first-line-buttons ui-disabled" data-i18n="[value]Not Confirmed Tasks" disabled >Not Confirmed Tasks</a>
<a id="report_link" class="first-line-buttons ui-disabled" data-i18n="[value]Task Reports" disabled >Opened Task Reports</a>
<a id="closed_report_link" class="first-line-buttons ui-disabled" data-i18n="[value]Closed Task Reports" disabled >Closed Task Reports</a>
</p>
</div>
<div class="ui-field-contain project_links">
<p>
<span id="test_result_span" class="test-result ui-disabled">
<a id="test_result_link" class="ui-disabled" data-i18n="[value]Last test result" disabled >Last test result</a>
</span>
<a id="bug_link" class="first-line-buttons ui-disabled" data-i18n="[value]Bugs" disabled >Opened Bugs</a>
<a id="test_suite_link" class="first-line-buttons ui-disabled" data-i18n="[value]Test suite" disabled >Test suite</a>
<a id="test_result_link" class="first-line-buttons ui-disabled" data-i18n="[value]Last test result" disabled >Last test result</a>
<svg id="test_result_svg" class="test-result ui-hidden" width="14" height="14" viewBox="0 0 14 14" xmlns="http://www.w3.org/2000/svg"><g fill-rule="evenodd"><path d="M0 7a7 7 0 1 1 14 0A7 7 0 0 1 0 7z"></path><path d="M13 7A6 6 0 1 0 1 7a6 6 0 0 0 12 0z" fill="#FFF"></path><path id="test_result_fail" class="ui-hidden" d="M7 5.969L5.599 4.568a.29.29 0 0 0-.413.004l-.614.614a.294.294 0 0 0-.004.413L5.968 7l-1.4 1.401a.29.29 0 0 0 .004.413l.614.614c.113.114.3.117.413.004L7 8.032l1.401 1.4a.29.29 0 0 0 .413-.004l.614-.614a.294.294 0 0 0 .004-.413L8.032 7l1.4-1.401a.29.29 0 0 0-.004-.413l-.614-.614a.294.294 0 0 0-.413-.004L7 5.968z"></path><path id="test_result_pass" class="ui-hidden" d="M6.278 7.697L5.045 6.464a.296.296 0 0 0-.42-.002l-.613.614a.298.298 0 0 0 .002.42l1.91 1.909a.5.5 0 0 0 .703.005l.265-.265L9.997 6.04a.291.291 0 0 0-.009-.408l-.614-.614a.29.29 0 0 0-.408-.009L6.278 7.697z"></path><path id="test_result_running" class="ui-hidden" d="M7 3c2.2 0 4 1.8 4 4s-1.8 4-4 4c-1.3 0-2.5-.7-3.3-1.7L7 7V3"></path></g></svg>
</p>
</div>
<div class="ui-field-contain project_links">
<p>
<a id="web_page_link" class="first-line-buttons ui-disabled" data-i18n="[value]Edit Project Page" disabled >Edit Project Page</a>
<a id="rss_link" target="_blank" class="first-line-buttons ui-disabled" data-i18n="[value]Generate RSS" disabled >Generate RSS</a>
</p>
</div>
<div class="ui-field-contain project_links">
......
......@@ -33,8 +33,7 @@
return view_list.filter(d => d.name === name)[0].href;
}
function setLastTestResult(gadget, project_title, span_element, svg_element) {
span_element.classList.remove("ui-disabled");
function setLastTestResult(gadget, project_title, svg_element) {
var query = createProjectQuery(project_title,
[["portal_type", "Test Result"]]);
return gadget.jio_allDocs({
......@@ -198,63 +197,52 @@
.push(function () {
return RSVP.all([
getWebPageInfo(gadget, modification_dict.project_reference),
gadget.jio_getAttachment(modification_dict.jio_key, "links"),
gadget.getDeclaredGadget("editor"),
gadget.getSetting("hateoas_url")
]);
})
.push(function (result_list) {
var milestone_view = getActionListByName(
ensureArray(result_list[1]._links.view),
"milestone"
),
document_view = result_list[3] +
var document_view = result_list[2] +
'/ERP5Document_getHateoas?mode=traverse&relative_url=' +
modification_dict.jio_key + '&view=Project_viewDocumentList';
modification_dict.jio_key + '&view=Project_viewDocumentList',
milestone_view = result_list[2] +
'/ERP5Document_getHateoas?mode=traverse&relative_url=' +
modification_dict.jio_key + '&view=Project_viewMilestoneList',
activity_view = result_list[2] +
'/ERP5Document_getHateoas?mode=traverse&relative_url=' +
modification_dict.jio_key + '&view=Project_viewActivityList';
web_page_info = result_list[0];
editor = result_list[2];
editor.render({"editor": "fck_editor", "editable": false,
"value": web_page_info.content});
if (web_page_info.id) {
editor = result_list[1];
editor.render({"editor": "fck_editor", "editable": false, "maximize": true,
"value": web_page_info.content});
}
return gadget.getUrlForList([
getUrlParameterDict('milestone_module', milestone_view, [["stop_date", "ascending"]]),
getUrlParameterDict('milestone_module', milestone_view, [["stop_date", "ascending"]],
null, createProjectQuery(null, [["selection_domain_date_milestone_domain", "future"]])),
getUrlParameterDict('task_module', "view", [["delivery.start_date", "descending"]],
["title", "delivery.start_date", "delivery.stop_date", "destination_decision_title",
"source_title", "destination_title", "total_quantity", "task_line_quantity_unit_title"],
["title", "delivery.start_date", "source_title"],
createProjectQuery(modification_dict.project_title,
[["selection_domain_state_task_domain", "confirmed"]])),
getUrlParameterDict('support_request_module', "view", [["delivery.start_date", "descending"]],
null, createProjectQuery(modification_dict.project_title,
[["selection_domain_state_support_domain", "validated"]])),
getUrlParameterDict('bug_module', "view", [["delivery.start_date", "descending"]],
["title", "description", "delivery.start_date"],
["title", "description", "source_person_title", "destination_person_title", "delivery.start_date"],
createProjectQuery(modification_dict.project_title,
[["selection_domain_state_bug_domain", "started"]])),
getUrlParameterDict('bug_module', "view", [["delivery.start_date", "descending"]],
["title", "description", "delivery.start_date"],
createProjectQuery(modification_dict.project_title,
[["selection_domain_state_bug_domain", "closed"]])),
getUrlParameterDict('task_report_module', 'view', [["delivery.start_date", "descending"]],
["title", "delivery.start_date", "delivery.stop_date", "destination_decision_title",
"source_title", "destination_title", "total_quantity", "task_line_quantity_unit_title"],
["title", "delivery.start_date", "source_title"],
createProjectQuery(modification_dict.project_title,
[["selection_domain_state_task_report_domain", "started"]])),
getUrlParameterDict('task_report_module', 'view', [["delivery.start_date", "descending"]],
["title", "delivery.start_date", "delivery.stop_date", "destination_decision_title",
"source_title", "destination_title", "total_quantity", "task_line_quantity_unit_title"],
createProjectQuery(modification_dict.project_title,
[["selection_domain_state_task_report_domain", "closed"]])),
getUrlParameterDict('test_result_module', 'view', [["delivery.start_date", "descending"]],
null, createProjectQuery(modification_dict.project_title, [])),
getUrlParameterDict('test_suite_module', 'view', [["creation_date", "descending"]],
null, createProjectQuery(modification_dict.project_title, [])),
getUrlParameterDict('task_module', "view", [["delivery.start_date", "descending"]],
["title", "delivery.start_date", "delivery.stop_date", "destination_decision_title",
"source_title", "destination_title", "total_quantity", "task_line_quantity_unit_title"],
createProjectQuery(modification_dict.project_title,
[["selection_domain_state_task_domain", "not_confirmed"]])),
getUrlParameterDict(web_page_info.id, web_page_info.edit_view),
getUrlParameterDict(modification_dict.jio_key, document_view, [["modification_date", "descending"]],
null, createProjectQuery(null, [["selection_domain_state_document_domain", "confirmed"]]))
["download", "title", "reference", "modification_date"], createProjectQuery(null, [["selection_domain_state_document_domain", "confirmed"]])),
getUrlParameterDict(modification_dict.jio_key, activity_view, [["modification_date", "descending"]])
]);
})
.push(function (url_list) {
......@@ -262,18 +250,15 @@
enableLink(document.getElementById("task_link"), url_list[1]);
enableLink(document.getElementById("support_request_link"), url_list[2]);
enableLink(document.getElementById("bug_link"), url_list[3]);
enableLink(document.getElementById("closed_bug_link"), url_list[4]);
enableLink(document.getElementById("report_link"), url_list[5]);
enableLink(document.getElementById("closed_report_link"), url_list[6]);
enableLink(document.getElementById("test_result_link"), url_list[7]);
enableLink(document.getElementById("test_suite_link"), url_list[8]);
enableLink(document.getElementById("not_confirmed_task_link"), url_list[9]);
enableLink(document.getElementById("report_link"), url_list[4]);
enableLink(document.getElementById("test_result_link"), url_list[5]);
enableLink(document.getElementById("test_suite_link"), url_list[6]);
if (web_page_info.id) {
enableLink(document.getElementById("web_page_link"), url_list[10]);
enableLink(document.getElementById("web_page_link"), url_list[7]);
}
enableLink(document.getElementById("document_link"), url_list[11]);
enableLink(document.getElementById("document_link"), url_list[8]);
enableLink(document.getElementById("activity_link"), url_list[9]);
setLastTestResult(gadget, modification_dict.project_title,
document.getElementById("test_result_span"),
document.getElementById("test_result_svg"));
});
})
......
......@@ -125,7 +125,7 @@
</tr>
<tr>
<td>assertElementPresent</td>
<td>//div[@data-gadget-url='${base_url}/web_site_module/project_management/gadget_project_info.html']//a[text()='Milestones' and contains(@href, '#!push_history') and contains(@href, 'n.jio_key=milestone_module') and contains(@href, 'view%3Dmilestone')]</td>
<td>//div[@data-gadget-url='${base_url}/web_site_module/project_management/gadget_project_info.html']//a[text()='Milestones' and contains(@href, '#!push_history') and contains(@href, 'n.jio_key=milestone_module')]</td>
<td></td>
</tr>
......@@ -143,13 +143,13 @@
<tr>
<td>assertElementPresent</td>
<td>//div[@data-gadget-url='${base_url}/web_site_module/project_management/gadget_project_info.html']//a[text()='Opened Bugs']</td>
<td>//div[@data-gadget-url='${base_url}/web_site_module/project_management/gadget_project_info.html']//a[text()='Activities']</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//div[@data-gadget-url='${base_url}/web_site_module/project_management/gadget_project_info.html']//a[text()='Closed Bugs']</td>
<td>//div[@data-gadget-url='${base_url}/web_site_module/project_management/gadget_project_info.html']//a[text()='Opened Bugs']</td>
<td></td>
</tr>
......@@ -159,24 +159,12 @@
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//div[@data-gadget-url='${base_url}/web_site_module/project_management/gadget_project_info.html']//a[text()='Not Confirmed Tasks']</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//div[@data-gadget-url='${base_url}/web_site_module/project_management/gadget_project_info.html']//a[text()='Opened Task Reports']</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//div[@data-gadget-url='${base_url}/web_site_module/project_management/gadget_project_info.html']//a[text()='Closed Task Reports']</td>
<td></td>
</tr>
<tr>
<td>assertElementPresent</td>
<td>//div[@data-gadget-url='${base_url}/web_site_module/project_management/gadget_project_info.html']//a[text()='Last test result']</td>
......@@ -195,6 +183,11 @@
<td></td>
</tr>
<tr>
<td>assertElementNotPresent</td>
<td>//button[text()="Maximize"]</td>
<td></td>
</tr>
</tbody></table>
</body>
</html>
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment