Releases: princenyeche/jiraone
v0.4.0
v0.3.9
v0.3.8
#43
- Patch to
USER.search_user
unable to find some users- Apparently increasing the maxResult from 50 to 100 caused this unknown behaviour. Reverted back to 50.
- Patch to
field.search_field
unable to find some custom fields.- Apparently increasing the maxResult from 50 to 100 caused this unknown behaviour. Reverted back to 50.
v0.3.7
v0.3.7 #42
- Added exceptions class
exceptions.py
- Created a new module for fields
- A new function
field_update
from the module file to handle most field updates. - v0.3.6 is equivalent to v0.3.7
from jiraone import field, echo, module
#...previous login statements
# first parameter is the field class alias, 2nd param is an issue key, 3rd a Jira field and
# 4th the data value you want to update or change
key = 'T6-73'
field_name = 'A Cascading field'
vals = ['Browser', 'Firefox'] # Cascading field type
echo(module.field_update(field, key, field_name, data=vals))
v0.3.5
#41 Minor update
- Added a new method to get field value in a issue.
from jiraone import field, echo
#...previous login statements
# it expects the field name as the first parameter and the issue key where the field is used as the second parameter
value = field.get_field_value("Labels", "COM-15")
echo(value)
v0.3.4
#38 Minor update
-
Added two more attributes to the comment(key).comment() method
-
first_comment
-> returns the first comment in the body content. Can only be called when "body" option is called on the type_field else returns "None". -
last_comment
-> returns the last comment in the body content. Can only be called when "body" option is called on the type_field else returns "None".
Example usage:
from jiraone import LOGIN, comment
user = "email"
password = "token"
link = "https://yourinstance.atlassian.net"
LOGIN(user=user, password=password, url=link)
keys = "COM-42"
LOGIN.api = False # this changes the api from 3 to latest.
s = comment(keys).comment("body").first_comment
print(s)
v0.3.3
#37 Micro updates
-
Added new methods to the
USER
class and updated thecomment
variable. Now you can be able to post a comment and get a proper comment. TheGET
method has various properties, see the documentation for more details. -
Get a mention of a cloud user.
from jiraone import LOGIN, USER
user = "email"
password = "token"
link = "https://yourinstance.atlassian.net"
LOGIN(user=user, password=password, url=link)
if __name__ == '__main__':
# the output of the file would be absolute to the directory where this python file is being executed from
# displayName of a user, to output multiple users separate by a comma
# name = "Prince Nyeche,Prince,John Doe"
name = "Prince Nyeche"
USER.mention_user(name)
- POST a comment to a Jira issue and mention users sequentially on a comment.
from jiraone import LOGIN, USER, comment
user = "email"
password = "token"
link = "https://yourinstance.atlassian.net"
LOGIN(user=user, password=password, url=link)
key = "COM-42"
name = "Prince Nyeche,Prince"
text = """
<user> please can you help to check the docker environment? Ping <user> to help out.
"""
comment(key, method="post", text_block=text, placer="<user>", mention=USER.mention_user(name), event=True)
The name of users separated by comma, will be changed dynamically within the method. Using the event=True
argument enables the comment endpoint to switch to post. See more from the endpoint
methods. As you can see, for any place in the text string where I used
< user > that will be replaced to a mentioned format for cloud e.g. [~accountId:5584xxxxxx]