Project workspace - Green dot configure

eyal abu hamad
Mega Sage

Hey, where can I configure the green dot of the project in project workspace

eyalabuhamad_0-1740302061821.png

and dose this work ?

4 REPLIES 4

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @eyal abu hamad 

 

I'm not 100% sure, but I think this represents the project status, and the color changes based on open/closed project tasks and other activities. What do you want to modify?

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

I want to know how it works OOTB and how to configure it if necessary 

https://www.servicenow.com/community/spm-forum/project-status-color-is-auto-calculated/m-p/990539

 

https://www.servicenow.com/docs/bundle/yokohama-it-business-management/page/product/project-manageme...

 

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

Murtaza Saify
Tera Contributor

1. Understanding the Green Dot

  • The green dot appears next to the active project in the Project Workspace.

  • Only one project can be active at a time for a user.

  • The active project is stored in the user's session.


2. Setting the Active Project

The green dot is automatically set when a user selects a project. Here’s how it works:

Manual Selection:

  1. Navigate to Project Workspace.

  2. Click on a project from the list.

  3. The selected project becomes the active project, and the green dot appears next to it.

Automatic Selection:

  • If a user navigates to a project-specific task or record, the system automatically sets that project as the active project.


3. Configuring the Green Dot

The green dot is controlled by the Project Workspace widget and the underlying logic in the Project Management application. Here’s how to customize it:

a. Modify the Project Workspace Widget:

  1. Navigate to Service Portal > Widgets.

  2. Search for the Project Workspace widget (e.g., project_workspace).

  3. Open the widget and edit its Client Script or HTML Template to customize the green dot behavior or appearance.

    Example: Change the green dot to a different color or icon:

    html
    Copy
    <span ng-if="project.isActive" style="color: blue;"></span>
     
    Run HTML

b. Customize the Active Project Logic:

  1. Navigate to System Definition > Script Includes.

  2. Search for scripts related to Project Management (e.g., ProjectWorkspaceClientScript).

  3. Modify the logic that sets the active project.

    Example: Override the default behavior to set a different project as active:

    javascript
    Copy
    function setActiveProject(projectId) {
      g_user.setPreference('active_project', projectId);
    }

4. Troubleshooting the Green Dot

If the green dot is not appearing or behaving as expected:

  • Check User Preferences: The active project is stored in the user’s preferences. Navigate to System Security > Users > [User Record] > Preferences and look for the active_project preference.

  • Check Widget Configuration: Ensure the Project Workspace widget is correctly configured and not overridden by a custom widget.

  • Check Scripts: Verify that no custom scripts are interfering with the active project logic.


5. Advanced Customization

If you need to programmatically set the active project:

  1. Use the GlideUser API to set the active project preference:

    javascript
    Copy
    g_user.setPreference('active_project', 'sys_id_of_project');
  2. Use a Business Rule or Client Script to automatically set the active project based on certain conditions (e.g., when a task is opened).