Commit b58d0f9d authored by Jérome Perrin's avatar Jérome Perrin

forge: drop "send open bug reminder" alarm

I don't think anybody still uses this.
parent 0aa7b0f0
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Alarm" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>active_sense_method_id</string> </key>
<value> <string>BugModule_sendOpenBugListReminder</string> </value>
</item>
<item>
<key> <string>alarm_date</string> </key>
<value>
<object>
<klass>
<global id="1.1" name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1158577260.0</float>
<string>GMT+2</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string>Sends a summary email with all open bugs.</string> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>open_bugs_alarm</string> </value>
</item>
<item>
<key> <string>periodicity_day_frequency</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>periodicity_hour</string> </key>
<value>
<tuple>
<int>13</int>
</tuple>
</value>
</item>
<item>
<key> <string>periodicity_hour_frequency</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>periodicity_minute</string> </key>
<value>
<tuple>
<int>1</int>
</tuple>
</value>
</item>
<item>
<key> <string>periodicity_minute_frequency</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>periodicity_month</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>periodicity_month_day</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>periodicity_month_frequency</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>periodicity_start_date</string> </key>
<value>
<object>
<klass> <reference id="1.1"/> </klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1157061600.0</float>
<string>GMT+2</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key> <string>periodicity_stop_date</string> </key>
<value>
<object>
<klass> <reference id="1.1"/> </klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>32503676400.0</float>
<string>GMT+1</string>
</tuple>
</state>
</object>
</value>
</item>
<item>
<key> <string>periodicity_week</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>periodicity_week_day</string> </key>
<value>
<tuple>
<string>Monday</string>
</tuple>
</value>
</item>
<item>
<key> <string>periodicity_week_frequency</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Alarm</string> </value>
</item>
<item>
<key> <string>sense_method_id</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>sid</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Open bugs alarm</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
portal = context.getPortalObject()
bug_module = portal.bug_module
server_url = portal.ERP5Site_getAbsoluteUrl()
body_text_line_list = []
addBodyLine = body_text_line_list.append
bug_count = 0
assigned_to_dict={}
not_assigned_bug_list=[]
for bug in bug_module.searchFolder(portal_type='Bug',
simulation_state=('confirmed', 'set_ready',),
sort_on=(('id', 'asc', 'int'),)):
bug = bug.getObject()
if bug.getSource():
assigned_to_dict.setdefault(bug.getSource(), []).append(bug)
else:
not_assigned_bug_list.append(bug)
bug_count += 1
for assignee, bug_list in assigned_to_dict.items():
addBodyLine(" Assigned to %s:" % bug_list[0].getSourceTitle())
for bug in bug_list:
addBodyLine(" [%s] %s" % (bug.getReference(), bug.getTitle()))
addBodyLine(" %s/%s/view" % (server_url, bug.getRelativeUrl()))
addBodyLine('')
addBodyLine('')
if not_assigned_bug_list:
addBodyLine('')
addBodyLine(" Not assigned:")
for bug in not_assigned_bug_list:
addBodyLine(" [%s] %s" % (bug.getReference(), bug.getTitle()))
addBodyLine(" %s/%s/view" % (server_url, bug.getRelativeUrl()))
addBodyLine('')
if bug_count:
portal.portal_notifications.sendMessage(sender=None,
recipient=[],
subject="%s: %s Open Bugs" % (portal.title_or_id(), bug_count,),
message='\n'.join(body_text_line_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></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>BugModule_sendOpenBugListReminder</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
portal_alarms/open_bugs_alarm
portal_categories/business_field/*
portal_domains/state_bug_domain
\ 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