issue #23965: restrict opportunities to 30 days
authorSteve Hackbarth <stephenhackbarth@gmail.com>
Fri, 20 Jun 2014 01:03:45 +0000 (21:03 -0400)
committerSteve Hackbarth <stephenhackbarth@gmail.com>
Fri, 20 Jun 2014 01:03:45 +0000 (21:03 -0400)
enyo-client/extensions/source/crm/client/en/strings.js
enyo-client/extensions/source/crm/client/widgets/chart.js

index 0439165..f204ccf 100644 (file)
@@ -13,6 +13,7 @@ strict:true, trailing:true, white:true */
     "_highPriority": "High Priority",
     "_incidentDefaultPublic": "Comment Default Public",
     "_incidentStatusColors": "Incident Status Colors",
+    "_opportunitiesNext30Days": "Opportunities Next 30 Days",
     "_maintainEmailProfiles": "Maintain Email Profiles",
     "_staleAnalysisWarning": "Free trial demo analysis data will not be updated from your live changes.",
     "_viewEmailProfiles": "View Email Profiles"
index 6e8338c..5e1e70d 100644 (file)
@@ -38,7 +38,7 @@ trailing:true, white:true*/
       name: "XV.OpportunityBarChart",
       kind: "XV.DrilldownBarChart",
       collection: "XM.OpportunityListItemCollection",
-      chartTitle: "_opportunities".loc(),
+      chartTitle: "_opportunitiesNext30Days".loc(),
       groupByOptions: [
         { name: "opportunityStage", content: "_stage".loc() },
         { name: "opportunitySource", content: "_source".loc() },
@@ -47,6 +47,17 @@ trailing:true, white:true*/
         { name: "assignedTo" },
         { name: "priority" }
       ],
+      query: {
+        parameters: [{
+          attribute: "targetClose",
+          operator: ">=",
+          value: XT.date.applyTimezoneOffset(XV.Date.prototype.textToDate("0"), true)
+        }, {
+          attribute: "targetClose",
+          operator: "<=",
+          value: XT.date.applyTimezoneOffset(XV.Date.prototype.textToDate("+30"), true)
+        }],
+      },
       totalField: "amount"
     });