通过python suds在JIRA中创建问题时设置受让人字段 [英] Set assignee field when creating an issue in JIRA via Python suds

查看:90
本文介绍了通过python suds在JIRA中创建问题时设置受让人字段的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用JIRA 4.2版.使用Python 2.7和suds 0.4,如何创建受让人字段集的问题?在下面的代码中,受让人字段将被忽略.

Using JIRA version 4.2. With Python 2.7 and suds 0.4, how can I create an issue with assignee field set? The assignee field gets ignored in the code below.

new_issue = client.service.createIssue(auth, {
            'project': 'NAHLP',
            # issue_type = Incident Report.
            'type': '11',
            'assignee': 'assignee_username',
            'priority': '2',
            'summary': 'summary',
            'description': 'description',
            'customFieldValues': [
                # Reporter Location = NA.
                {'customfieldId':'customfield_10019', 'values':['10011']},
                ]
            })

我知道您可以与受让人一起更新问题(请参阅我的答案),但是我想在创建问题时进行分配.这可能吗?

I know that you can update the issue with an assignee (see my answer) but I want to assign the issue when creating it. Is this possible?

注意:我们所有的用户名都是用户的电子邮件地址,并包含"@"和.".符号.

Note: All our usernames are the users' email addresses and contain '@' and '.' symbols.

推荐答案

再次感谢戴夫(Dave)的回答.

Thanks to Dave, again, for this answer.

Soap API不会设置在工作流相关点在Jira UI屏幕上不可见的字段.调用createIssue方法时,创建问题"屏幕被视为相关屏幕,但是创建问题"屏幕上看不到受让人字段.

The soap API won't set fields that aren't visible on the Jira UI's screen at the relevant point of the workflow. The "create issue" screen is considered the relevant screen when you call the createIssue method, but the assignee field isn't visible on the 'create issue' screen.

您可以在没有受让人的情况下进行createissue调用,然后在其后进行updateissue调用以设置受让人.或者,我们可以在最初的创建问题"工作流程中添加受让人"字段.

You could either do your createissue call without the assignee, then follow it with an updateissue call to set assignee. Alternatively, we could add the assignee field in the initial create issue workflow.

这篇关于通过python suds在JIRA中创建问题时设置受让人字段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆