Add assigned user field in project

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • nocstaff@urbancom.net
    Member
    • Jul 2025
    • 61

    #1

    Add assigned user field in project

    I want to add assigned user field in projects and be able to setup a workflow to send an email to the assigned user. I was able to add the field via a json file but assigned user does not work in the email template or email workflow. Does anybody know how to get this to work?
  • nocstaff@urbancom.net
    Member
    • Jul 2025
    • 61

    #2
    Current Tasks:

    1: I added JSON code to /Custom/Resources/metadata/entityDefs/Project.json and /Custom/Resources/i18n/en_US/Project.json to enable assigned users for Projects. So far, assigning users is now possible, but currently the part I'm stuck on is trying to enable sending emails to assigned users. For some reason, the option "Related: Assigned Users" in the "To" dropdown when editing the Send Email action is missing, and nothing I do seems to solve the problem.

    What I tried doing:

    - I mentioned adding JSON code to two different files both called Project.json which do different things. The code I added was supposed to add an "assignedUser" option when selecting a recipient in the "send email" action

    - I also tried to make a new "relationships" directory in the metadata folder which should have defined a links between different entities, in this specific case, project and assigned users, but Espo seems to be ignoring this folder for some reason.

    * Assigned Users is now a usable field within Project's entity settings, but it still will not appear as an options when sending emails

    Comment

    • tovoro
      Junior Member
      • Jul 2025
      • 4

      #3
      Originally posted by nocstaff@urbancom.net
      Current Tasks:

      1: I added JSON code to /Custom/Resources/metadata/entityDefs/Project.json and /Custom/Resources/i18n/en_US/Project.json to enable assigned users for Projects. So far, assigning users is now possible, but currently the part I'm stuck on is trying to enable sending emails to assigned users. For some reason, the option "Related: Assigned Users" in the "To" dropdown when editing the Send Email action is missing, and nothing I do seems to solve the problem.

      What I tried doing:

      - I mentioned adding JSON code to two different files both called Project.json which do different things. The code I added was supposed to add an "assignedUser" option when selecting a recipient in the "send email" action

      - I also tried to make a new "relationships" directory in the metadata folder which should have defined a links between different entities, in this specific case, project and assigned users, but Espo seems to be ignoring this folder for some reason.

      * Assigned Users is now a usable field within Project's entity settings, but it still will not appear as an options when sending emails

      Hi man, could you share the exact content of those files? I want to implement the same (enable assigned users for projects) and am a little stuck.
      Thanks a lot!

      Comment


      • nocstaff@urbancom.net
        nocstaff@urbancom.net commented
        Editing a comment
        It's been a while since we last looked at this so I'm not too certain if this will help or if it is missing details. Make a back up just in case.

        To fix this, I believe we ended up making a custom json file in /var/www/espocrm/data/espocrm/custom/Espo/Custom/Resources/metadata/relationships called projectAssignedUser.json and added the following code:

        HTML Code:
        {
          "type": "belongsTo",
          "key": "assignedUser",
          "name": "projectAssignedUser",
          "entity1": "Project",
          "entity2": "User",
          "foreignKey": "assignedUserId"
        }
        and in /var/www/espocrm/data/espocrm/custom/Espo/Custom/Resources/metadata/clientDefs/Project.json:

        HTML Code:
        {
            "fields": {
                "assignedUser": {
                    "type": "link",
                    "entity": "User",
                    "relationType": "belongsTo",
                    "audited": true,
                    "required": true
                },
                "assignedUserId": {
                    "disabled": true
                },
        ...
            },
            "links": {
                "assignedUser": {
                    "type": "belongsTo",
                    "entity": "User",
                    "foreignKey": "assignedUserId",
                    "layoutDetail": true,
                    "layoutEdit": true
                },
        
        }
    • yuri
      EspoCRM product developer
      • Mar 2014
      • 9361

      #4
      I don't recommend to add Assigned Users to Project manually. It's not officially supported, there will be multiple problems with it. We won't be able to provide support for such customizations.

      It's possible to enable collaborators per project.

      The Project entity type differs from regular entity types in Espo. We have very different granular access control per Project which we don't have for regular entities. The multiple assigned users field won't work here. There are also other features that will fail to work.
      Last edited by yuri; 09-10-2025, 04:24 PM.
      If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

      Comment

      Working...