OroCommerce Forums

Covering OroCommerce topics, including community updates and company announcements.

Forums OroCommerce filtering on tasks / notification when assigning open task to someone else

This topic contains 6 replies, has 2 voices, and was last updated by  Tom Van Overbeke 3 months, 3 weeks ago.

  • Creator
    Topic
  • #37840

    Tom Van Overbeke
    Participant

    Hi,

    We’ve started to work extensively with the tasks module of orocommerce.
    we notice some functionality gaps (or maybe I don’t do it right ?)

    1) If I want to see all the open tasks that I have created (and assigned to someone else) ,how do I do that? Because the owner of a task appears to be the person that the task has been assigned to.

    I would have expected to be able to filter on a field ‘created by’ ?

    2) when an open task is assigned, an notification email is sent to the creator. But when the assignee chooses to assign that task to someone else, there does not appear to be a functionality to notify the creator ?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Author
    Replies
  • #37915
    Yevhen Shyshkin
    Yevhen Shyshkin
    Moderator

    Hello Tom Van Overbeke.

    1. Not really. If you check Task entity you’ll see that it has two fields – owner (this is Assigned To field) field and createdBy (this is a User who actually created this task). So, you may use these fields separately. Unfortunately, createdBy field is not rendered in grid, but you may changed that in customization.

    2. Probably, you have some customization that send such email. In general you may use notification rules or processes to organize such logic.

    #37919

    Tom Van Overbeke
    Participant

    Hi,

    As far as 1) is concerned, can this be done without (much) programming knowledge? Could you point me to a starting point in the documentation?

    Or can I log this as a feature request? I feel this would be of benefit to others too…

    Thanks,
    Tom

    #37920
    Yevhen Shyshkin
    Yevhen Shyshkin
    Moderator

    You have to create a bundle (see https://oroinc.com/b2b-ecommerce/doc/current/dev-guide/extend-and-customize/how-to-create-new-bundle) and add there file Resources/config/oro/datagrids.yml (see https://oroinc.com/b2b-ecommerce/doc/1.6/dev-guide/entities/datagrids) with the following content:

    This code adds a new column, a filter and a sorter to the main tasks grid. Here is how it should look like:

    Let me know if you still have some questions.

    #38083

    Tom Van Overbeke
    Participant

    Hi,

    Thanks for the explanation.
    I’m very new to this. I managed to get it to work, but it took me quite some time.
    So for the benefit of other newbies, I’ll add some more detail on how I got it going:

    I created a skeleton for the new bundle using this command:

    php bin/console generate:bundle –namespace=GroupLataire /Bundle/TaskAddCreatedByBundle –format=yml
    Then I copied the datagrids.yml file to the config/oro folder.

    Now I have this file structure in my src/ folder.

    Then I added this line to the config/config.yml file:

    Then I executed this command:

    And now I see the extra field in my tasks grid! Thanks!

    #38084

    Tom Van Overbeke
    Participant

    Hi,

    Now that I have tested it, I encountered a problem with the permissions.

    No one is able to see any tasks (“No records found”) unless I give that user the ‘administrator’ role.

    Can you see why changing the task datagrid would cause this?

    FYI, I gave the users these roles for the task entity (this worked perfectly before I added the bundle)

    Task:
    View: Global
    Create: Global
    Edit: User
    Remove: User
    Assign: Global

    #38173

    Tom Van Overbeke
    Participant

    Hi,
    After some testing with the roles, I found out what the problem was.
    I needed to add View:Global to the User entity. That solved my problem

Viewing 6 replies - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.

You will be redirected to [title]. Would you like to continue?

Yes No