Sort Cases while Filter is active and change position in team using a workflow

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Scarecrow
    Junior Member
    • Sep 2019
    • 19

    #1

    Sort Cases while Filter is active and change position in team using a workflow

    Hey there,

    when I search for a case using some information in the searchbar and want the list to be sorted by date or by casenumber and click on the rows title, the entrys change position but not in any order i wanted it to.
    If im using only the additional filter or no filter at all sorting the entrys works fine.

    The second thing that occurs is that a workflow I've created doesn't change my position in the team. When I change the actions field to change another value of the entity everything works fine but in this case literaly nothing changes.


    Hope you can fix this or tell me what im doing wrong.

    Best wishes
  • yuri
    Member
    • Mar 2014
    • 9117

    #2
    Hi,

    Do you have full-text search enable for Case entity type?
    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

    • yuri
      Member
      • Mar 2014
      • 9117

      #3
      It puts most relevant results at the top with full-text search enabled. It how it works.
      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

      • Scarecrow
        Junior Member
        • Sep 2019
        • 19

        #4
        Okay, thank you. I guess there is no way to deactivate this while keeping full-text search enabled?

        Comment

        • yuri
          Member
          • Mar 2014
          • 9117

          #5
          You can extend Case select manager class in custom dir and set

          PHP Code:
          protected $fullTextOrderType self::FT_ORDER_ORIGINAL
          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

          • Scarecrow
            Junior Member
            • Sep 2019
            • 19

            #6
            Thank you for solving that problem.

            I still need help with changing Position in team using a workflow. If there is anything wrong with the action use for the workflow or is it a bug?
            There is a screenshot attached to my first post showing the action part of my Workflow.

            Comment

            • yuri
              Member
              • Mar 2014
              • 9117

              #7
              That field is supposed to be read-only and to not to be available in workflow. You can utilize formula function record\updateRelationColumn https://github.com/espocrm/documenta...relationcolumn.

              Please create separate topics for different issues next time.
              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

              • Scarecrow
                Junior Member
                • Sep 2019
                • 19

                #8
                Hey there,
                Thank you for your help.
                I will do better next time

                I tried this line as an action "record\updateRelationColumn('date', $assigned_user_id, 'team_user', $user_id, 'role', 'Vacation')" either in update connected entity and update entity.
                ("date" is the name of the table/entity with the collumn "assigned_user_id". Same is true for "team_user" and "user_id"


                It still doesn't work like this. I also tried to assign the variables using:
                $assigned_user_id = entity\attribute('assigned_user_id')
                $user_id = entity\attribute('user_id')

                Where is my mistake.



                Comment

                • yuri
                  Member
                  • Mar 2014
                  • 9117

                  #9
                  record\updateRelationColumn('User', entity\attribute('assignedUserId'), 'teams', $teamId, 'role', 'Vacation');

                  Underscore naming is never used in EspoCRM. You need to use camelCase.
                  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...