rules repository

A-1140 Try to assign pages to a page group.

Severity Info Check + SQL-based Test Free New

Reason

Page groups structure the pages of an application, for example by functional area, and make the page list and the developer tools easier to navigate. Once an application uses page groups, every regular page should belong to one. Set the group under Page Properties › Page Group.

Pages that need no group (the global page, the login page, public pages) are not reported, and applications that use no page groups at all are skipped.

Examples

Non-Compliant Example

page 10 (
    // ...
    // no pageGroup
)
Issues
LineColumnMessage
11Page is not assigned to a page group.

Compliant Solution - ★★★★★

page 9999 (
    name: Login
    // ...
    security {
        authentication: public
    }
    // no pageGroup
)

Public pages (like the login page) and P0 are exceptions to this rule.

Compliant Solution - ★★★★★

page 10 (
    // ...
    pageGroup: @administration
)

Tests

Test SQL query

select aa.workspace || '.' || aa.alias || '.' || ap.page_id as identifier,
       'Page ' || ap.page_id || ' of app ' || aa.alias || ' in ' || aa.workspace
         || ' is not assigned to a page group.' as message
  from apex_application_pages ap
  join apex_applications aa
    on aa.application_id = ap.application_id
       and aa.workspace = ap.workspace
 where aa.workspace in (#ApexWorkspaces#)
   and ap.page_group is null
   and ap.page_id != 0
   and ap.page_requires_authentication = 'Yes'
   and exists (select 1
                 from apex_application_pages p2
                where p2.application_id = ap.application_id
                  and p2.page_group is not null)

Test results

IdentifierMessageMigration
WORKSPACE.CUSTOMERS.10Page 10 of app CUSTOMERS in WORKSPACE is not assigned to a page group.-

Parameters

Use parameters to customize the rule to your needs.

ParameterDescriptionDefault Value
ApexWorkspacesComma-separated List of APEX workspaces owning APEX applications to check.dblinter, dbl_gui

References