Permalink
Browse files

blowing away repo (wrong directory)

  • Loading branch information...
1 parent 2c575a6 commit bcd08a25e74b0d636d7c6eae493a047e8ab86f31 @sfckemp sfckemp committed Aug 10, 2011
Showing with 0 additions and 3,457 deletions.
  1. 0 README
  2. +0 −14 applications/The_Chatter_Game.app
  3. +0 −298 classes/ChatterGameGoalAchievement.cls
  4. +0 −5 classes/ChatterGameGoalAchievement.cls-meta.xml
  5. +0 −432 classes/ChatterGameGoalAchievementTest.cls
  6. +0 −5 classes/ChatterGameGoalAchievementTest.cls-meta.xml
  7. +0 −152 classes/ChatterGameGoalSetupWizardController.cls
  8. +0 −5 classes/ChatterGameGoalSetupWizardController.cls-meta.xml
  9. +0 −88 classes/GamificationTestUtility.cls
  10. +0 −5 classes/GamificationTestUtility.cls-meta.xml
  11. +0 −48 classes/RunBatchCheckController.cls
  12. +0 −5 classes/RunBatchCheckController.cls-meta.xml
  13. +0 −6 dashboards/The_Chatter_Game_Dashboards-meta.xml
  14. +0 −144 dashboards/The_Chatter_Game_Dashboards/The_Chatter_Game_Dashboard.dashboard
  15. +0 −6 documents/The_Chatter_Game-meta.xml
  16. BIN documents/The_Chatter_Game/The_Chatter_Game_App_Logo.png
  17. +0 −6 documents/The_Chatter_Game/The_Chatter_Game_App_Logo.png-meta.xml
  18. +0 −72 layouts/Achievement__c-Achievement Layout.layout
  19. +0 −64 layouts/Goal_Participant__c-Goal Participant Layout.layout
  20. +0 −251 layouts/Goal__c-Alternate Goal Layout.layout
  21. +0 −163 layouts/Goal__c-Chatter Game Goal Layout.layout
  22. +0 −163 layouts/Goal__c-Goal Layout.layout
  23. +0 −135 objects/Achievement__c.object
  24. +0 −69 objects/Goal_Participant__c.object
  25. +0 −353 objects/Goal__c.object
  26. +0 −125 package.xml
  27. +0 −131 pages/ChatterGameGettingStarted.page
  28. +0 −5 pages/ChatterGameGettingStarted.page-meta.xml
  29. +0 −22 pages/ChatterGameGoalSetupSuccess.page
  30. +0 −5 pages/ChatterGameGoalSetupSuccess.page-meta.xml
  31. +0 −125 pages/ChatterGameGoalSetupWizard.page
  32. +0 −5 pages/ChatterGameGoalSetupWizard.page-meta.xml
  33. +0 −5 pages/RunBatchCheckButton.page
  34. +0 −5 pages/RunBatchCheckButton.page-meta.xml
  35. +0 −18 pages/RunBatchCheckSuccess.page
  36. +0 −5 pages/RunBatchCheckSuccess.page-meta.xml
  37. +0 −6 reports/The_Chatter_Game_Reports-meta.xml
  38. +0 −30 reports/The_Chatter_Game_Reports/Achievements_by_User_by_Goal.report
  39. +0 −50 reports/The_Chatter_Game_Reports/Active_Goals_Participation_by_User.report
  40. +0 −50 reports/The_Chatter_Game_Reports/Active_Goals_by_Participants.report
  41. +0 −34 reports/The_Chatter_Game_Reports/Points_Awarded_Month_over_Month.report
  42. +0 −34 reports/The_Chatter_Game_Reports/Points_Awarded_Week_overWeek.report
  43. +0 −36 reports/The_Chatter_Game_Reports/Points_Awarded_by_Goal.report
  44. +0 −36 reports/The_Chatter_Game_Reports/Points_Awarded_this_Month_by_Goal.report
  45. +0 −36 reports/The_Chatter_Game_Reports/Points_Awarded_this_Week_by_Goal.report
  46. +0 −36 reports/The_Chatter_Game_Reports/Points_Earned_this_Month.report
  47. +0 −36 reports/The_Chatter_Game_Reports/Points_Earned_this_Week.report
  48. BIN staticresources/Gamification.resource
  49. +0 −5 staticresources/Gamification.resource-meta.xml
  50. BIN staticresources/The_Chatter_Game_Logo.resource
  51. +0 −5 staticresources/The_Chatter_Game_Logo.resource-meta.xml
  52. +0 −7 tabs/Achievement__c.tab
  53. +0 −7 tabs/Chatter_Game_Getting_Started.tab
  54. +0 −8 tabs/Chatter_Game_Goal_Setup_Wizard.tab
  55. +0 −7 tabs/Goal__c.tab
  56. +0 −46 triggers/FeedCommentAcheivementCheckTrigger.trigger
  57. +0 −5 triggers/FeedCommentAcheivementCheckTrigger.trigger-meta.xml
  58. +0 −38 triggers/FeedItemAcheivementCheckTrigger.trigger
  59. +0 −5 triggers/FeedItemAcheivementCheckTrigger.trigger-meta.xml
View
0 README
No changes.
View
14 applications/The_Chatter_Game.app
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<CustomApplication xmlns="http://soap.sforce.com/2006/04/metadata">
- <defaultLandingTab>Chatter_Game_Getting_Started</defaultLandingTab>
- <description>The Chatter Game allows your users to earn points by rewarding desired behaviours, like posting on Chatter, following others, and having the most insightful posts as voted by other Chatter users.</description>
- <label>The Chatter Game</label>
- <logo>The_Chatter_Game/The_Chatter_Game_App_Logo.png</logo>
- <tab>Chatter_Game_Getting_Started</tab>
- <tab>standard-Chatter</tab>
- <tab>Chatter_Game_Goal_Setup_Wizard</tab>
- <tab>Goal__c</tab>
- <tab>Achievement__c</tab>
- <tab>standard-report</tab>
- <tab>standard-Dashboard</tab>
-</CustomApplication>
View
298 classes/ChatterGameGoalAchievement.cls
@@ -1,298 +0,0 @@
-/*
-Copyright (c) 2011 salesforce.com, inc.
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions
-are met:
-
-1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-3. The name of the author may not be used to endorse or promote products
- derived from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR
-IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
-INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-By: Chris Kemp <ckemp@salesforce.com>
-*/
-
-public with sharing class ChatterGameGoalAchievement {
-
- @future
- public static void checkPost(List<Id> feedItemIds) {
-
- List<FeedItem> postList =
- [SELECT Id, InsertedById, ParentId, Type FROM FeedItem WHERE Id IN :feedItemIds];
-
- List<Achievement__c> achievementList = new List<Achievement__c>{};
-
- // Go through each updated record
- for (FeedItem thisFeedItem : postList) {
-
- String currentUserId = thisFeedItem.InsertedById;
- String[] goalsParticipatingIn = new String[0];
-
- // Get all Goals that user is participating in
- for (Goal_Participant__c gp :
- [SELECT Goal__c
- FROM Goal_Participant__c
- WHERE User__c = :currentUserId
- ]) {
-
- goalsParticipatingIn.add(gp.Goal__c);
- }
-
- // Get all active Goals that match criteria for this FeedItem and User who
- // FeedItem is assigned to is participating in
- for (Goal__c thisGoal :
- [SELECT Id, Name, Chatter_Type__c, Reward_Amount__c
- FROM Goal__c
- WHERE Type__c = 'Chatter'
- AND Status__c = 'Active'
- AND (Start_Date__c = NULL OR Start_Date__c <= TODAY)
- AND (End_Date__c = NULL OR End_Date__c >= TODAY)
- AND (Chatter_Type__c = 'Post' OR
- Chatter_Type__c = 'PostFile' OR
- Chatter_Type__c = 'PostLink')
- AND Id IN :goalsParticipatingIn
- ]) {
-
- // Save new achievement if criteria are met (no check necessary for previous
- // achievements since you can only insert FeedItems)
- if (!thisFeedItem.Type.equals('TrackedChange') &&
- (thisGoal.Chatter_Type__c.equals('Post') ||
- (thisGoal.Chatter_Type__c.equals('PostFile') &&
- thisFeedItem.Type.equals('ContentPost')) ||
- (thisGoal.Chatter_Type__c.equals('PostLink') &&
- thisFeedItem.Type.equals('LinkPost')))) {
-
- Achievement__c achievement = new Achievement__c();
- achievement.Goal__c = thisGoal.Id;
- achievement.Object_Id__c = thisFeedItem.ParentId + '?ChatterFeedItemId='
- + thisFeedItem.Id;
- achievement.Points_Awarded__c = thisGoal.Reward_Amount__c;
- achievement.User__c = currentUserId;
- achievementList.add(achievement);
- }
- }
- }
-
- insert achievementList;
- }
-
-
- @future
- public static void checkComment(List<Id> feedCommentIds, Map<Id, Id> feedItemIds,
- Map<Id, Id> parentIds, Map<Id, Id> insertedByIds) {
-
- List<Achievement__c> achievementList = new List<Achievement__c>{};
-
- // Go through each updated record
- for (Id feedCommentId : feedCommentIds) {
-
- String currentUserId = insertedByIds.get(feedCommentId);
- String[] goalsParticipatingIn = new String[0];
-
- // Get all Goals that user is participating in
- for (Goal_Participant__c gp :
- [SELECT Goal__c
- FROM Goal_Participant__c
- WHERE User__c = :currentUserId
- ]) {
-
- goalsParticipatingIn.add(gp.Goal__c);
- }
-
- // Get all active Goals that match criteria for this FeedItem and User who
- // FeedItem is assigned to is participating in
- for (Goal__c thisGoal :
- [SELECT Id, Name, Chatter_Type__c, Reward_Amount__c
- FROM Goal__c
- WHERE Type__c = 'Chatter'
- AND Status__c = 'Active'
- AND (Start_Date__c = NULL OR Start_Date__c <= TODAY)
- AND (End_Date__c = NULL OR End_Date__c >= TODAY)
- AND Chatter_Type__c = 'Comment'
- AND Id IN :goalsParticipatingIn
- ]) {
-
- // Save new achievement (no check necessary for previous
- // achievements since you can only insert FeedItems)
- Achievement__c achievement = new Achievement__c();
- achievement.Goal__c = thisGoal.Id;
- achievement.Object_Id__c = parentIds.get(feedCommentId) + '?ChatterFeedItemId='
- + feedItemIds.get(feedCommentId);
- achievement.Points_Awarded__c = thisGoal.Reward_Amount__c;
- achievement.User__c = currentUserId;
- achievementList.add(achievement);
- }
- }
-
- insert achievementList;
- }
-
-
- @future
- public static void checkFollows() {
-
- List<Achievement__c> achievementList = new List<Achievement__c>{};
- Map<Id, Goal__c> goalList = new Map<Id, Goal__c>();
- Map<Id, List<Id>> goalParticipantList = new Map<Id, List<Id>>();
-
- // Get all Goals for following items in Chatter
- for (Goal__c thisGoal : [SELECT Id, Chatter_Type__c, Last_Batch_Check_Time__c,
- Reward_Amount__c, Name FROM Goal__c
- WHERE Type__c = 'Chatter'
- AND Status__c = 'Active'
- AND (Start_Date__c = NULL OR Start_Date__c <= TODAY)
- AND (End_Date__c = NULL OR End_Date__c >= TODAY)
- AND (Chatter_Type__c = 'FollowUser' OR Chatter_Type__c = 'FollowItem')]) {
-
- goalList.put(thisGoal.Id, thisGoal);
- }
-
- if (goalList.size() == 0) {
- return;
- }
-
- // Get all participants in goals for following items
- for (Goal_Participant__c gp : [SELECT Goal__c, User__c
- FROM Goal_Participant__c WHERE Goal__c IN :goalList.keySet()]) {
-
- if (goalParticipantList.containsKey(gp.Goal__c)) {
- List<Id> currentList = goalParticipantList.get(gp.Goal__c);
- currentList.add(gp.User__c);
- goalParticipantList.put(gp.Goal__c, currentList);
-
- } else {
- goalParticipantList.put(gp.Goal__c, new List<Id>{gp.User__c});
- }
- }
-
- // Go through each goal and get EntitySubscriptions added between the
- // Last Batch Check Time and now
- DateTime now = DateTime.now();
- List<Goal__c> goalsToUpdate = new List<Goal__c>{};
-
- for (Goal__c thisGoal : goalList.values()) {
- if (goalParticipantList.get(thisGoal.Id) != null) {
- for (EntitySubscription es :
- [SELECT ParentId, SubscriberId FROM EntitySubscription
- WHERE SubscriberId IN :goalParticipantList.get(thisGoal.Id)
- AND CreatedDate >= :thisGoal.Last_Batch_Check_Time__c
- AND CreatedDate <= :now]) {
-
- // Check that type of object followed is of the correct type
- // for the rule (i.e. following users vs. records). 005 is the
- // prefix for a User object.
- String parentId = es.ParentId;
- if (thisGoal.Chatter_Type__c.equals('FollowUser') &&
- parentId.substring(0, 3).equals('005') ||
- thisGoal.Chatter_Type__c.equals('FollowItem') &&
- !(parentId.substring(0, 3).equals('005'))) {
-
- // Save Achievement
- Achievement__c achievement = new Achievement__c();
- achievement.Goal__c = thisGoal.Id;
- achievement.Object_Id__c = es.ParentId;
- achievement.Points_Awarded__c = thisGoal.Reward_Amount__c;
- achievement.User__c = es.SubscriberId;
- achievementList.add(achievement);
- }
- }
- }
- // Update last batch check time for all goals
- thisGoal.Last_Batch_Check_Time__c = now;
- goalsToUpdate.add(thisGoal);
-
- }
- insert achievementList;
- update goalsToUpdate;
- }
-
-
- @future
- public static void checkLikes() {
-
- List<Achievement__c> achievementList = new List<Achievement__c>{};
- Map<Id, Goal__c> goalList = new Map<Id, Goal__c>();
- Map<Id, Set<Id>> goalParticipantList = new Map<Id, Set<Id>>();
-
- // Get all Goals for following items in Chatter
- for (Goal__c thisGoal : [SELECT Id, Chatter_Type__c, Last_Batch_Check_Time__c,
- Reward_Amount__c, Name FROM Goal__c
- WHERE Type__c = 'Chatter'
- AND Status__c = 'Active'
- AND (Start_Date__c = NULL OR Start_Date__c <= TODAY)
- AND (End_Date__c = NULL OR End_Date__c >= TODAY)
- AND Chatter_Type__c = 'Likes']) {
-
- goalList.put(thisGoal.Id, thisGoal);
- }
-
- if (goalList.size() == 0) {
- return;
- }
-
- // Get all participants in goals for following items
- for (Goal_Participant__c gp : [SELECT Goal__c, User__c
- FROM Goal_Participant__c WHERE Goal__c IN :goalList.keySet()]) {
-
- if (goalParticipantList.containsKey(gp.Goal__c)) {
- Set<Id> currentList = goalParticipantList.get(gp.Goal__c);
- currentList.add(gp.User__c);
- goalParticipantList.put(gp.Goal__c, currentList);
-
- } else {
- goalParticipantList.put(gp.Goal__c, new Set<Id>{gp.User__c});
- }
- }
-
- // Go through each goal and get EntitySubscriptions added between the
- // Last Batch Check Time and now
- DateTime now = DateTime.now();
- List<Goal__c> goalsToUpdate = new List<Goal__c>{};
-
- for (Goal__c thisGoal : goalList.values()) {
-
- // Have to get all FeedLikes because can't do WHERE on InsertedById
- for (NewsFeed nf : [SELECT nf.Id, nf.InsertedById, nf.ParentId,
- (SELECT fl.Id, fl.InsertedById FROM nf.FeedLikes fl
- WHERE CreatedDate >= :thisGoal.Last_Batch_Check_Time__c AND CreatedDate <= :now)
- FROM NewsFeed nf]) {
-
- // Check if poster is participating in this goal
- if (nf.FeedLikes.size() > 0 && goalParticipantList.get(thisGoal.Id) != null &&
- (goalParticipantList.get(thisGoal.Id)).contains(nf.InsertedById)) {
-
- // Save Achievement
- Achievement__c achievement = new Achievement__c();
- achievement.Goal__c = thisGoal.Id;
- achievement.Object_Id__c = nf.ParentId + '?ChatterFeedItemId=' + nf.Id;
- achievement.Points_Awarded__c = thisGoal.Reward_Amount__c * nf.FeedLikes.size();
- achievement.User__c = nf.InsertedById;
- achievementList.add(achievement);
- }
- }
-
- // Update last batch check time for all goals
- thisGoal.Last_Batch_Check_Time__c = now;
- goalsToUpdate.add(thisGoal);
- }
-
- insert achievementList;
- update goalsToUpdate;
- }
-}
View
5 classes/ChatterGameGoalAchievement.cls-meta.xml
@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
- <apiVersion>21.0</apiVersion>
- <status>Active</status>
-</ApexClass>
View
432 classes/ChatterGameGoalAchievementTest.cls
@@ -1,432 +0,0 @@
-/*
-Copyright (c) 2011 salesforce.com, inc.
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions
-are met:
-
-1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-3. The name of the author may not be used to endorse or promote products
- derived from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR
-IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
-INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-By: Chris Kemp <ckemp@salesforce.com>
-*/
-
-@isTest
-private class ChatterGameGoalAchievementTest {
-
- static User user1 = null;
- static User user2 = null;
-
- static testMethod void buildUp() {
-
- if (user1 == null) {
- ChatterGameGoalAchievementTest.user1 = GamificationTestUtility.createTestUser('System Administrator');
- }
- if (user2 == null) {
- ChatterGameGoalAchievementTest.user2 = GamificationTestUtility.createTestUser('Chatter Free User');
- }
- }
-
- static testMethod void testGetOptions() {
- ChatterGameGoalSetupWizardController controller = new ChatterGameGoalSetupWizardController();
-
- // Check that options are populating
- System.assert(0 < controller.getStep1Options().size());
- System.assert(0 < controller.getStatusOptions().size());
- }
-
- static testMethod void testAnyPost() {
-
- buildUp();
-
- System.runAs(ChatterGameGoalAchievementTest.user1) {
-
- PageReference pageRef = Page.ChatterGameGoalSetupWizard;
- Test.setCurrentPage(pageRef);
-
- ChatterGameGoalSetupWizardController controller = new ChatterGameGoalSetupWizardController();
-
- controller.step1 = 'Post';
- controller.setUsersSelected(new String[]{ChatterGameGoalAchievementTest.user1.Id,
- ChatterGameGoalAchievementTest.user2.Id});
-
- Set<String> selectedUsers = new Set<String>{};
- selectedUsers.addAll(controller.getUsersSelected());
- System.assert(selectedUsers.contains(ChatterGameGoalAchievementTest.user1.Id));
- System.assert(selectedUsers.contains(ChatterGameGoalAchievementTest.user2.Id));
-
- controller.name = 'Goal for Any Post';
- controller.description = 'This is a test Goal which gives points for adding any type of post in Chatter.';
- controller.rewardAmount = '111';
- controller.status = 'Active';
- String nextPage = controller.action().getUrl();
-
- // Verify that the success page displays
- System.assert(nextPage == '/apex/ChatterGameGoalSetupSuccess' ||
- nextPage == '/apex/chattergame__ChatterGameGoalSetupSuccess');
-
- // Verify rules were added
- System.assertEquals(2, [select count() from Goal_Participant__c where CreatedById = :user1.Id]);
-
- // Create a status update feed item
- Test.startTest();
- FeedItem testFeedItem = new FeedItem();
- testFeedItem.Type = 'TextPost';
- testFeedItem.Body = 'Test post 1';
- testFeedItem.ParentId = ChatterGameGoalAchievementTest.user1.Id;
- insert testFeedItem;
-
- // Check that reward was given
- Test.stopTest();
- System.assert(0 < [select count() from Achievement__c
- where User__c = :ChatterGameGoalAchievementTest.user1.Id AND Points_Awarded__c = 111]);
- }
- }
-
- static testMethod void testPostFile() {
-
- buildUp();
-
- System.runAs(ChatterGameGoalAchievementTest.user1) {
-
- PageReference pageRef = Page.ChatterGameGoalSetupWizard;
- Test.setCurrentPage(pageRef);
-
- ChatterGameGoalSetupWizardController controller = new ChatterGameGoalSetupWizardController();
-
- controller.step1 = 'PostFile';
- controller.setUsersSelected(new String[]{ChatterGameGoalAchievementTest.user1.Id,
- ChatterGameGoalAchievementTest.user2.Id});
-
- Set<String> selectedUsers = new Set<String>{};
- selectedUsers.addAll(controller.getUsersSelected());
- System.assert(selectedUsers.contains(ChatterGameGoalAchievementTest.user1.Id));
- System.assert(selectedUsers.contains(ChatterGameGoalAchievementTest.user2.Id));
-
- controller.name = 'Goal for Posting Files';
- controller.description = 'This is a test Goal which gives pointsfor creating a post with a file attachment.';
- controller.rewardAmount = '222';
- controller.status = 'Active';
- String nextPage = controller.action().getUrl();
-
- // Verify that the success page displays
- System.assert(nextPage == '/apex/ChatterGameGoalSetupSuccess' ||
- nextPage == '/apex/chattergame__ChatterGameGoalSetupSuccess');
-
- // Verify rules were added
- System.assertEquals(2, [select count() from Goal_Participant__c where CreatedById = :user1.Id]);
-
- // Create a post
- Test.startTest();
- FeedItem goodFeedItem = new FeedItem();
- goodFeedItem.Type = 'ContentPost';
- goodFeedItem.ContentFileName = 'Test_file.txt';
- goodFeedItem.ContentData = Crypto.generateDigest('SHA1',Blob.valueOf('Test post 3 (positive)'));
- goodFeedItem.ParentId = ChatterGameGoalAchievementTest.user1.Id;
- insert goodFeedItem;
-
- // Check that reward was given
- Test.stopTest();
- System.assert(0 < [select count() from Achievement__c
- where User__c = :ChatterGameGoalAchievementTest.user1.Id AND Points_Awarded__c = 222]);
- }
- }
-
-
- static testMethod void testPostLink() {
-
- buildUp();
-
- System.runAs(ChatterGameGoalAchievementTest.user1) {
-
- PageReference pageRef = Page.ChatterGameGoalSetupWizard;
- Test.setCurrentPage(pageRef);
-
- ChatterGameGoalSetupWizardController controller = new ChatterGameGoalSetupWizardController();
-
- controller.step1 = 'PostLink';
- controller.setUsersSelected(new String[]{ChatterGameGoalAchievementTest.user1.Id,
- ChatterGameGoalAchievementTest.user2.Id});
-
- Set<String> selectedUsers = new Set<String>{};
- selectedUsers.addAll(controller.getUsersSelected());
- System.assert(selectedUsers.contains(ChatterGameGoalAchievementTest.user1.Id));
- System.assert(selectedUsers.contains(ChatterGameGoalAchievementTest.user2.Id));
-
- controller.name = 'Goal for Posting Links';
- controller.description = 'This is a test Goal which gives pointsfor creating a post and attaching a link.';
- controller.rewardAmount = '333';
- controller.status = 'Active';
- String nextPage = controller.action().getUrl();
-
- // Verify that the success page displays
- System.assert(nextPage == '/apex/ChatterGameGoalSetupSuccess' ||
- nextPage == '/apex/chattergame__ChatterGameGoalSetupSuccess');
-
- // Verify rules were added
- System.assertEquals(2, [select count() from Goal_Participant__c where CreatedById = :user1.Id]);
-
- // Create a post
- Test.startTest();
- FeedItem goodFeedItem = new FeedItem();
- goodFeedItem.Type = 'LinkPost';
- goodFeedItem.LinkUrl = 'http://www.salesforce.com';
- goodFeedItem.Title = 'Salesforce.com web site';
- goodFeedItem.ParentId = ChatterGameGoalAchievementTest.user1.Id;
- insert goodFeedItem;
-
- // Check that reward was given
- Test.stopTest();
- System.assert(0 < [select count() from Achievement__c
- where User__c = :ChatterGameGoalAchievementTest.user1.Id AND Points_Awarded__c = 333]);
- }
- }
-
-
- static testMethod void testPostComment() {
-
- buildUp();
-
- System.runAs(ChatterGameGoalAchievementTest.user1) {
-
- PageReference pageRef = Page.ChatterGameGoalSetupWizard;
- Test.setCurrentPage(pageRef);
-
- ChatterGameGoalSetupWizardController controller = new ChatterGameGoalSetupWizardController();
-
- controller.step1 = 'Comment';
- controller.setUsersSelected(new String[]{ChatterGameGoalAchievementTest.user1.Id,
- ChatterGameGoalAchievementTest.user2.Id});
-
- Set<String> selectedUsers = new Set<String>{};
- selectedUsers.addAll(controller.getUsersSelected());
- System.assert(selectedUsers.contains(ChatterGameGoalAchievementTest.user1.Id));
- System.assert(selectedUsers.contains(ChatterGameGoalAchievementTest.user2.Id));
-
- controller.name = 'Goal for Posting Comments';
- controller.description = 'This is a test Goal which gives pointsfor creating a comment on a post.';
- controller.rewardAmount = '444';
- controller.status = 'Active';
- String nextPage = controller.action().getUrl();
-
- // Verify that the success page displays
- System.assert(nextPage == '/apex/ChatterGameGoalSetupSuccess' ||
- nextPage == '/apex/chattergame__ChatterGameGoalSetupSuccess');
-
- // Verify rules were added
- System.assertEquals(2, [select count() from Goal_Participant__c where CreatedById = :user1.Id]);
-
- // Create a post
- Test.startTest();
- FeedItem feedItem = new FeedItem();
- feedItem.Type = 'TextPost';
- feedItem.Body = 'Test post 1';
- feedItem.ParentId = ChatterGameGoalAchievementTest.user1.Id;
- insert feedItem;
-
- FeedComment feedComment = new FeedComment();
- feedComment.FeedItemId = feedItem.Id;
- feedComment.CommentBody = 'This is a feed comment';
- insert feedComment;
-
- // Check that reward was given
- Test.stopTest();
- System.assert(0 < [select count() from Achievement__c
- where User__c = :ChatterGameGoalAchievementTest.user1.Id AND Points_Awarded__c = 444]);
- }
- }
-
-
- static testMethod void testPostLike() {
-
- buildUp();
-
- System.runAs(ChatterGameGoalAchievementTest.user1) {
-
- PageReference pageRef = Page.ChatterGameGoalSetupWizard;
- Test.setCurrentPage(pageRef);
-
- ChatterGameGoalSetupWizardController controller = new ChatterGameGoalSetupWizardController();
-
- controller.step1 = 'Likes';
- controller.setUsersSelected(new String[]{ChatterGameGoalAchievementTest.user1.Id,
- ChatterGameGoalAchievementTest.user2.Id});
-
- Set<String> selectedUsers = new Set<String>{};
- selectedUsers.addAll(controller.getUsersSelected());
- System.assert(selectedUsers.contains(ChatterGameGoalAchievementTest.user1.Id));
- System.assert(selectedUsers.contains(ChatterGameGoalAchievementTest.user2.Id));
-
- controller.name = 'Goal for Having Posts Liked';
- controller.description = 'This is a test Goal which gives points for creating a comment on a post.';
- controller.rewardAmount = '555';
- controller.status = 'Active';
- String nextPage = controller.action().getUrl();
-
- // Verify that the success page displays
- System.assert(nextPage == '/apex/ChatterGameGoalSetupSuccess' ||
- nextPage == '/apex/chattergame__ChatterGameGoalSetupSuccess');
-
- // Verify rules were added
- System.assertEquals(2, [select count() from Goal_Participant__c where CreatedById = :user1.Id]);
- }
-
- FeedItem feedItem;
- System.runAs(ChatterGameGoalAchievementTest.user1) {
- // Create a post
- feedItem = new FeedItem();
- feedItem.Type = 'TextPost';
- feedItem.Body = 'Test post 1';
- feedItem.ParentId = ChatterGameGoalAchievementTest.user1.Id;
- insert feedItem;
- }
-
- System.runAs(ChatterGameGoalAchievementTest.user2) {
- // Create a like on the post
- FeedLike feedLike = new FeedLike();
- feedLike.FeedItemId = feedItem.Id;
- insert feedLike;
- }
-
- System.runAs(ChatterGameGoalAchievementTest.user1) {
- Test.startTest();
- ChatterGameGoalAchievement.checkLikes();
-
- // Check that reward was given
- Test.stopTest();
- System.assert(0 < [select count() from Achievement__c
- where User__c = :ChatterGameGoalAchievementTest.user1.Id AND Points_Awarded__c = 555]);
- }
- }
-
-
- static testMethod void testFollowUser() {
-
- buildUp();
-
- System.runAs(ChatterGameGoalAchievementTest.user1) {
-
- PageReference pageRef = Page.ChatterGameGoalSetupWizard;
- Test.setCurrentPage(pageRef);
-
- ChatterGameGoalSetupWizardController controller = new ChatterGameGoalSetupWizardController();
-
- controller.step1 = 'FollowUser';
- controller.setUsersSelected(new String[]{ChatterGameGoalAchievementTest.user1.Id,
- ChatterGameGoalAchievementTest.user2.Id});
-
- Set<String> selectedUsers = new Set<String>{};
- selectedUsers.addAll(controller.getUsersSelected());
- System.assert(selectedUsers.contains(ChatterGameGoalAchievementTest.user1.Id));
- System.assert(selectedUsers.contains(ChatterGameGoalAchievementTest.user2.Id));
-
- controller.name = 'Goal for Following Users';
- controller.description = 'This is a test Goal which gives points for following other users.';
- controller.rewardAmount = '666';
- controller.status = 'Active';
- String nextPage = controller.action().getUrl();
-
- // Verify that the success page displays
- System.assert(nextPage == '/apex/ChatterGameGoalSetupSuccess' ||
- nextPage == '/apex/chattergame__ChatterGameGoalSetupSuccess');
-
- // Verify rules were added
- System.assertEquals(2, [select count() from Goal_Participant__c where CreatedById = :user1.Id]);
- }
-
- System.runAs(ChatterGameGoalAchievementTest.user1) {
-
- // Follow other user
- EntitySubscription goodFollow = new EntitySubscription();
- goodFollow.ParentId = ChatterGameGoalAchievementTest.user2.Id;
- goodFollow.SubscriberId = ChatterGameGoalAchievementTest.user1.Id;
- insert goodFollow;
-
- Test.startTest();
- ChatterGameGoalAchievement.checkFollows();
-
- // Check that reward was given
- Test.stopTest();
- System.assert(0 < [select count() from Achievement__c
- where User__c = :ChatterGameGoalAchievementTest.user1.Id AND Points_Awarded__c = 666]);
- }
- }
-
-
- static testMethod void testFollowItem() {
-
- buildUp();
-
- System.runAs(ChatterGameGoalAchievementTest.user1) {
-
- PageReference pageRef = Page.ChatterGameGoalSetupWizard;
- Test.setCurrentPage(pageRef);
-
- ChatterGameGoalSetupWizardController controller = new ChatterGameGoalSetupWizardController();
-
- controller.step1 = 'FollowItem';
- controller.setUsersSelected(new String[]{ChatterGameGoalAchievementTest.user1.Id,
- ChatterGameGoalAchievementTest.user2.Id});
-
- Set<String> selectedUsers = new Set<String>{};
- selectedUsers.addAll(controller.getUsersSelected());
- System.assert(selectedUsers.contains(ChatterGameGoalAchievementTest.user1.Id));
- System.assert(selectedUsers.contains(ChatterGameGoalAchievementTest.user2.Id));
-
- controller.name = 'Goal for Following Items';
- controller.description = 'This is a test Goal which gives points for following other non-user records.';
- controller.rewardAmount = '777';
- controller.status = 'Active';
- String nextPage = controller.action().getUrl();
-
- // Verify that the success page displays
- System.assert(nextPage == '/apex/ChatterGameGoalSetupSuccess' ||
- nextPage == '/apex/chattergame__ChatterGameGoalSetupSuccess');
-
- // Verify rules were added
- System.assertEquals(2, [select count() from Goal_Participant__c where CreatedById = :user1.Id]);
- }
-
- Goal__c newGoal;
- System.runAs(ChatterGameGoalAchievementTest.user1) {
-
- // Create a non-user record to follow
- newGoal = new Goal__c();
- newGoal.Name = 'My test goal';
- newGoal.Reward_Amount__c = 123;
- newGoal.Status__c = 'Active';
- insert newGoal;
-
- // Follow a non-user record
- EntitySubscription goodFollow = new EntitySubscription();
- goodFollow.ParentId = newGoal.Id;
- goodFollow.SubscriberId = ChatterGameGoalAchievementTest.user1.Id;
- insert goodFollow;
-
- ChatterGameGoalAchievement.checkFollows();
- Test.startTest();
-
- // Check that reward was given
- Test.stopTest();
- System.assert(0 < [select count() from Achievement__c
- where User__c = :ChatterGameGoalAchievementTest.user1.Id AND Points_Awarded__c = 777]);
- }
- }
-}
View
5 classes/ChatterGameGoalAchievementTest.cls-meta.xml
@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
- <apiVersion>22.0</apiVersion>
- <status>Active</status>
-</ApexClass>
View
152 classes/ChatterGameGoalSetupWizardController.cls
@@ -1,152 +0,0 @@
-/*
-Copyright (c) 2011 salesforce.com, inc.
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions
-are met:
-
-1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-3. The name of the author may not be used to endorse or promote products
- derived from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR
-IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
-INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-By: Chris Kemp <ckemp@salesforce.com>
-*/
-
-public with sharing class ChatterGameGoalSetupWizardController {
-
- public String step1 {get; set;}
- public String name {get; set;}
- public String description {get; set;}
- public String rewardAmount {get; set;}
- public String status {get; set;}
- public Date startDate {get; set;}
- public Date endDate {get; set;}
- public String[] usersSelected = new String[]{};
-
- public List<SelectOption> getStep1Options() {
- List<SelectOption> options = new List<SelectOption>();
- options.add(new SelectOption('Post', 'Any Chatter post except status updates'));
- options.add(new SelectOption('PostFile', 'Uploading a file on a Chatter feed'));
- options.add(new SelectOption('PostLink', 'Adding a link on a Chatter feed'));
- options.add(new SelectOption('Comment', 'Commenting on a Chatter post'));
- options.add(new SelectOption('Likes', 'Having someone Like your Chatter post'));
- options.add(new SelectOption('FollowUser', 'Following another Chatter user'));
- options.add(new SelectOption('FollowItem', 'Following a record of any type in Chatter'));
- return options;
- }
-
- public List<SelectOption> getStatusOptions() {
- List<SelectOption> options = new List<SelectOption>();
- options.add(new SelectOption('Active', 'Active'));
- options.add(new SelectOption('Disabled', 'Disabled'));
- return options;
- }
-
- public List<SelectOption> getUserOptions() {
- List<SelectOption> options = new List<SelectOption>();
-
- for (User thisUser:
- [select Id, FirstName, LastName from User
- where isActive = true and UserType = 'Standard'
- order by LastName, FirstName]) {
- options.add(new SelectOption(thisUser.Id, thisUser.LastName +
- ', ' + thisUser.FirstName));
- }
-
- return options;
- }
-
- public String[] getUsersSelected() {
- return usersSelected;
- }
-
- public void setUsersSelected(String[] usersSelected) {
- this.usersSelected = usersSelected;
- }
-
- public PageReference action() {
-
- Boolean isValid = true;
-
- // Error checking
- if ((name.trim()).equals('')) {
- ApexPages.addMessage(new ApexPages.message(ApexPages.Severity.ERROR,
- 'Goal Name must not be blank'));
- isValid = false;
- }
-
- if (endDate != null && endDate < date.today()) {
- ApexPages.addMessage(new ApexPages.message(ApexPages.Severity.ERROR,
- 'End date cannot be in the past'));
- isValid = false;
- }
-
- if (startDate != null && endDate != null && endDate < startDate) {
- ApexPages.addMessage(new ApexPages.message(ApexPages.Severity.ERROR,
- 'End date cannot be before the start date'));
- isValid = false;
- }
-
- try {
- Decimal.valueOf(rewardAmount);
- if (Decimal.valueOf(rewardAmount) <= 0) {
- ApexPages.addMessage(new ApexPages.message(
- ApexPages.Severity.ERROR,
- 'Reward Amount must be greater than zero'));
- isValid = false;
- }
- } catch (System.TypeException e) {
- ApexPages.addMessage(new ApexPages.message(ApexPages.severity.ERROR,
- 'Reward Amount must be a numeric value'));
- isValid = false;
- }
-
- if (!isValid) {
- return null;
- }
-
- // Save new Goal
- Goal__c newGoal = new Goal__c();
- newGoal.Name = this.name;
- newGoal.Description__c = this.description;
- newGoal.Start_Date__c = this.startDate;
- newGoal.End_Date__c = this.endDate;
- newGoal.Reward_Amount__c = Decimal.valueOf(this.rewardAmount);
- newGoal.Status__c = this.Status;
- newGoal.Type__c = 'Chatter';
- newGoal.Chatter_Type__c = this.step1;
- insert newGoal;
-
- // Save Participant list associated with Goal
- List<Goal_Participant__c> participantList =
- new List<Goal_Participant__c>();
- for (String userId: usersSelected) {
- Goal_Participant__c participant = new Goal_Participant__c();
- participant.Goal__c = newGoal.Id;
- participant.User__c = userId;
- participantList.add(participant);
- }
- insert participantList;
-
- // Redirect the user to the success page
- PageReference pageRef = Page.ChatterGameGoalSetupSuccess;
- pageRef.setRedirect(true);
- return pageRef;
- }
-}
View
5 classes/ChatterGameGoalSetupWizardController.cls-meta.xml
@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
- <apiVersion>21.0</apiVersion>
- <status>Active</status>
-</ApexClass>
View
88 classes/GamificationTestUtility.cls
@@ -1,88 +0,0 @@
-/*
-Copyright (c) 2011 salesforce.com, inc.
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions
-are met:
-
-1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-3. The name of the author may not be used to endorse or promote products
- derived from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR
-IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
-INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-By: Chris Kemp <ckemp@salesforce.com>
-*/
-
-public with sharing class GamificationTestUtility {
-
- /*
- A random user is useful for testing in order to be
- sure that you are able to see data across posts regardless
- of follow status.
- */
- public static User createTestUser(String profileName) {
- Profile p = [Select Id, Name from Profile
- where Name = :profileName];
- return GamificationTestUtility.createTestUser(p);
- }
-
- public static User createTestUser(Profile p) {
- String namePrefix = createRandomWord();
-
- AggregateResult[] userCount = [Select count(id) userCount
- From user where username like :namePrefix];
-
- Object users = userCount[0].get('userCount');
-
- User testUser = new User();
- testUser.Email = 'test@test.com';
- testUser.Username = namePrefix+users+'@testuser.test';
-
- testUser.LastName = 'test';
- testUser.Alias = 'test';
- testUser.ProfileId = p.Id;
- testUser.LanguageLocaleKey = 'en_US';
- testUser.LocaleSidKey = 'en_US';
- testUser.TimeZoneSidKey = 'America/New_York';
- testUser.EmailEncodingKey = 'UTF-8';
- insert testUser;
- return testUser;
- }
-
- /*
- Random words are required for testing
- as you will likely run into any word I can insert
- during a test class and produce false test results.
- */
- public static String createRandomWord() {
- String ret = 'word' + math.rint(math.random() * 100000);
- return ret;
- }
-
- //TEST METHODS
-
- static TestMethod void testRandomWord() {
- System.assert(GamificationTestUtility.createRandomWord() !=
- GamificationTestUtility.createRandomWord());
- }
-
- static TestMethod void testCreateUser() {
- User u = GamificationTestUtility.createTestUser('Standard User');
- System.assert(u.id != null);
- }
-}
View
5 classes/GamificationTestUtility.cls-meta.xml
@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
- <apiVersion>21.0</apiVersion>
- <status>Active</status>
-</ApexClass>
View
48 classes/RunBatchCheckController.cls
@@ -1,48 +0,0 @@
-/*
-Copyright (c) 2011 salesforce.com, inc.
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions
-are met:
-
-1. Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-3. The name of the author may not be used to endorse or promote products
- derived from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR
-IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
-INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-By: Chris Kemp <ckemp@salesforce.com>
-*/
-
-global with sharing class RunBatchCheckController implements Schedulable {
- public static PageReference run() {
- RunBatchCheckController.execute(null);
- PageReference pageRef = Page.RunBatchCheckSuccess;
- pageRef.setRedirect(true);
- return pageRef;
- }
-
- global static public void execute(SchedulableContext sc) {
- ChatterGameGoalAchievement.checkFollows();
- ChatterGameGoalAchievement.checkLikes();
- }
-
- static testMethod void testScheduledRun() {
- PageReference pageRef = RunBatchCheckController.run();
- System.assert(null != pageRef);
- }
-}
View
5 classes/RunBatchCheckController.cls-meta.xml
@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
- <apiVersion>21.0</apiVersion>
- <status>Active</status>
-</ApexClass>
View
6 dashboards/The_Chatter_Game_Dashboards-meta.xml
@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<DashboardFolder xmlns="http://soap.sforce.com/2006/04/metadata">
- <accessType>Public</accessType>
- <name>The Chatter Game Dashboards</name>
- <publicFolderAccess>ReadWrite</publicFolderAccess>
-</DashboardFolder>
View
144 dashboards/The_Chatter_Game_Dashboards/The_Chatter_Game_Dashboard.dashboard
@@ -1,144 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<Dashboard xmlns="http://soap.sforce.com/2006/04/metadata">
- <backgroundEndColor>#FFFFFF</backgroundEndColor>
- <backgroundFadeDirection>Diagonal</backgroundFadeDirection>
- <backgroundStartColor>#FFFFFF</backgroundStartColor>
- <dashboardType>SpecifiedUser</dashboardType>
- <leftSection>
- <columnSize>Medium</columnSize>
- <components>
- <componentType>Table</componentType>
- <displayUnits>Auto</displayUnits>
- <header>Points Leaderboard for this Month</header>
- <indicatorHighColor>#54C254</indicatorHighColor>
- <indicatorLowColor>#C25454</indicatorLowColor>
- <indicatorMiddleColor>#C2C254</indicatorMiddleColor>
- <maxValuesDisplayed>10</maxValuesDisplayed>
- <report>The_Chatter_Game_Reports/Points_Earned_this_Month</report>
- <sortBy>RowValueDescending</sortBy>
- </components>
- <components>
- <componentType>Table</componentType>
- <displayUnits>Auto</displayUnits>
- <header>Points Leaderboard for this Week</header>
- <indicatorHighColor>#54C254</indicatorHighColor>
- <indicatorLowColor>#C25454</indicatorLowColor>
- <indicatorMiddleColor>#C2C254</indicatorMiddleColor>
- <report>The_Chatter_Game_Reports/Points_Earned_this_Week</report>
- <sortBy>RowValueDescending</sortBy>
- </components>
- <components>
- <chartAxisRange>Auto</chartAxisRange>
- <componentType>BarStacked</componentType>
- <displayUnits>Auto</displayUnits>
- <drillEnabled>true</drillEnabled>
- <drillToDetailEnabled>false</drillToDetailEnabled>
- <enableHover>true</enableHover>
- <expandOthers>false</expandOthers>
- <header>Points Awarded by Goal</header>
- <legendPosition>Bottom</legendPosition>
- <report>The_Chatter_Game_Reports/Achievements_by_User_by_Goal</report>
- <showPercentage>false</showPercentage>
- <showValues>false</showValues>
- <sortBy>RowValueDescending</sortBy>
- <useReportChart>false</useReportChart>
- </components>
- </leftSection>
- <middleSection>
- <columnSize>Medium</columnSize>
- <components>
- <chartAxisRange>Auto</chartAxisRange>
- <componentType>Donut</componentType>
- <displayUnits>Auto</displayUnits>
- <drillEnabled>true</drillEnabled>
- <drillToDetailEnabled>false</drillToDetailEnabled>
- <enableHover>true</enableHover>
- <expandOthers>false</expandOthers>
- <header>Points Earned by Goal this Month</header>
- <legendPosition>Bottom</legendPosition>
- <report>The_Chatter_Game_Reports/Points_Awarded_this_Month_by_Goal</report>
- <showPercentage>true</showPercentage>
- <showTotal>false</showTotal>
- <showValues>true</showValues>
- <sortBy>RowValueDescending</sortBy>
- <useReportChart>false</useReportChart>
- </components>
- <components>
- <componentType>Table</componentType>
- <displayUnits>Auto</displayUnits>
- <header>No. of Participants in Active Goals</header>
- <indicatorHighColor>#54C254</indicatorHighColor>
- <indicatorLowColor>#C25454</indicatorLowColor>
- <indicatorMiddleColor>#C2C254</indicatorMiddleColor>
- <report>The_Chatter_Game_Reports/Active_Goals_by_Participants</report>
- <sortBy>RowValueDescending</sortBy>
- </components>
- <components>
- <chartAxisRange>Auto</chartAxisRange>
- <componentType>Line</componentType>
- <displayUnits>Auto</displayUnits>
- <drillEnabled>false</drillEnabled>
- <drillToDetailEnabled>false</drillToDetailEnabled>
- <enableHover>true</enableHover>
- <expandOthers>false</expandOthers>
- <header>Points Awarded Month over Month</header>
- <legendPosition>Bottom</legendPosition>
- <report>The_Chatter_Game_Reports/Points_Awarded_Month_over_Month</report>
- <showPercentage>false</showPercentage>
- <showValues>false</showValues>
- <sortBy>RowLabelAscending</sortBy>
- <useReportChart>false</useReportChart>
- </components>
- </middleSection>
- <rightSection>
- <columnSize>Medium</columnSize>
- <components>
- <chartAxisRange>Auto</chartAxisRange>
- <componentType>Line</componentType>
- <displayUnits>Auto</displayUnits>
- <drillEnabled>false</drillEnabled>
- <drillToDetailEnabled>false</drillToDetailEnabled>
- <enableHover>true</enableHover>
- <expandOthers>false</expandOthers>
- <header>Points Awarded Week over Week</header>
- <legendPosition>Bottom</legendPosition>
- <report>The_Chatter_Game_Reports/Points_Awarded_Week_overWeek</report>
- <showPercentage>false</showPercentage>
- <showValues>false</showValues>
- <sortBy>RowLabelAscending</sortBy>
- <useReportChart>false</useReportChart>
- </components>
- <components>
- <componentType>Table</componentType>
- <displayUnits>Auto</displayUnits>
- <header>Active Goal Participation in by User</header>
- <indicatorHighColor>#54C254</indicatorHighColor>
- <indicatorLowColor>#C25454</indicatorLowColor>
- <indicatorMiddleColor>#C2C254</indicatorMiddleColor>
- <report>The_Chatter_Game_Reports/Active_Goals_Participation_by_User</report>
- <sortBy>RowValueDescending</sortBy>
- </components>
- <components>
- <chartAxisRange>Auto</chartAxisRange>
- <componentType>Donut</componentType>
- <displayUnits>Auto</displayUnits>
- <drillEnabled>false</drillEnabled>
- <drillToDetailEnabled>false</drillToDetailEnabled>
- <enableHover>true</enableHover>
- <expandOthers>false</expandOthers>
- <header>Points Earned by Goal this Week</header>
- <legendPosition>Bottom</legendPosition>
- <report>The_Chatter_Game_Reports/Points_Awarded_this_Week_by_Goal</report>
- <showPercentage>true</showPercentage>
- <showTotal>true</showTotal>
- <showValues>true</showValues>
- <sortBy>RowValueDescending</sortBy>
- <useReportChart>false</useReportChart>
- </components>
- </rightSection>
- <runningUser>gamification@salesforce.com</runningUser>
- <textColor>#000000</textColor>
- <title>The Chatter Game Dashboard</title>
- <titleColor>#000000</titleColor>
- <titleSize>12</titleSize>
-</Dashboard>
View
6 documents/The_Chatter_Game-meta.xml
@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<DocumentFolder xmlns="http://soap.sforce.com/2006/04/metadata">
- <accessType>Public</accessType>
- <name>The Chatter Game</name>
- <publicFolderAccess>ReadOnly</publicFolderAccess>
-</DocumentFolder>
View
BIN documents/The_Chatter_Game/The_Chatter_Game_App_Logo.png
Deleted file not rendered
View
6 documents/The_Chatter_Game/The_Chatter_Game_App_Logo.png-meta.xml
@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<Document xmlns="http://soap.sforce.com/2006/04/metadata">
- <internalUseOnly>false</internalUseOnly>
- <name>The Chatter Game App Logo</name>
- <public>true</public>
-</Document>
View
72 layouts/Achievement__c-Achievement Layout.layout
@@ -1,72 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<Layout xmlns="http://soap.sforce.com/2006/04/metadata">
- <excludeButtons>Submit</excludeButtons>
- <layoutSections>
- <customLabel>false</customLabel>
- <detailHeading>false</detailHeading>
- <editHeading>true</editHeading>
- <label>Information</label>
- <layoutColumns>
- <layoutItems>
- <behavior>Readonly</behavior>
- <field>Name</field>
- </layoutItems>
- <layoutItems>
- <behavior>Required</behavior>
- <field>Goal__c</field>
- </layoutItems>
- <layoutItems>
- <behavior>Edit</behavior>
- <field>User__c</field>
- </layoutItems>
- <layoutItems>
- <behavior>Required</behavior>
- <field>Points_Awarded__c</field>
- </layoutItems>
- <layoutItems>
- <behavior>Readonly</behavior>
- <field>Object_Modified__c</field>
- </layoutItems>
- </layoutColumns>
- <layoutColumns/>
- <style>TwoColumnsTopToBottom</style>
- </layoutSections>
- <layoutSections>
- <customLabel>false</customLabel>
- <detailHeading>false</detailHeading>
- <editHeading>true</editHeading>
- <label>System Information</label>
- <layoutColumns>
- <layoutItems>
- <behavior>Readonly</behavior>
- <field>CreatedById</field>
- </layoutItems>
- </layoutColumns>
- <layoutColumns>
- <layoutItems>
- <behavior>Readonly</behavior>
- <field>LastModifiedById</field>
- </layoutItems>
- </layoutColumns>
- <style>TwoColumnsTopToBottom</style>
- </layoutSections>
- <layoutSections>
- <customLabel>true</customLabel>
- <detailHeading>false</detailHeading>
- <editHeading>true</editHeading>
- <label>Custom Links</label>
- <layoutColumns/>
- <layoutColumns/>
- <layoutColumns/>
- <style>CustomLinks</style>
- </layoutSections>
- <showEmailCheckbox>false</showEmailCheckbox>
- <showRunAssignmentRulesCheckbox>false</showRunAssignmentRulesCheckbox>
- <showSubmitAndAttachButton>false</showSubmitAndAttachButton>
- <summaryLayout>
- <masterLabel>00hA000000QKmX0</masterLabel>
- <sizeX>4</sizeX>
- <sizeY>0</sizeY>
- <summaryLayoutStyle>Default</summaryLayoutStyle>
- </summaryLayout>
-</Layout>
View
64 layouts/Goal_Participant__c-Goal Participant Layout.layout
@@ -1,64 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<Layout xmlns="http://soap.sforce.com/2006/04/metadata">
- <excludeButtons>Submit</excludeButtons>
- <layoutSections>
- <customLabel>false</customLabel>
- <detailHeading>false</detailHeading>
- <editHeading>true</editHeading>
- <label>Information</label>
- <layoutColumns>
- <layoutItems>
- <behavior>Readonly</behavior>
- <field>Name</field>
- </layoutItems>
- <layoutItems>
- <behavior>Required</behavior>
- <field>Goal__c</field>
- </layoutItems>
- <layoutItems>
- <behavior>Edit</behavior>
- <field>User__c</field>
- </layoutItems>
- </layoutColumns>
- <layoutColumns/>
- <style>TwoColumnsTopToBottom</style>
- </layoutSections>
- <layoutSections>
- <customLabel>false</customLabel>
- <detailHeading>true</detailHeading>
- <editHeading>true</editHeading>
- <label>System Information</label>
- <layoutColumns>
- <layoutItems>
- <behavior>Readonly</behavior>
- <field>CreatedById</field>
- </layoutItems>
- </layoutColumns>
- <layoutColumns>
- <layoutItems>
- <behavior>Readonly</behavior>
- <field>LastModifiedById</field>
- </layoutItems>
- </layoutColumns>
- <style>TwoColumnsTopToBottom</style>
- </layoutSections>
- <layoutSections>
- <customLabel>true</customLabel>
- <detailHeading>false</detailHeading>
- <editHeading>true</editHeading>
- <label>Custom Links</label>
- <layoutColumns/>
- <layoutColumns/>
- <layoutColumns/>
- <style>CustomLinks</style>
- </layoutSections>
- <showEmailCheckbox>false</showEmailCheckbox>
- <showRunAssignmentRulesCheckbox>false</showRunAssignmentRulesCheckbox>
- <showSubmitAndAttachButton>false</showSubmitAndAttachButton>
- <summaryLayout>
- <masterLabel>00hA000000QKmWv</masterLabel>
- <sizeX>4</sizeX>
- <sizeY>0</sizeY>
- <summaryLayoutStyle>Default</summaryLayoutStyle>
- </summaryLayout>
-</Layout>
View
251 layouts/Goal__c-Alternate Goal Layout.layout
@@ -1,251 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<Layout xmlns="http://soap.sforce.com/2006/04/metadata">
- <excludeButtons>Delete</excludeButtons>
- <excludeButtons>Submit</excludeButtons>
- <layoutSections>
- <customLabel>false</customLabel>
- <detailHeading>false</detailHeading>
- <editHeading>true</editHeading>
- <label>Information</label>
- <layoutColumns>
- <layoutItems>
- <behavior>Required</behavior>
- <field>Name</field>
- </layoutItems>
- <layoutItems>
- <behavior>Edit</behavior>
- <field>Type__c</field>
- </layoutItems>
- </layoutColumns>
- <layoutColumns>
- <layoutItems>
- <behavior>Required</behavior>
- <field>Reward_Amount__c</field>
- </layoutItems>
- <layoutItems>
- <behavior>Edit</behavior>
- <field>Status__c</field>
- </layoutItems>
- </layoutColumns>
- <style>TwoColumnsTopToBottom</style>
- </layoutSections>
- <layoutSections>
- <customLabel>true</customLabel>
- <detailHeading>false</detailHeading>
- <editHeading>false</editHeading>
- <label>Description</label>
- <layoutColumns>
- <layoutItems>
- <behavior>Edit</behavior>
- <field>Description__c</field>
- </layoutItems>
- </layoutColumns>
- <style>OneColumn</style>
- </layoutSections>
- <layoutSections>
- <customLabel>true</customLabel>
- <detailHeading>true</detailHeading>
- <editHeading>true</editHeading>
- <label>Goal Time Frame</label>
- <layoutColumns>
- <layoutItems>
- <behavior>Edit</behavior>
- <field>Start_Date__c</field>
- </layoutItems>
- </layoutColumns>
- <layoutColumns>
- <layoutItems>
- <behavior>Edit</behavior>
- <field>End_Date__c</field>
- </layoutItems>
- </layoutColumns>
- <style>TwoColumnsLeftToRight</style>
- </layoutSections>
- <layoutSections>
- <customLabel>true</customLabel>
- <detailHeading>true</detailHeading>
- <editHeading>true</editHeading>
- <label>Goal Statistics</label>
- <layoutColumns>
- <layoutItems>
- <behavior>Readonly</behavior>
- <field>Total_Points_Awarded__c</field>
- </layoutItems>
- </layoutColumns>
- <layoutColumns>
- <layoutItems>
- <behavior>Readonly</behavior>
- <field>Number_of_Achievements__c</field>
- </layoutItems>
- </layoutColumns>
- <style>TwoColumnsLeftToRight</style>
- </layoutSections>
- <layoutSections>
- <customLabel>true</customLabel>
- <detailHeading>true</detailHeading>
- <editHeading>true</editHeading>
- <label>Chatter Goal Details</label>
- <layoutColumns>
- <layoutItems>
- <behavior>Edit</behavior>
- <field>Chatter_Type__c</field>
- </layoutItems>
- </layoutColumns>
- <layoutColumns>
- <layoutItems>
- <behavior>Edit</behavior>
- <field>Last_Batch_Check_Time__c</field>
- </layoutItems>
- </layoutColumns>
- <style>TwoColumnsLeftToRight</style>
- </layoutSections>
- <layoutSections>
- <customLabel>true</customLabel>
- <detailHeading>true</detailHeading>
- <editHeading>true</editHeading>
- <label>Activity Goal Details</label>
- <layoutColumns>
- <layoutItems>
- <behavior>Edit</behavior>
- <field>Activity_Subject__c</field>
- </layoutItems>
- </layoutColumns>
- <layoutColumns>
- <layoutItems>
- <behavior>Edit</behavior>
- <field>Task_Status__c</field>
- </layoutItems>
- </layoutColumns>
- <style>TwoColumnsLeftToRight</style>
- </layoutSections>
- <layoutSections>
- <customLabel>true</customLabel>
- <detailHeading>true</detailHeading>
- <editHeading>true</editHeading>
- <label>Opportunity Goal Details</label>
- <layoutColumns>
- <layoutItems>
- <behavior>Edit</behavior>
- <field>Opportunity_Type__c</field>
- </layoutItems>
- <layoutItems>
- <behavior>Edit</behavior>
- <field>Opportunity_Amount__c</field>
- </layoutItems>
- </layoutColumns>
- <layoutColumns>
- <layoutItems>
- <behavior>Edit</behavior>
- <field>Opportunity_Stage__c</field>
- </layoutItems>
- </layoutColumns>
- <style>TwoColumnsLeftToRight</style>
- </layoutSections>
- <layoutSections>
- <customLabel>true</customLabel>
- <detailHeading>true</detailHeading>
- <editHeading>true</editHeading>
- <label>Case Goal Details</label>
- <layoutColumns>
- <layoutItems>
- <behavior>Edit</behavior>
- <field>Case_Type__c</field>
- </layoutItems>
- <layoutItems>
- <behavior>Edit</behavior>
- <field>Case_Priority__c</field>
- </layoutItems>
- </layoutColumns>
- <layoutColumns>
- <layoutItems>
- <behavior>Edit</behavior>
- <field>Case_Status__c</field>
- </layoutItems>
- </layoutColumns>
- <style>TwoColumnsLeftToRight</style>
- </layoutSections>
- <layoutSections>
- <customLabel>true</customLabel>
- <detailHeading>true</detailHeading>
- <editHeading>true</editHeading>
- <label>Lead Goal Details</label>
- <layoutColumns>
- <layoutItems>
- <behavior>Edit</behavior>
- <field>Lead_Status__c</field>
- </layoutItems>
- <layoutItems>
- <behavior>Edit</behavior>
- <field>Lead_Rating__c</field>
- </layoutItems>
- </layoutColumns>
- <layoutColumns>
- <layoutItems>
- <behavior>Edit</behavior>
- <field>Lead_Source__c</field>
- </layoutItems>
- </layoutColumns>
- <style>TwoColumnsLeftToRight</style>
- </layoutSections>
- <layoutSections>
- <customLabel>false</customLabel>
- <detailHeading>true</detailHeading>
- <editHeading>true</editHeading>
- <label>System Information</label>
- <layoutColumns>
- <layoutItems>
- <behavior>Readonly</behavior>
- <field>CreatedById</field>
- </layoutItems>
- <layoutItems>
- <behavior>Edit</behavior>
- <field>OwnerId</field>
- </layoutItems>
- </layoutColumns>
- <layoutColumns>
- <layoutItems>
- <behavior>Readonly</behavior>
- <field>LastModifiedById</field>
- </layoutItems>
- </layoutColumns>
- <style>TwoColumnsTopToBottom</style>
- </layoutSections>
- <layoutSections>
- <customLabel>true</customLabel>
- <detailHeading>false</detailHeading>
- <editHeading>true</editHeading>
- <label>Custom Links</label>
- <layoutColumns/>
- <layoutColumns/>
- <layoutColumns/>
- <style>CustomLinks</style>
- </layoutSections>
- <relatedLists>
- <fields>NAME</fields>
- <fields>User__c</fields>
- <relatedList>Goal_Participant__c.Goal__c</relatedList>
- <sortField>User__c</sortField>
- <sortOrder>Asc</sortOrder>
- </relatedLists>
- <relatedLists>
- <fields>NAME</fields>
- <fields>CREATED_DATE</fields>
- <fields>User__c</fields>
- <fields>Points_Awarded__c</fields>
- <relatedList>Achievement__c.Goal__c</relatedList>
- <sortField>CREATED_DATE</sortField>
- <sortOrder>Desc</sortOrder>
- </relatedLists>
- <relatedLists>
- <relatedList>RelatedNoteList</relatedList>
- </relatedLists>
- <showEmailCheckbox>false</showEmailCheckbox>
- <showRunAssignmentRulesCheckbox>false</showRunAssignmentRulesCheckbox>
- <showSubmitAndAttachButton>false</showSubmitAndAttachButton>
- <summaryLayout>
- <masterLabel>00hA000000QKwxi</masterLabel>
- <sizeX>4</sizeX>
- <sizeY>0</sizeY>
- <summaryLayoutStyle>Default</summaryLayoutStyle>
- </summaryLayout>
-</Layout>
View
163 layouts/Goal__c-Chatter Game Goal Layout.layout
@@ -1,163 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<Layout xmlns="http://soap.sforce.com/2006/04/metadata">
- <excludeButtons>Delete</excludeButtons>
- <excludeButtons>Submit</excludeButtons>
- <layoutSections>
- <customLabel>false</customLabel>
- <detailHeading>false</detailHeading>
- <editHeading>true</editHeading>
- <label>Information</label>
- <layoutColumns>
- <layoutItems>
- <behavior>Required</behavior>
- <field>Name</field>
- </layoutItems>
- <layoutItems>
- <behavior>Edit</behavior>
- <field>Type__c</field>
- </layoutItems>
- </layoutColumns>
- <layoutColumns>
- <layoutItems>
- <behavior>Required</behavior>
- <field>Reward_Amount__c</field>
- </layoutItems>
- <layoutItems>
- <behavior>Edit</behavior>
- <field>Status__c</field>
- </layoutItems>
- </layoutColumns>
- <style>TwoColumnsTopToBottom</style>
- </layoutSections>
- <layoutSections>
- <customLabel>true</customLabel>
- <detailHeading>false</detailHeading>
- <editHeading>false</editHeading>
- <label>Description</label>
- <layoutColumns>
- <layoutItems>
- <behavior>Edit</behavior>
- <field>Description__c</field>
- </layoutItems>
- </layoutColumns>
- <style>OneColumn</style>
- </layoutSections>
- <layoutSections>
- <customLabel>true</customLabel>
- <detailHeading>true</detailHeading>
- <editHeading>true</editHeading>
- <label>Goal Time Frame</label>
- <layoutColumns>
- <layoutItems>
- <behavior>Edit</behavior>
- <field>Start_Date__c</field>
- </layoutItems>
- </layoutColumns>
- <layoutColumns>
- <layoutItems>
- <behavior>Edit</behavior>
- <field>End_Date__c</field>
- </layoutItems>
- </layoutColumns>
- <style>TwoColumnsLeftToRight</style>
- </layoutSections>
- <layoutSections>
- <customLabel>true</customLabel>
- <detailHeading>true</detailHeading>
- <editHeading>true</editHeading>
- <label>Goal Statistics</label>
- <layoutColumns>
- <layoutItems>
- <behavior>Readonly</behavior>
- <field>Total_Points_Awarded__c</field>
- </layoutItems>
- </layoutColumns>
- <layoutColumns>
- <layoutItems>
- <behavior>Readonly</behavior>
- <field>Number_of_Achievements__c</field>
- </layoutItems>
- </layoutColumns>
- <style>TwoColumnsLeftToRight</style>
- </layoutSections>
- <layoutSections>
- <customLabel>true</customLabel>
- <detailHeading>true</detailHeading>
- <editHeading>true</editHeading>
- <label>Chatter Goal Details</label>
- <layoutColumns>
- <layoutItems>
- <behavior>Edit</behavior>
- <field>Chatter_Type__c</field>
- </layoutItems>
- </layoutColumns>
- <layoutColumns>
- <layoutItems>
- <behavior>Edit</behavior>
- <field>Last_Batch_Check_Time__c</field>
- </layoutItems>
- </layoutColumns>
- <style>TwoColumnsLeftToRight</style>
- </layoutSections>
- <layoutSections>
- <customLabel>false</customLabel>
- <detailHeading>true</detailHeading>
- <editHeading>true</editHeading>
- <label>System Information</label>
- <layoutColumns>
- <layoutItems>
- <behavior>Readonly</behavior>
- <field>CreatedById</field>
- </layoutItems>
- <layoutItems>
- <behavior>Edit</behavior>
- <field>OwnerId</field>
- </layoutItems>
- </layoutColumns>
- <layoutColumns>
- <layoutItems>
- <behavior>Readonly</behavior>
- <field>LastModifiedById</field>
- </layoutItems>
- </layoutColumns>
- <style>TwoColumnsTopToBottom</style>
- </layoutSections>
- <layoutSections>
- <customLabel>true</customLabel>
- <detailHeading>false</detailHeading>
- <editHeading>true</editHeading>
- <label>Custom Links</label>
- <layoutColumns/>
- <layoutColumns/>
- <layoutColumns/>
- <style>CustomLinks</style>
- </layoutSections>
- <relatedLists>
- <fields>NAME</fields>
- <fields>User__c</fields>
- <relatedList>Goal_Participant__c.Goal__c</relatedList>
- <sortField>User__c</sortField>
- <sortOrder>Asc</sortOrder>
- </relatedLists>
- <relatedLists>
- <fields>NAME</fields>
- <fields>CREATED_DATE</fields>
- <fields>User__c</fields>
- <fields>Points_Awarded__c</fields>
- <relatedList>Achievement__c.Goal__c</relatedList>
- <sortField>CREATED_DATE</sortField>
- <sortOrder>Desc</sortOrder>
- </relatedLists>
- <relatedLists>
- <relatedList>RelatedNoteList</relatedList>
- </relatedLists>
- <showEmailCheckbox>false</showEmailCheckbox>
- <showRunAssignmentRulesCheckbox>false</showRunAssignmentRulesCheckbox>
- <showSubmitAndAttachButton>false</showSubmitAndAttachButton>
- <summaryLayout>
- <masterLabel>00hA000000QKwxd</masterLabel>
- <sizeX>4</sizeX>
- <sizeY>0</sizeY>
- <summaryLayoutStyle>Default</summaryLayoutStyle>
- </summaryLayout>
-</Layout>
View
163 layouts/Goal__c-Goal Layout.layout
@@ -1,163 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<Layout xmlns="http://soap.sforce.com/2006/04/metadata">
- <excludeButtons>Delete</excludeButtons>
- <excludeButtons>Submit</excludeButtons>
- <layoutSections>
- <customLabel>false</customLabel>
- <detailHeading>false</detailHeading>
- <editHeading>true</editHeading>
- <label>Information</label>
- <layoutColumns>
- <layoutItems>
- <behavior>Required</behavior>
- <field>Name</field>
- </layoutItems>
- <layoutItems>
- <behavior>Edit</behavior>
- <field>Type__c</field>
- </layoutItems>
- </layoutColumns>
- <layoutColumns>
- <layoutItems>
- <behavior>Required</behavior>
- <field>Reward_Amount__c</field>
- </layoutItems>
- <layoutItems>
- <behavior>Edit</behavior>
- <field>Status__c</field>
- </layoutItems>
- </layoutColumns>
- <style>TwoColumnsTopToBottom</style>
- </layoutSections>
- <layoutSections>
- <customLabel>true</customLabel>
- <detailHeading>false</detailHeading>
- <editHeading>false</editHeading>
- <label>Description</label>
- <layoutColumns>
- <layoutItems>
- <behavior>Edit</behavior>
- <field>Description__c</field>
- </layoutItems>
- </layoutColumns>
- <style>OneColumn</style>
- </layoutSections>
- <layoutSections>
- <customLabel>true</customLabel>
- <detailHeading>true</detailHeading>
- <editHeading>true</editHeading>
- <label>Goal Time Frame</label>
- <layoutColumns>
- <layoutItems>
- <behavior>Edit</behavior>
- <field>Start_Date__c</field>
- </layoutItems>
- </layoutColumns>
- <layoutColumns>
- <layoutItems>
- <behavior>Edit</behavior>
- <field>End_Date__c</field>
- </layoutItems>
- </layoutColumns>
- <style>TwoColumnsLeftToRight</style>
- </layoutSections>
- <layoutSections>
- <customLabel>true</customLabel>
- <detailHeading>true</detailHeading>
- <editHeading>true</editHeading>
- <label>Goal Statistics</label>
- <layoutColumns>
- <layoutItems>
- <behavior>Readonly</behavior>
- <field>Total_Points_Awarded__c</field>
- </layoutItems>
- </layoutColumns>
- <layoutColumns>
- <layoutItems>
- <behavior>Readonly</behavior>
- <field>Number_of_Achievements__c</field>
- </layoutItems>
- </layoutColumns>
- <style>TwoColumnsLeftToRight</style>
- </layoutSections>
- <layoutSections>
- <customLabel>true</customLabel>
- <detailHeading>true</detailHeading>
- <editHeading>true</editHeading>
- <label>Chatter Goal Details</label>
- <layoutColumns>
- <layoutItems>
- <behavior>Edit</behavior>
- <field>Chatter_Type__c</field>
- </layoutItems>
- </layoutColumns>
- <layoutColumns>
- <layoutItems>
- <behavior>Edit</behavior>
- <field>Last_Batch_Check_Time__c</field>
- </layoutItems>
- </layoutColumns>
- <style>TwoColumnsLeftToRight</style>
- </layoutSections>
- <layoutSections>
- <customLabel>false</customLabel>
- <detailHeading>true</detailHeading>
- <editHeading>true</editHeading>
- <label>System Information</label>
- <layoutColumns>
- <layoutItems>
- <behavior>Readonly</behavior>
- <field>CreatedById</field>
- </layoutItems>
- <layoutItems>
- <behavior>Edit</behavior>
- <field>OwnerId</field>
- </layoutItems>
- </layoutColumns>
- <layoutColumns>
- <layoutItems>
- <behavior>Readonly</behavior>
- <field>LastModifiedById</field>
- </layoutItems>
- </layoutColumns>
- <style>TwoColumnsTopToBottom</style>
- </layoutSections>
- <layoutSections>
- <customLabel>true</customLabel>
- <detailHeading>false</detailHeading>
- <editHeading>true</editHeading>
- <label>Custom Links</label>
- <layoutColumns/>
- <layoutColumns/>
- <layoutColumns/>
- <style>CustomLinks</style>
- </layoutSections>
- <relatedLists>
- <fields>NAME</fields>
- <fields>User__c</fields>
- <relatedList>Goal_Participant__c.Goal__c</relatedList>
- <sortField>User__c</sortField>
- <sortOrder>Asc</sortOrder>
- </relatedLists>
- <relatedLists>
- <fields>NAME</fields>
- <fields>CREATED_DATE</fields>
- <fields>User__c</fields>
- <fields>Points_Awarded__c</fields>
- <relatedList>Achievement__c.Goal__c</relatedList>
- <sortField>CREATED_DATE</sortField>
- <sortOrder>Desc</sortOrder>
- </relatedLists>
- <relatedLists>
- <relatedList>RelatedNoteList</relatedList>
- </relatedLists>
- <showEmailCheckbox>false</showEmailCheckbox>
- <showRunAssignmentRulesCheckbox>false</showRunAssignmentRulesCheckbox>
- <showSubmitAndAttachButton>false</showSubmitAndAttachButton>
- <summaryLayout>
- <masterLabel>00hA000000QKmWW</masterLabel>
- <sizeX>4</sizeX>
- <sizeY>0</sizeY>
- <summaryLayoutStyle>Default</summaryLayoutStyle>
- </summaryLayout>
-</Layout>
View
135 objects/Achievement__c.object
@@ -1,135 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<CustomObject xmlns="http://soap.sforce.com/2006/04/metadata">
- <actionOverrides>
- <actionName>Accept</actionName>
- <type>Default</type>
- </actionOverrides>
- <actionOverrides>
- <actionName>Clone</actionName>
- <type>Default</type>
- </actionOverrides>
- <actionOverrides>
- <actionName>Delete</actionName>
- <type>Default</type>
- </actionOverrides>
- <actionOverrides>
- <actionName>Edit</actionName>
- <type>Default</type>
- </actionOverrides>
- <actionOverrides>
- <actionName>List</actionName>
- <type>Default</type>
- </actionOverrides>
- <actionOverrides>
- <actionName>New</actionName>
- <type>Default</type>
- </actionOverrides>
- <actionOverrides>
- <actionName>Tab</actionName>
- <type>Default</type>
- </actionOverrides>
- <actionOverrides>
- <actionName>View</actionName>
- <type>Default</type>
- </actionOverrides>
- <deploymentStatus>Deployed</deploymentStatus>
- <description>A point transaction record for a participant being rewarded for completing a goal.</description>
- <enableActivities>false</enableActivities>
- <enableFeeds>false</enableFeeds>
- <enableHistory>true</enableHistory>
- <enableReports>true</enableReports>
- <fields>
- <fullName>Goal__c</fullName>
- <externalId>false</externalId>
- <label>Goal</label>
- <referenceTo>Goal__c</referenceTo>
- <relationshipLabel>Achievements</relationshipLabel>
- <relationshipName>Achievements</relationshipName>
- <relationshipOrder>0</relationshipOrder>
- <trackHistory>true</trackHistory>
- <type>MasterDetail</type>
- <writeRequiresMasterRead>false</writeRequiresMasterRead>
- </fields>
- <fields>
- <fullName>Object_Id__c</fullName>
- <externalId>false</externalId>
- <label>Object Id</label>
- <length>63</length>
- <required>false</required>
- <trackHistory>true</trackHistory>
- <type>Text</type>
- <unique>false</unique>
- </fields>
- <fields>
- <fullName>Object_Modified__c</fullName>
- <externalId>false</externalId>
- <formula>IF( Object_Id__c != &apos;&apos;, HYPERLINK(&apos;/&apos; + Object_Id__c , Object_Id__c, &apos;_blank&apos;), &apos;&apos;)</formula>
- <formulaTreatBlanksAs>BlankAsZero</formulaTreatBlanksAs>
- <label>Object Modified</label>
- <required>false</required>
- <trackHistory>false</trackHistory>
- <type>Text</type>
- <unique>false</unique>
- </fields>
- <fields>
- <fullName>Points_Awarded__c</fullName>
- <externalId>false</externalId>
- <label>Points Awarded</label>
- <precision>18</precision>
- <required>true</required>
- <scale>0</scale>
- <trackHistory>true</trackHistory>
- <type>Number</type>
- <unique>false</unique>
- </fields>
- <fields>
- <fullName>User__c</fullName>
- <externalId>false</externalId>
- <label>User</label>
- <referenceTo>User</referenceTo>
- <relationshipName>Achievements</relationshipName>
- <trackHistory>true</trackHistory>
- <type>Lookup</type>
- </fields>
- <label>Achievement</label>
- <listViews>
- <fullName>All</fullName>
- <filterScope>Everything</filterScope>
- <label>All</label>
- </listViews>
- <nameField>
- <displayFormat>A-{00000}</displayFormat>
- <label>Acheivement ID</label>
- <trackHistory>true</trackHistory>
- <type>AutoNumber</type>
- </nameField>
- <pluralLabel>Achievements</pluralLabel>
- <searchLayouts>
- <customTabListAdditionalFields>Goal__c</customTabListAdditionalFields>
- <customTabListAdditionalFields>User__c</customTabListAdditionalFields>
- <customTabListAdditionalFields>CREATED_DATE</customTabListAdditionalFields>
- <customTabListAdditionalFields>Object_Modified__c</customTabListAdditionalFields>
- <customTabListAdditionalFields>Points_Awarded__c</customTabListAdditionalFields>
- <lookupDialogsAdditionalFields>Goal__c</lookupDialogsAdditionalFields>
- <lookupDialogsAdditionalFields>User__c</lookupDialogsAdditionalFields>
- <lookupDialogsAdditionalFields>CREATED_DATE</lookupDialogsAdditionalFields>
- <lookupDialogsAdditionalFields>Object_Modified__c</lookupDialogsAdditionalFields>
- <lookupDialogsAdditionalFields>Points_Awarded__c</lookupDialogsAdditionalFields>
- <lookupPhoneDialogsAdditionalFields>Goal__c</lookupPhoneDialogsAdditionalFields>
- <lookupPhoneDialogsAdditionalFields>User__c</lookupPhoneDialogsAdditionalFields>
- <lookupPhoneDialogsAdditionalFields>CREATED_DATE</lookupPhoneDialogsAdditionalFields>
- <lookupPhoneDialogsAdditionalFields>Object_Modified__c</lookupPhoneDialogsAdditionalFields>
- <lookupPhoneDialogsAdditionalFields>Points_Awarded__c</lookupPhoneDialogsAdditionalFields>
- <searchFilterFields>Goal__c</searchFilterFields>
- <searchFilterFields>User__c</searchFilterFields>
- <searchFilterFields>CREATED_DATE</searchFilterFields>
- <searchFilterFields>Object_Modified__c</searchFilterFields>
- <searchFilterFields>Points_Awarded__c</searchFilterFields>
- <searchResultsAdditionalFields>Goal__c</searchResultsAdditionalFields>
- <searchResultsAdditionalFields>User__c</searchResultsAdditionalFields>
- <searchResultsAdditionalFields>CREATED_DATE</searchResultsAdditionalFields>
- <searchResultsAdditionalFields>Object_Modified__c</searchResultsAdditionalFields>
- <searchResultsAdditionalFields>Points_Awarded__c</searchResultsAdditionalFields>
- </searchLayouts>
- <sharingModel>ControlledByParent</sharingModel>
-</CustomObject>
View
69 objects/Goal_Participant__c.object
@@ -1,69 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<CustomObject xmlns="http://soap.sforce.com/2006/04/metadata">
- <actionOverrides>
- <actionName>Accept</actionName>
- <type>Default</type>
- </actionOverrides>
- <actionOverrides>
- <actionName>Clone</actionName>
- <type>Default</type>
- </actionOverrides>
- <actionOverrides>
- <actionName>Delete</actionName>
- <type>Default</type>
- </actionOverrides>
- <actionOverrides>
- <actionName>Edit</actionName>
- <type>Default</type>
- </actionOverrides>
- <actionOverrides>
- <actionName>List</actionName>
- <type>Default</type>
- </actionOverrides>
- <actionOverrides>
- <actionName>New</actionName>
- <type>Default</type>
- </actionOverrides>
- <actionOverrides>
- <actionName>Tab</actionName>
- <type>Default</type>
- </actionOverrides>
- <actionOverrides>
- <actionName>View</actionName>
- <type>Default</type>
- </actionOverrides>
- <deploymentStatus>Deployed</deploymentStatus>
- <description>Defines which Salesforce users can receive points for completing which goals.</description>
- <enableActivities>false</enableActivities>
- <enableFeeds>false</enableFeeds>
- <enableHistory>false</enableHistory>
- <enableReports>true</enableReports>
- <fields>
- <fullName>Goal__c</fullName>
- <externalId>false</externalId>
- <label>Goal</label>
- <referenceTo>Goal__c</referenceTo>
- <relationshipLabel>Goal Participants</relationshipLabel>
- <relationshipName>Goal_Participants</relationshipName>
- <relationshipOrder>0</relationshipOrder>
- <type>MasterDetail</type>
- <writeRequiresMasterRead>false</writeRequiresMasterRead>
- </fields>
- <fields>
- <fullName>User__c</fullName>
- <externalId>false</externalId>
- <label>User</label>
- <referenceTo>User</referenceTo>
- <relationshipName>Goal_Participants</relationshipName>
- <type>Lookup</type>
- </fields>
- <label>Goal Participant</label>
- <nameField>
- <displayFormat>GP-{00000}</displayFormat>
- <label>Goal Participant ID</label>
- <type>AutoNumber</type>
- </nameField>
- <pluralLabel>Goal Participants</pluralLabel>
- <searchLayouts/>
- <sharingModel>ControlledByParent</sharingModel>
-</CustomObject>
View
353 objects/Goal__c.object
@@ -1,353 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<CustomObject xmlns="http://soap.sforce.com/2006/04/metadata">
- <actionOverrides>
- <actionName>Accept</actionName>
- <type>Default</type>
- </actionOverrides>
- <actionOverrides>
- <actionName>Clone</actionName>
- <type>Default</type>
- </actionOverrides>
- <actionOverrides>
- <actionName>Delete</actionName>
- <type>Default</type>
- </actionOverrides>
- <actionOverrides>
- <actionName>Edit</actionName>
- <type>Default</type>
- </actionOverrides>
- <actionOverrides>
- <actionName>List</actionName>
- <type>Default</type>
- </actionOverrides>
- <actionOverrides>
- <actionName>New</actionName>
- <type>Default</type>
- </actionOverrides>
- <actionOverrides>
- <actionName>Tab</actionName>
- <type>Default</type>
- </actionOverrides>
- <actionOverrides>
- <actionName>View</actionName>
- <type>Default</type>
- </actionOverrides>
- <deploymentStatus>Deployed</deploymentStatus>
- <description>Defines what actions in Chatter that your participating users must do to earn points.</description>
- <enableActivities>true</enableActivities>
- <enableFeeds>true</enableFeeds>
- <enableHistory>true</enableHistory>
- <enableReports>true</enableReports>
- <fields>
- <fullName>Activity_Subject__c</fullName>
- <externalId>false</externalId>
- <label>Activity Subject</label>
- <length>255</length>
- <required>false</required>
- <trackFeedHistory>false</trackFeedHistory>
- <trackHistory>true</trackHistory>
- <type>Text</type>
- <unique>false</unique>
- </fields>
- <fields>
- <fullName>Case_Priority__c</fullName>
- <externalId>false</externalId>
- <label>Case Priority</label>
- <length>255</length>
- <required>false</required>
- <trackFeedHistory>false</trackFeedHistory>
- <trackHistory>true</trackHistory>
- <type>Text</type>
- <unique>false</unique>
- </fields>
- <fields>
- <fullName>Case_Status__c</fullName>
- <externalId>false</externalId>
- <label>Case Status</label>
- <length>255</length>
- <required>false</required>
- <trackFeedHistory>false</trackFeedHistory>
- <trackHistory>true</trackHistory>
- <type>Text</type>
- <unique>false</unique>
- </fields>
- <fields>
- <fullName>Case_Type__c</fullName>
- <externalId>false</externalId>
- <label>Case Type</label>
- <length>255</length>
- <required>false</required>
- <trackFeedHistory>false</trackFeedHistory>
- <trackHistory>true</trackHistory>
- <type>Text</type>
- <unique>false</unique>
- </fields>
- <fields>
- <fullName>Chatter_Type__c</fullName>
- <externalId>false</externalId>
- <label>Chatter Type</label>
- <length>20</length>
- <required>false</required>
- <trackFeedHistory>false</trackFeedHistory>
- <trackHistory>false</trackHistory>
- <type>Text</type>
- <unique>false</unique>
- </fields>
- <fields>
- <fullName>Description__c</fullName>
- <externalId>false</externalId>
- <label>Description</label>
- <length>32000</length>
- <trackFeedHistory>true</trackFeedHistory>
- <trackHistory>false</trackHistory>
- <type>LongTextArea</type>
- <visibleLines>3</visibleLines>
- </fields>
- <fields>
- <fullName>End_Date__c</fullName>
- <externalId>false</externalId>
- <label>End Date</label>
- <required>false</required>
- <trackFeedHistory>true</trackFeedHistory>
- <trackHistory>true</trackHistory>
- <type>Date</type>
- </fields>
- <fields>
- <fullName>Last_Batch_Check_Time__c</fullName>
- <defaultValue>NOW()</defaultValue>
- <externalId>false</externalId>
- <label>Last Batch Check Time</label>
- <required>false</required>
- <trackFeedHistory>false</trackFeedHistory>
- <trackHistory>false</trackHistory>
- <type>DateTime</type>
- </fields>
- <fields>
- <fullName>Lead_Rating__c</fullName>
- <externalId>false</externalId>
- <label>Lead Rating</label>
- <length>255</length>
- <required>false</required>
- <trackFeedHistory>false</trackFeedHistory>
- <trackHistory>true</trackHistory>
- <type>Text</type>
- <unique>false</unique>
- </fields>
- <fields>
- <fullName>Lead_Source__c</fullName>
- <externalId>false</externalId>
- <label>Lead Source</label>
- <length>255</length>
- <required>false</required>
- <trackFeedHistory>false</trackFeedHistory>
- <trackHistory>true</trackHistory>
- <type>Text</type>
- <unique>false</unique>