Jira Tempo用户是假名

发布于 2025-01-29 15:46:23 字数 248 浏览 3 评论 0原文

我正在尝试使用JIRA TEMPO REST API获取工作表。 我与之合作的服务器是本地公司。 数据提取很简单,有一个例外:一些用户从john.doe jirauser12345重命名。

我找不到任何规则,也找不到将jirauser12345映射到实际用户名的任何方法。 有什么方法可以获取真实的用户名吗?我是否可能缺少一些禁止我看到真实用户名的访问权限(可能是团队级别)?

I am trying to obtain the worklogs using the Jira Tempo REST API.
The server I am working with is an on-premises one.
The data extraction is straightforward with one exception: some users are renamed from john.doe to JIRAUSER12345.

I could not find any rule for this and I also couldn't find any way to map the JIRAUSER12345 to the actual username.
Is there any way of getting the real user name? Is it possible that I am missing some access rights (probably at team level) that forbid me seeing the real user names?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

小苏打饼 2025-02-05 15:46:23

阅读本文给出了匿名化的原因:
https://tempo-io.atlassian.net/wiki/wiki/spaces/kb/pages/1196327022/1196327022/why+dodo+see+jirauserxxxxxxxxxxxxx+ass+workslog+author

为了获得正确的用户ID i做了类似的事情:

usersCache = {}
def getUserbyKey(key):
    if not key in usersCache:
        query = {
            'key': key
        }
        response = requests.get(f"{JIRA_BASE_URL}/rest/api/latest/user",auth=authorization, headers=headers, params=query)
        j = response.json()
        usersCache[key]=j["displayName"]
    j = usersCache.get(key)
    return j

...

for wl in worklogs:
    user = getUserbyKey(wl["worker"])
    key = wl["issue"]["key"]
    timeSpent = wl["timeSpent"]

Reading this article gives the reason for the anonymization:
https://tempo-io.atlassian.net/wiki/spaces/KB/pages/1196327022/Why+do+I+see+JIRAUSERxxxx+as+worklog+author

In order to get the correct user id I did something like:

usersCache = {}
def getUserbyKey(key):
    if not key in usersCache:
        query = {
            'key': key
        }
        response = requests.get(f"{JIRA_BASE_URL}/rest/api/latest/user",auth=authorization, headers=headers, params=query)
        j = response.json()
        usersCache[key]=j["displayName"]
    j = usersCache.get(key)
    return j

...

for wl in worklogs:
    user = getUserbyKey(wl["worker"])
    key = wl["issue"]["key"]
    timeSpent = wl["timeSpent"]
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文