Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2 Additional Dashlet Charts #3552

Closed
wants to merge 7 commits into from
Closed

Conversation

ricktimmis
Copy link

Description

Implements a new Chart "Module Activity" this uses the Tracker table to identify new record creation, within a configurable time frame, and across a selection of Modules. It presents this as a Horizontal Bar graph, by User, by Module.

Implements an additionally modified Sales Pipeline by Sales Stage, by Sales Agent. This chart was originally available in SugarCRM, but then removed. However, it is such a valuable Sales Management chart that I felt it needed to be reimplemented.

Additional: Superceded previous Pull Request ( Now Closed ) , for details please see :-

#114

Motivation and Context

Module Activity: Uptake of CRM by users is a change management issue. 80/20 80% Phsycology 20% Technology. This charts provides department, and / or change management with an easy way to identify who is using CRM and within which modules. Enabling management of uptaking, and providing a way to identify low activity users.

How To Test This

Load the dashlets into a dashboard view, you will need real or demo data. Configured the your periods, modules, stages and users. Then feel the magic :-)

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • [ X] New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Final checklist

  • My code follows the code style of this project found here.
  • My change requires a change to the documentation.
  • [X ] I have read the How to Contribute guidelines.

Rick.Timmis and others added 6 commits January 23, 2015 15:06
    1.) Module Actitivy:

    This provides the ability to select period, user and modules. It charts newly created records across modules, and groups by user for the period specified.
    This chart is really useful for identifying who is actively using the SuiteCRM system, and what modules they are using.

    FIXME: One problem I came up against was the loading of the language and label files, I could not get the lang.php field lable definitions to be interpreted.
    In the interest of getting something working I have hardcoded the labels into this report, and commented out the language configurable alternatives until such
    time as I can figure out why it is behaving this way. I am probably just missing something small.

    2.) Pipeline By Sales Agent:

    This is a return to a legacy chart from SugarCRM, but I believe that Sales Teams really need this chart. It presents Opportunities, by Sales Stage, by Agent
    It is really helpful to be able to see who is working on what opportunties, at what stage. It enables sales managers to qualify the activity of their sales
    team.

    FIXME: The langauge translation files for Russian, and Spanish are both incorrect for both Charts. Hopefully these transalations can be reviewed and corrected
    in due course.

    Module Activity report has a complicated SQL statement construction, so I have left Debug logging entries in that function.

    tail -f sugarcrm.log | grep 'Module Activity'

    Is your friend to see exactly what the query is and whom the search is being performed for.

    Here's hoping you find this useful, Best Wishes Rick..
    1.) Module Actitivy:

    This provides the ability to select period, user and modules. It charts newly created records across modules, and groups by user for the period specified.
    This chart is really useful for identifying who is actively using the SuiteCRM system, and what modules they are using.

    FIXME: One problem I came up against was the loading of the language and label files, I could not get the lang.php field lable definitions to be interpreted.
    In the interest of getting something working I have hardcoded the labels into this report, and commented out the language configurable alternatives until such
    time as I can figure out why it is behaving this way. I am probably just missing something small.

    2.) Pipeline By Sales Agent:

    This is a return to a legacy chart from SugarCRM, but I believe that Sales Teams really need this chart. It presents Opportunities, by Sales Stage, by Agent
    It is really helpful to be able to see who is working on what opportunties, at what stage. It enables sales managers to qualify the activity of their sales
    team.

    FIXME: The langauge translation files for Russian, and Spanish are both incorrect for both Charts. Hopefully these transalations can be reviewed and corrected
    in due course.

    Module Activity report has a complicated SQL statement construction, so I have left Debug logging entries in that function.

    tail -f sugarcrm.log | grep 'Module Activity'

    Is your friend to see exactly what the query is and whom the search is being performed for.

    Here's hoping you find this useful, Best Wishes Rick..
Merge branch 'master' of github.com:ricktimmis/SuiteCRM
…ted the Modules selection with appropriate modules to report on, fixed missing label in Options Configuration panel.

Set the default start, and end dates to report for last 3 months.

Improvements to Outcome by Month Dashlet: Introduce Sales Stages so that chart can be configured to only show certain sales stages.

Fixes and improvements to Pipeline by Sales Stage by Sales Agent: Fixed it so that it works, and dashlet loads ( always useful ) Improved the Query construction by JOINING data set

Removed Spanish and Russian translation files as per Merge review advice.
… view to Push to ricktimmis/HotFix

Merge branch 'hotfix' of https://github.com/salesagility/SuiteCRM

This will then enable me to issue a New Pull request for the inclusion of these 2 Charts into SuiteCRM.
Copy link
Contributor

@daniel-samson daniel-samson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for contributing your work. Please amend your pull request to meet our coding guidelines.

@@ -0,0 +1,103 @@
{*
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please update license in the file. See https://suitecrm.com/wiki/index.php/Coding_Standards for details.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@@ -0,0 +1,65 @@
<?php
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please update license and move entry point check after the license.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@@ -0,0 +1,51 @@
<?php
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

again license and entrypoint

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@@ -0,0 +1,51 @@
<?php
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

license and entrypoint

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@@ -0,0 +1,301 @@
<?php
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

again license and entrypoint

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@@ -0,0 +1,51 @@
<?php
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

update license and move entrypoint code below

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

$dashletMeta['PipelineBySalesAgentDashlet'] = array('title' => 'LBL_TITLE',
'description' => 'LBL_TITLE',
'module' => 'Opportunities',
'icon' => 'icon_Charts_Horizontal_32.gif',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use a SVG when possible.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here I am re-using the standard Horizontal Bar graph icon, which exists in /themes//images
I am afraid I don't have an SVG for that, there is a .svg available in SuiteP, but it's not there in the Suite7 or SuiteR directories.
I am hoping that perhaps the Theme developers have worked around that, by falling back to .gif or .png so am changing the code to look for the .svg with the thinking that it will be there anyway should you release this enhancement.

Done

@@ -0,0 +1,229 @@
<?php
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

update license and move entrypoint code below the license

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

{
global $timedate;

if(empty($options['pbss_date_start']))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use curly braces ( { ... } ) for if statements.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

}

$result = $db->query($query);
while($row = $db->fetchByAssoc($result, false))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use curly braces for looping statements ( { .. } ).

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Copy link
Contributor

@daniel-samson daniel-samson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well Done!

The code looks much better. We just need to test these changes. @Dillon-Brown Can you please test these changes?

If anyone in the community could also test them in their environments that would also be helpful.

@Dillon-Brown
Copy link
Contributor

Dillon-Brown commented May 15, 2017

Hi @ricktimmis I've encountered some issues with the module activity chart. It seems that certain modules are causing the dashlet to return no data when they are selected with modules that return data when selected on their own. For example: Schedulers, Saved search, and Calendar will cause the dashlet to show no data when selected with contacts.

Would it possible to restrict these modules from appearing as an option for the user to select?

@Dillon-Brown Dillon-Brown added the Status:Requires Updates Issues & PRs which requires input or update from the author label May 15, 2017
@daniel-samson
Copy link
Contributor

@ricktimmis Any update on the possibility of restricting the modules?

@horus68
Copy link
Contributor

horus68 commented Feb 12, 2018

@daniel-samson @ricktimmis Should I consider this a feature that will not be implemented?

@Dillon-Brown
Copy link
Contributor

Closed due to inactivity.

@horus68 horus68 mentioned this pull request Feb 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status:Requires Updates Issues & PRs which requires input or update from the author
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants