Skip to content

[FR] Show triage owner's real name (without nick)? #323

@aminomancer

Description

@aminomancer

I'm thinking about how to show triage owner's name in https://www.bugzy.org/triage

Currently it shows just the owner's nick (which is from their real_name, prefixed by : like :aminomancer). I was thinking it might be better to show the real_name, but that also includes the nick. So these are the options and formats:

real_name

Shane Hughes [:aminomancer]
Shane Hughes (:aminomancer, :shughes)
Shane Hughes :aminomancer

nick

:aminomancer

just_name

Shane Hughes

I'd like to get some feedback from others before changing anything.

The issue with real_name is just that it's so long, especially since you can include multiple nicks. The trouble with nick is that it's more ambiguous, at least where our team is concerned (since we know each other by our legal names, not by our internet monikers). And just_name is not a real property, but it's something that could be extracted from the real_name like this:

diff --git a/src/content/components/Triage/Triage.js b/src/content/components/Triage/Triage.js
index 6e4ffb8..09d7dbd 100644
--- a/src/content/components/Triage/Triage.js
+++ b/src/content/components/Triage/Triage.js
@@ -169,8 +169,17 @@ export class Triage extends React.PureComponent {
     return (
       <span
         title="Triage ownership alternates every Monday at 12:30 UTC."
-        style={{ cursor: "help", "text-decoration": "underline .05em dotted" }}>
-        Owner: {nick || real_name || email} ({dateString})
+        style={{ cursor: "help", textDecoration: "underline .05em dotted" }}>
+        Owner:{" "}
+        {real_name.replace(
+          new RegExp(
+            `([^\\[\\(\\]\\)]*)(\\s[\\[\\(]?:${nick ?? ""}.*[\\]\\)]?)`
+          ),
+          "$1"
+        ) ||
+          nick ||
+          email}{" "}
+        ({dateString})
       </span>
     );
   }

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementSuggest an idea for this project

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions