sephii / taxi

Taxi is a CLI to time tracking backends
https://taxi-timesheets.readthedocs.io/
Do What The F*ck You Want To Public License
41 stars 15 forks source link

Roles are not sorted #118

Closed OdyX closed 5 years ago

OdyX commented 5 years ago

It would be easier if roles were somehow sorted; clustered by circle (sorted by depth, then alphabetically), then special roles (Lead Link, Rep Link, Secretary, Facilitator) first, then alphabetically.

I'd also revert the Circles-to-Roles hierarchy order.

I have the following prompt currently:

[0] Facilitator ❮ Office care ❮ Liip Lausanne ❮ GCC
[1] Telecommunication ❮ Office care ❮ Liip Lausanne ❮ GCC
[2] Systems Administrator ❮ Internal IT ❮ GCC
[3] Developer ❮ Atlas ❮ Liip Lausanne ❮ GCC
[4] Systems administrator ❮ Atlas ❮ Liip Lausanne ❮ GCC
[5] FLOSS core infrastructure contributor ❮ Internal IT ❮ GCC
[6] Dev ❮ Rawbot ❮ Liip Lausanne ❮ GCC
[7] Sysadmin ❮ Zebra ❮ GCC
[8] Rep Link ❮ Liip Lausanne ❮ GCC
[9] Domain / DNS handler ❮ Internal IT ❮ GCC
[10] Lead Link ❮ Internal IT ❮ GCC
[11] Facilitator ❮ General Company Circle (GCC) ❮ Board
[12] Facilitator ❮ Atlas ❮ Liip Lausanne ❮ GCC
[13] Holacracy helper ❮ Liip Lausanne ❮ GCC
[14] Security Advocate ❮ Internal IT ❮ GCC

What about displaying these same roles as:

[0] Board ⟩ General Company Circle (GCC) ⟩ Facilitator
[1] GCC ⟩ Internal IT ⟩ Lead Link
[2] GCC ⟩ Internal IT ⟩ Domain / DNS handler 
[3] GCC ⟩ Internal IT ⟩ FLOSS core infrastructure contributor
[4] GCC ⟩ Internal IT ⟩ Systems Administrator
[5] GCC ⟩ Internal IT ⟩ Security Advocate
[6] GCC ⟩ Liip Lausanne ⟩ Rep Link
[7] GCC ⟩ Liip Lausanne ⟩ Holacracy helper
[8] GCC ⟩ Liip Lausanne ⟩ Atlas ⟩ Facilitator
[9] GCC ⟩ Liip Lausanne ⟩ Atlas ⟩ Developer
[10] GCC ⟩ Liip Lausanne ⟩ Atlas ⟩ Systems administrator
[11] GCC ⟩ Liip Lausanne ⟩ Rawbot ⟩ Dev
[12] GCC ⟩ Liip Lausanne ⟩ Office Care ⟩ Facilitator
[13] GCC ⟩ Liip Lausanne ⟩ Office care ⟩ Telecommunication
[14] GCC ⟩ Zebra ⟩ Sysadmin
sephii commented 5 years ago

That's more about taxi-zebra than taxi but anyway.

I like your proposal, but this would need a change on the Zebra API side: currently the roles are returned as strings, and while I could probably split on the it would be cleaner for the API to return the roles hierarchy as tuples.

@jeanmonod what do you think about adding this format in the API?

jeanmonod commented 5 years ago

@sephii Why not. But this is also going to impact all dropdown on Zebra. So I would to have Tom view on this one. I created a ZBR ticket for that https://jira.liip.ch/browse/ZBR-2668

sephii commented 5 years ago

@jeanmonod if we make the API return each role as a tuple (eg. ('GCC', 'Internal IT', 'Rep Link')), the representation would then be done by the API consumer (eg. taxi) so that would be independent from Zebra.

vonlanthen commented 5 years ago

I am totally for the role grouping, but I think reverting the representation doesn't really bring value. Why not first just only group roles to start with? :)

sephii commented 5 years ago

Fixed in taxi-zebra 1.4.6.