Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Services Team committed Nov 29, 2022
0 parents commit 0dc8507
Show file tree
Hide file tree
Showing 233 changed files with 26,001 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.scannerwork
pmd.xml
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Milestones PM - Copy - Do not use
==============
This project is a copy of the [Milestones-PM](https://github.com/SalesforceLabs/Milestones-PM), this copy of the original repo is hosted here for the sole purpose of demonstrating SonarQube APEX code analysis.

Please don't use this code, or any bytecode hosted here, for anything. Please refer to the original Force.com LAB repository for any use of the library.




481 changes: 481 additions & 0 deletions pmd-quick.xml

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions salesforce.schema
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
place holder
Binary file added src/.DS_Store
Binary file not shown.
82 changes: 82 additions & 0 deletions src/analyticSnapshots/Project_Status_Analytic_Snapshot.snapshot
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
<?xml version="1.0" encoding="UTF-8"?>
<AnalyticSnapshot xmlns="http://soap.sforce.com/2006/04/metadata">
<mappings>
<sourceField>Milestone1_Project__c$Status__c</sourceField>
<sourceType>tabular</sourceType>
<targetField>Project_Snapshot__c.Status__c</targetField>
</mappings>
<mappings>
<sourceField>Milestone1_Project__c$Name</sourceField>
<sourceType>tabular</sourceType>
<targetField>Project_Snapshot__c.Project_Name__c</targetField>
</mappings>
<mappings>
<sourceField>Milestone1_Project__c$Total_Open_Task_Count__c</sourceField>
<sourceType>tabular</sourceType>
<targetField>Project_Snapshot__c.Open_Task_Count__c</targetField>
</mappings>
<mappings>
<sourceField>Milestone1_Project__c$Total_Late_Task_Count__c</sourceField>
<sourceType>tabular</sourceType>
<targetField>Project_Snapshot__c.Late_Task_Count__c</targetField>
</mappings>
<mappings>
<sourceField>Milestone1_Project__c$Total_Blocked_Task_Count__c</sourceField>
<sourceType>tabular</sourceType>
<targetField>Project_Snapshot__c.Blocked_Task_Count__c</targetField>
</mappings>
<mappings>
<sourceField>Milestone1_Project__c$Total_Complete_Task_Count__c</sourceField>
<sourceType>tabular</sourceType>
<targetField>Project_Snapshot__c.Complete_Task_Count__c</targetField>
</mappings>
<mappings>
<sourceField>Milestone1_Project__c$Total_Expense_Budget__c</sourceField>
<sourceType>tabular</sourceType>
<targetField>Project_Snapshot__c.Expense_Budget__c</targetField>
</mappings>
<mappings>
<sourceField>Milestone1_Project__c$Total_Expense_Estimate__c</sourceField>
<sourceType>tabular</sourceType>
<targetField>Project_Snapshot__c.Expense_Estimate__c</targetField>
</mappings>
<mappings>
<sourceField>Milestone1_Project__c$Total_Hours_Budget__c</sourceField>
<sourceType>tabular</sourceType>
<targetField>Project_Snapshot__c.Hours_Budget__c</targetField>
</mappings>
<mappings>
<sourceField>Milestone1_Project__c$Total_Hours_Estimate__c</sourceField>
<sourceType>tabular</sourceType>
<targetField>Project_Snapshot__c.Hours_Estimate__c</targetField>
</mappings>
<mappings>
<sourceField>Milestone1_Project__c$Total_Hours_Incurred__c</sourceField>
<sourceType>tabular</sourceType>
<targetField>Project_Snapshot__c.Hours_Incurred__c</targetField>
</mappings>
<mappings>
<sourceField>Milestone1_Project__c$Total_Expense_Incurred__c</sourceField>
<sourceType>tabular</sourceType>
<targetField>Project_Snapshot__c.Expense_Incurred__c</targetField>
</mappings>
<mappings>
<sourceField>Milestone1_Project__c$Number_of_Incomplete_Milestones__c</sourceField>
<sourceType>tabular</sourceType>
<targetField>Project_Snapshot__c.Incomplete_Milestones__c</targetField>
</mappings>
<mappings>
<sourceField>Milestone1_Project__c$Number_of_Incomplete_Top_Milestones__c</sourceField>
<sourceType>tabular</sourceType>
<targetField>Project_Snapshot__c.Incomplete_Top_Milestones__c</targetField>
</mappings>
<mappings>
<sourceField>ExecutionTime</sourceField>
<sourceType>snapshot</sourceType>
<targetField>Project_Snapshot__c.Date__c</targetField>
</mappings>
<name>Project Status Analytic Snapshot</name>
<runningUser>[email protected]</runningUser>
<sourceReport>Milestone_Project_Management/Project_Snapshot</sourceReport>
<targetObject>Project_Snapshot__c</targetObject>
</AnalyticSnapshot>
20 changes: 20 additions & 0 deletions src/applications/Project_Mgmt_Labs.app
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<CustomApplication xmlns="http://soap.sforce.com/2006/04/metadata">
<defaultLandingTab>Milestone1_Getting_Started</defaultLandingTab>
<description>Milestones PM - Project Planning and Task Management Application - Force.com Labs</description>
<isNavAutoTempTabsDisabled>false</isNavAutoTempTabsDisabled>
<isNavPersonalizationDisabled>false</isNavPersonalizationDisabled>
<label>Milestones PM</label>
<tabs>Milestone1_Getting_Started</tabs>
<tabs>Milestone1_Summary</tabs>
<tabs>Milestone1_Project__c</tabs>
<tabs>Milestone1_Milestone__c</tabs>
<tabs>Milestone1_Task__c</tabs>
<tabs>Milestone1_Time__c</tabs>
<tabs>Milestone1_Expense__c</tabs>
<tabs>Milestone1_Log__c</tabs>
<tabs>Milestone_Calendar</tabs>
<tabs>Milestone1_Import_Project_Template</tabs>
<tabs>standard-report</tabs>
<tabs>standard-Dashboard</tabs>
</CustomApplication>
55 changes: 55 additions & 0 deletions src/aura/mytasks/mytasks.cmp
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
<!--
* * File Name: mytasks.cmp
* Description : Lightning Component for dislaying list of tasks
* Copyright : salesforce.com, Inc. (c) 2016
* * @author : Shae Selix
* Modification Log ===============================================================
Ver Date Author Modification
*
-->

<aura:component controller="Milestone1_TaskTableController">

<aura:attribute name="tasks" type="Milestone1_Task__c[]"/>

<!-- PAGE HEADER -->
<div class="slds-page-header" role="banner">
<div class="slds-grid slds-wrap slds-grid--pull-padded">
<div class="slds-col">

<h3 class="slds-text-heading--medium">My Tasks</h3>
</div>
<div class="slds-col">
<ui:button class="slds-button slds-button--neutral"
press="{!c.incompleteTasks}">
Incomplete Tasks
</ui:button>
</div>
<div class="slds-col">
<ui:button class="slds-button slds-button--neutral"
press="{!c.lateTasks}">
Late Tasks
</ui:button>
</div>
<div class="slds-col">
<ui:button class="slds-button slds-button--neutral"
press="{!c.blockedTasks}">
Blocked Tasks
</ui:button>
</div>
<div class="slds-col">
<ui:button class="slds-button slds-button--neutral"
press="{!c.deleteTasks}">
Close
</ui:button>
</div>
</div>
</div>
<!-- / PAGE HEADER -->

<!-- TASK LIST -->
<c:tasklist tasks="{!v.tasks}"/>
<!-- / TASK LIST -->


</aura:component>
5 changes: 5 additions & 0 deletions src/aura/mytasks/mytasks.cmp-meta.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<AuraDefinitionBundle xmlns="http://soap.sforce.com/2006/04/metadata">
<apiVersion>42.0</apiVersion>
<description>A Lightning Component Bundle</description>
</AuraDefinitionBundle>
17 changes: 17 additions & 0 deletions src/aura/mytasks/mytasksController.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
({

incompleteTasks : function(component, event, helper) {
helper.getsetTasks(component, "c.getIncompletedTasks");
},
lateTasks : function(component, event, helper) {
helper.getsetTasks(component, "c.getLateTasks");
},
blockedTasks : function(component, event, helper) {
helper.getsetTasks(component, "c.getBlockedTasks")
},
deleteTasks : function(component, event, helper) {
var theTasks = component.get("v.tasks");
theTasks = null;
component.set("v.tasks", theTasks);
}
})
21 changes: 21 additions & 0 deletions src/aura/mytasks/mytasksHelper.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
({
getsetTasks : function(component, apexFunction) {
var action = component.get(apexFunction);

action.setCallback(this, function(response) {
var state = response.getState();
if (component.isValid() && state === "SUCCESS") {

var theTasks = component.get("v.tasks");
theTasks = response.getReturnValue();
component.set("v.tasks", theTasks);

}
else {
console.log("Failed with state: " + state);
}
});

$A.enqueueAction(action);
}
})
79 changes: 79 additions & 0 deletions src/aura/tasklist/tasklist.cmp
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
<!--
* * File Name: tasklist.cmp
* Description : Inner Component of mytasks.cmp
* Copyright : salesforce.com, Inc. (c) 2016
* * @author : Shae Selix
* Modification Log ===============================================================
Ver Date Author Modification
*
-->

<aura:component >

<aura:attribute name="tasks" type="Milestone1_Task__c[]"/>

<div class="slds-card slds-p-top--medium"
style="{!v.tasks.length > 0 ? null : 'display: none'}">

<section class="slds-card__body">
<table class="slds-table slds-table--bordered slds-table--fixed-layout" role="grid">
<thead>
<tr class="slds-text-title--caps">

<th scope="col">
<div class="slds-truncate slds-text-heading--label" title="Task Name">Task Name</div>
</th>
<th scope="col">
<div class="slds-truncate slds-text-heading--label" title="Due Date">Due Date</div>
</th>
<th scope="col">
<div class="slds-truncate slds-text-heading--label" title="Milestone Name">Milestone Name</div>
</th>
<th scope="col">
<div class="slds-truncate slds-text-heading--label" title="Project Name">Project Name</div>
</th>
</tr>
</thead>
<tbody>
<aura:iteration items="{!v.tasks}" var="task">
<tr>
<th scope="row" data-label="Task Name">
<div class="slds-truncate" title="{!task.Name}">
<a aura:id="task" href="{!'/' + task.Id}">
{!task.Name}
</a>
</div>
</th>
<td data-label="Due Date">
<div class="slds-truncate" title="{!task.Due_Date__c}">
{!task.Due_Date__c}
</div>
</td>
<td data-label="Milestone Name">
<div class="slds-truncate" title="{!task.Project_Milestone__r.Name}">
<a aura:id="task" href="{!'/' + task.Project_Milestone__c}">
{!task.Project_Milestone__r.Name}
</a>
</div>
</td>
<td data-label="Project Name">
<div class="slds-truncate" title="{!task.Project_Milestone__r.Project__r.Name}">
<a aura:id="task" href="{!'/' + task.Project_Milestone__r.Project__c}">
{!task.Project_Milestone__r.Project__r.Name}
</a>
</div>
</td>
</tr>
</aura:iteration>
</tbody>
</table>

<div id="list" class="row">
<aura:iteration items="{!v.tasks}" var="task">

</aura:iteration>
</div>
</section>
</div>

</aura:component>
5 changes: 5 additions & 0 deletions src/aura/tasklist/tasklist.cmp-meta.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<AuraDefinitionBundle xmlns="http://soap.sforce.com/2006/04/metadata">
<apiVersion>42.0</apiVersion>
<description>A Lightning Component Bundle</description>
</AuraDefinitionBundle>
13 changes: 13 additions & 0 deletions src/aura/vfApp/vfApp.app
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!--
* * File Name: vfApp.app
* Description : Lightning Application for hosting mytasks.cmp on VF
* Copyright : salesforce.com, Inc. (c) 2016
* * @author : Shae Selix
* Modification Log ===============================================================
Ver Date Author Modification
*
-->

<aura:application access="GLOBAL" extends="ltng:outApp">
<aura:dependency resource="c:mytasks"/>
</aura:application>
5 changes: 5 additions & 0 deletions src/aura/vfApp/vfApp.app-meta.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<AuraDefinitionBundle xmlns="http://soap.sforce.com/2006/04/metadata">
<apiVersion>42.0</apiVersion>
<description>A Lightning Component Bundle</description>
</AuraDefinitionBundle>
56 changes: 56 additions & 0 deletions src/classes/Milestone1_Calendar_Item.cls
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
/*
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:
* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
* 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.
* Neither the name of the salesforce.com, Inc. nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "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 COPYRIGHT HOLDER OR CONTRIBUTORS 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.
*/

public with sharing class Milestone1_Calendar_Item
{
public String aid {get;set;}
public String name {get;set;}
public Date theDate {get;set;}
public String theType {get;set;}

public static final String PROJECT_TYPE = 'PROJECT_TYPE';
public static final String MILESTONE_TYPE = 'MILESTONE_TYPE';
public static final String TASK_TYPE = 'TASK_TYPE';

public Milestone1_Calendar_Item(String theId, String theName, Date inputDate, String inType)
{
aid = theId;
name = theName;
theDate = inputDate;
theType = inType;
}

static testMethod void testCalendarItem()
{
Milestone1_Calendar_Item calItem = new Milestone1_Calendar_Item('ABCDEFG','UNIT TEST',Date.today(),Milestone1_Calendar_Item.PROJECT_TYPE);
system.assertEquals('UNIT TEST',calItem.name);
system.assertEquals('ABCDEFG', calItem.aid);
system.assertEquals(Date.today(),calItem.theDate);
}
}
5 changes: 5 additions & 0 deletions src/classes/Milestone1_Calendar_Item.cls-meta.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
<apiVersion>20.0</apiVersion>
<status>Active</status>
</ApexClass>
Loading

0 comments on commit 0dc8507

Please sign in to comment.