Skip to content

Releases: princenyeche/jiraone

v0.4.0

29 Aug 16:46
5553867
Compare
Choose a tag to compare

#49 Minor update

  • Fixed problem associated with None value reported on #47
  • Fixed some minor issues with field_update from jira.module
  • Added access to user and password attribute with LOGIN variable. Now you can do
    • LOGIN.user and LOGIN.password to get a call to those attributes.

v0.3.9

01 Aug 09:38
3a18c13
Compare
Choose a tag to compare

#45

  • Patch and removal of print statement in field.cascading.

v0.3.8

01 Aug 08:43
7d72255
Compare
Choose a tag to compare

#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

31 Jul 22:31
e47fe03
Compare
Choose a tag to compare

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

12 Jul 15:58
2467987
Compare
Choose a tag to compare

#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

16 May 10:23
4902f9d
Compare
Choose a tag to compare

#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

23 Apr 18:20
d825609
Compare
Choose a tag to compare

#37 Micro updates

  • Added new methods to the USER class and updated the comment variable. Now you can be able to post a comment and get a proper comment. The GET 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]

v0.3.1

10 Apr 13:09
b4b000d
Compare
Choose a tag to compare

#36 Fix bug

  • USER.search_user() method fails with TypeError: Expected 4 arguments, got 3 when running a multiuser search via a loop. Somehow the script appends a 3 column header to the csv file. The fix to this problem was to add a kwargs arg to the reader which will skip the header.

v0.3.0

29 Mar 15:32
e6616d6
Compare
Choose a tag to compare

#34 Micro updates

  • Corrected USER.search_user() method if the search file doesn't exist. Rather than throw FileNotFoundError, create an empty file.

v0.2.9

29 Mar 07:14
5f51118
Compare
Choose a tag to compare

#33 Micro update

  • Corrected the return statement for USER.search_user() method so it can return multiple users of the same name if exist.