Announcement

Collapse
No announcement yet.

Add a function to Task Bar?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Add a function to Task Bar?

    In the espoCRM, "Tasks" bar, where the status of a client is a drop down <select> tag; if I want to apply a function based on the <option> tag value, how and where would I implement my function? I want my function to test whether the option value == "whatever value". If the option value is equal to my value, perform an action by grabbing the date start/end.

  • #2
    Can someone help me as soon as possible, I really need to figure this out. I'm on the clock.

    Comment


    • #3
      'Perform an action' is pretty vague. The only easy thing to do is hide or display fields based on other field's values: https://github.com/espocrm/documenta...namic-forms.md

      You're going to have to read through the client source code and code up this yourself. Or pay EspoCRM devs to do it for you?

      Comment


      • worldmiros
        worldmiros commented
        Editing a comment
        In the task bar, edit, there is tag drop that provides options such as, Not Started, Started, Completed, Cancelled, Deferred, Billed.
        ex. User would start a task, enter date_start. Once user is finished with the task and enters the data for date_end, on our end, we would closed the task by the changing the drop down to "Completed". I would run a function to check the status for "Completed", and if so, get the difference of date_start and _date_end, as well as the summation of the difference, then execute an invoice of the bill. As to where to implement code, I'm not sure. That's where I need assistance.

        I see a function called filterCompleted(&result) in SelectManagers\Task.php that assigns the key:value, 'status'=> ['Completed']. Maybe I can use that to check the dropdown status if "Completed" is the value, then grab the value of date_start/end from a php or json file, or from the database the compute the difference and sum up the difference that generates an invoice of the time spent on task/matter. Can I use that, if so how and where?

      • worldmiros
        worldmiros commented
        Editing a comment
        Hey alasdaircr, I'm not too familiar creating relationship manually with two entities. I need to manually create relationship with QuoteItems, Account, and Task in my espoCRM, and I was advised by yurikuzn to do so for espoCRM to do what I want. Account entity has a field called hourlyRate, and I want that data from that field to automatically inserted under QuoteItem's listprice/unitprice. Task entity has a field called tot_hours, and I want that data to from that field to automatically inserted under QuoteItem's Qty. Any advice on how to do that?

    • #4
      In the task bar, edit, there is <select> tag drop that provides options such as, Not Started, Started, Completed, Cancelled, Deferred, Billed.
      ex. User would start a task, enter date_start. Once user is finished with the task and enters the data for date_end, on our end, we would closed the task by the changing the drop down to "Completed". I would run a function to check the status for "Completed", and if so, get the difference of date_start and _date_end, as well as the summation of the difference, then execute an invoice of the bill. As to where to implement code, I'm not sure. That's where I need assistance.

      Comment


      • #5
        I see a function called filterCompleted(&result) in SelectManagers\Task.php that assigns the key:value, 'status'=> ['Completed']. Maybe I can use that to check the dropdown status if "Completed" is the value, then grab the value of date_start/end from a php or json file, or from the database the compute the difference and sum up the difference that generates an invoice of the time spent on task/matter. Can I use that, if so how and where?

        Comment


        • #6
          worldmiros sorry I can't help you any further. There's lot's to be learned reading the existing source code or you can ask/pay for support from the Espo developers

          Comment


          • #7
            Select Managers intended to prepare parameters that are used to create SELECT queries. If you need to compute something in PHP Select Manager won't help. You can do it in Service

            Comment


            • worldmiros
              worldmiros commented
              Editing a comment
              yuri, there is multiple service folders and you weren't specific to which file to implement the code to run the difference of datetime. which folder/file path to implement the code?
          Working...
          X