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

jira: Use fields in comment to merge in additional data #4304

Merged
merged 5 commits into from
Mar 12, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions plugins/modules/web_infrastructure/jira.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,20 @@
type: role
value: Developers

- name: Comment on issue with property to mark it internal
community.general.jira:
uri: '{{ server }}'
username: '{{ user }}'
password: '{{ pass }}'
issue: '{{ issue.meta.key }}'
operation: comment
comment: A comment added by Ansible
fields:
properties:
- key: 'sd.public.comment'
value:
internal: true

# Assign an existing issue using edit
- name: Assign an issue using free-form fields
community.general.jira:
Expand Down Expand Up @@ -502,6 +516,10 @@ def operation_comment(self):
if self.vars.comment_visibility is not None:
data['visibility'] = self.vars.comment_visibility

# Use 'fields' to merge in any additional data
if self.vars.fields:
data.update(self.vars.fields)

url = self.vars.restbase + '/issue/' + self.vars.issue + '/comment'
self.vars.meta = self.post(url, data)

Expand Down