Skip to content

Commit

Permalink
Merge pull request #36 from ytjohn/updatefield
Browse files Browse the repository at this point in the history
Add update_field_value action
  • Loading branch information
blag authored Nov 20, 2019
2 parents 6af1a66 + 3085200 commit 8e076aa
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
13 changes: 13 additions & 0 deletions actions/update_field_value.py
Original file line number Diff line number Diff line change
@@ -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
24 changes: 24 additions & 0 deletions actions/update_field_value.yaml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 8e076aa

Please sign in to comment.