Problem/Motivation

Rules is a fantastic solution to implement business rules.
In complex sites, there are many rules, so the organization of rules is crucial to manageability.
Developers can use Tags and Rules Names to keep the rules organized.
Rules sort the rules by id, and it is some times hard to find the rules you want if you don't know exactly it's name.
It would be easier if the rules UI presents the rules by name instead of by id

Proposed resolution

change the function ksort by usort in ui.controller.inc

User interface changes

Sort rules by Name instead of by internal ID

Comments

yseki’s picture

StatusFileSize
new760 bytes
yseki’s picture

Status: Active » Needs review
StatusFileSize
new760 bytes

Status: Needs review » Needs work

The last submitted patch, 2: rules-order-rules-by-label-2533840-1.patch, failed testing.

diego_mow’s picture

StatusFileSize
new497 bytes

Fixing the rules-order-rules-by-label-2533840-1.patch unit test issue FAILED: [[SimpleTest]]: [MySQL] Invalid patch format in rules-order-rules-by-label-2533840-1.patch.

diego_mow’s picture

Status: Needs work » Needs review
davic’s picture

Status: Needs review » Reviewed & tested by the community

Tested and working fine. This effort is part of a codesprint. RTBC

joelpittet’s picture

Version: 7.x-2.9 » 7.x-2.x-dev
Component: Rules Core » User Interface
kris77’s picture

Patch in #4 seems not works fine for me with RULES 7.x-2.9

After apply the patch my rules are order by Label, but if I click on the edit button, open the rule sorted by id instead of the selected one.

Thanks @Diego_Mow

diego_mow’s picture

Status: Reviewed & tested by the community » Needs work

According to comment number #8 I'm changing this issue to "Needs Work"

tr’s picture

Issue tags: -sort, -label, -title
hargobind’s picture

Status: Needs work » Closed (duplicate)

Marking this as a duplicate of #372328: Make rules overview sortable since it proposes to allow sorting across multiple criteria.