diff --git a/actions/update_field_value.py b/actions/update_field_value.py new file mode 100644 index 0000000..984b7b0 --- /dev/null +++ b/actions/update_field_value.py @@ -0,0 +1,13 @@ +from lib.base import BaseJiraAction + +__all__ = [ + 'UpdateFieldValue' +] + + +class UpdateFieldValue(BaseJiraAction): + def run(self, issue_key, field, value, notify): + issue = self._client.issue(issue_key) + issue.update(fields={field: value}, notify=notify) + result = issue.fields.labels + return result diff --git a/actions/update_field_value.yaml b/actions/update_field_value.yaml new file mode 100644 index 0000000..e71bf02 --- /dev/null +++ b/actions/update_field_value.yaml @@ -0,0 +1,24 @@ +--- +name: update_field_value +runner_type: python-script +description: Update a field in a particular JIRA issue. +enabled: true +entry_point: update_field_value.py +parameters: + issue_key: + type: string + description: Issue key (e.g. PROJECT-1000). + required: true + field: + type: string + description: the field name. + required: true + value: + type: string + description: the field text itself. + required: true + notify: + type: boolean + description: jira will send notifications (default is true) + default: true + required: false