Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider improving the sorting of ACL keys level 3 in dropdown #4062

Open
stefanhaerter opened this issue Jan 14, 2025 · 0 comments
Open

Consider improving the sorting of ACL keys level 3 in dropdown #4062

stefanhaerter opened this issue Jan 14, 2025 · 0 comments
Assignees
Milestone

Comments

@stefanhaerter
Copy link
Contributor

Currently, the sorting of ACL keys level 3 is not strictly alphabetical by key, but depends on in which system configuration setting a key is located. Code:

# get list of all possible actions
my @PossibleActionsList;
my $ACLKeysLevel3Actions = $ConfigObject->Get('ACLKeysLevel3::Actions') || [];
for my $Key ( sort keys %{$ACLKeysLevel3Actions} ) {
push @PossibleActionsList, @{ $ACLKeysLevel3Actions->{$Key} };
}

Given a system configuration like this:

$ACLKeysLevel3Actions = {
                          "100-AgentTicketQuickClose" => ["AgentTicketQuickClose"],
                          "100-Default" => [
                            "AgentAppointmentCalendarOverview",
                            "AgentTicketArticleDelete",
                            # [...]
                            "CustomerTicketZoom",
                            "CustomerTicketZoomReply",
                          ],
                          "200-AgentTicketArticleChange" => ["AgentTicketArticleChange"],
                        }

results in a dropdown order like this:

@PossibleActionsList = [
                         "AgentTicketQuickClose",
                         "AgentAppointmentCalendarOverview",
                         "AgentTicketArticleDelete",
                         # [...]
                         "CustomerTicketZoom",
                         "CustomerTicketZoomReply",
                         "AgentTicketArticleChange",
                       ]

Note that AgentTicketQuickClose is located at the beginning and AgentTicketArticleChange is located at the end, just as the sorting within the config hash was. I think it would be nice to have all Actions sorted alphabetically.

@stefanhaerter stefanhaerter added the style Beautify please label Jan 14, 2025
@stefanhaerter stefanhaerter added this to the OTOBO 11.1 milestone Jan 14, 2025
@stefanhaerter stefanhaerter self-assigned this Jan 14, 2025
@svenoe svenoe removed the style Beautify please label Jan 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants