Skip to content

Commit 6dfb449

Browse files
authored
Merge pull request #25 from algolia/add_label
Add an action that will add a field to the specified issue
2 parents 9dbf4a7 + 07940fd commit 6dfb449

4 files changed

Lines changed: 38 additions & 1 deletion

File tree

CHANGES.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Change Log
22

3+
4+
## 0.12.0
5+
6+
- Add new ``jira.add_field_value`` action
7+
38
## 0.11.0
49

510
- Add new ``jira.transition_issue_by_name`` action

actions/add_field_value.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
from lib.base import BaseJiraAction
2+
3+
__all__ = [
4+
'AddFieldValue'
5+
]
6+
7+
8+
class AddFieldValue(BaseJiraAction):
9+
def run(self, issue_key, field, value):
10+
issue = self._client.issue(issue_key)
11+
issue.add_field_value(field, value)
12+
result = issue.fields.labels
13+
return result

actions/add_field_value.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
name: add_field_value
3+
runner_type: python-script
4+
description: Add a field to a particular JIRA issue.
5+
enabled: true
6+
entry_point: add_field_value.py
7+
parameters:
8+
issue_key:
9+
type: string
10+
description: Issue key (e.g. PROJECT-1000).
11+
required: true
12+
field:
13+
type: string
14+
description: the field name.
15+
required: true
16+
value:
17+
type: string
18+
description: the field text itself.
19+
required: true

pack.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ keywords:
66
- issues
77
- ticket management
88
- project management
9-
version: 0.11.0
9+
version: 0.12.0
1010
python_versions:
1111
- "2"
1212
- "3"

0 commit comments

Comments
 (0)