1
0
mirror of https://github.com/interviewstreet/go-jira.git synced 2025-03-17 20:47:57 +02:00

85 Commits

Author SHA1 Message Date
manuelbcd
f30f8c9f7c Typo fix in issue_test.go 2021-03-02 19:12:34 +00:00
Ahmad Salimi
5601d2bfe2
Feature: Implement delete issue link api (#341) 2021-02-06 16:09:14 +01:00
Klyahin Aleksey
4a5830d453 Fixed bool type for release version 2021-01-25 20:16:14 +03:00
Cynthia Baran
f50cb07b29
fix: removing the use of username field in searching for users (#297) 2020-05-22 09:38:17 +02:00
Andy Grunwald
f6b1dcafcf fix(tests): Fix TestIssueService_PostAttachment unit test 2020-05-03 17:49:10 +02:00
Andy Grunwald
eaaeec5f1c
chore(test): Remove unit testing log output for success cases (#293)
During running the unit tests we see output like

=== RUN   TestIssueService_DeleteAttachment
    TestIssueService_DeleteAttachment: issue_test.go:587: Attachment deleted
    TestIssueService_DeleteAttachment: issue_test.go:592: No error

This log can be removed, because this mostly confirms the success case.
The opposite case is throwing a testing error, which is visible as well.
Hence, there is no need to log this messages durcing testing
2020-05-03 15:45:24 +02:00
Andy Grunwald
8b64c7f005
fix(issue): IssueService.Search() with a not empty JQL triggers 400 bad request (#292)
The JQL search term is escaped twice.

closes issue #291
2020-05-03 10:05:39 +02:00
Kyle Bradford
4b91cf2b13
feat(IssueService): allow empty JQL (#268) 2020-05-02 23:14:19 +02:00
Andy Grunwald
43e8242f2c
style: Fix staticcheck (static analysis) errors for this library (#283)
* style: Fix staticcheck errors for "error strings should not be capitalized (ST1005)"

staticcheck is a static analysis tool for go.
It reports several "error strings should not be capitalized (ST1005)" messages.
Here, we fix it to be more compliant with the go coding styleguide.

Related: #280

* style: Fix staticcheck errors for "printf-style function with dynamic format ... (SA1006)"

staticcheck is a static analysis tool for go.
It reports several "printf-style function with dynamic format string and no further arguments should use print-style function instead (SA1006)" messages.
Here, we fix it to be more compliant with the go coding styleguide.

Related: #280

* style: Fix staticcheck errors for "type X is unused (U1000)"

staticcheck is a static analysis tool for go.
It reports several "type X is unused (U1000)" messages.
Here, we fix it to be more compliant with the go coding styleguide.

Related: #280

* style: Fix staticcheck errors for "should use X instead (S1003 & SA6005)"

staticcheck is a static analysis tool for go.
It reports several

- should use !bytes.Contains(b, []byte(`"password":"bar"`)) instead (S1003)
- should use strings.EqualFold instead (SA6005)

messages.
Here, we fix it to be more compliant with the go coding styleguide.

Related: #280

* style: Fix staticcheck errors for "unnecessary use of fmt.Sprintf (S1039)"

staticcheck is a static analysis tool for go.
It report several "unnecessary use of fmt.Sprintf (S1039)" messages.
Here, we fix it to be more compliant with the go coding styleguide.

Related: #280

* style: Fix staticcheck errors for "this value of X is never used (SA4006)"

staticcheck is a static analysis tool for go.
It report several "this value of X is never used (SA4006)" messages.
Here, we fix it to be more compliant with the go coding styleguide.

Related: #280

* style: Fix staticcheck errors for "redundant return statement (S1023)"

staticcheck is a static analysis tool for go.
It report several "redundant return statement (S1023)" messages.
Here, we fix it to be more compliant with the go coding styleguide.

Related: #280

* style: Fix staticcheck errors for "possible nil pointer dereference (SA5011)"

staticcheck is a static analysis tool for go.
It report several

    file.go:Line:character: possible nil pointer dereference (SA5011)
        file.go:Line:character: this check suggests that the pointer can be nil

messages.
Here, we fix it to be more compliant with the go coding styleguide.

Related: #280

* style: Fix staticcheck errors for "this value of X is never used (SA4006)"

staticcheck is a static analysis tool for go.
It report several "this value of X is never used (SA4006)" messages.
Here, we fix it to be more compliant with the go coding styleguide.

Related: #280
2020-05-02 23:08:01 +02:00
Andy Grunwald
72d53e4630 style: Adjust source code according gofmt -d -s
Adjusting source code according to the go coding guidelines
and simplify it a bit.
2020-04-29 10:27:02 -07:00
mehanizm
8c77107df3 fix: change millisecond time format
If millisecond in go time is empty
they will be not exist in result string
if using "999" in format. And jira api
will response with error in the case.

Using "000" fix the problem.

Add test for time marshaling.
2020-04-14 20:55:02 +02:00
mehanizm
f200e158b9 feat: add AddRemoteLink method
– add method AddRemoteLink to add remote links to issue

  - add test for the method

See docs: https://developer.atlassian.com/cloud/jira/platform/rest/v2/#api-rest-api-2-issue-issueIdOrKey-remotelink-post
2020-04-10 09:55:04 -07:00
Dick Appel
19d3fc0aec fix: paging with load balancer going to endless loop
When used with a load balanced Jira, the SearchPages method would end
up in an endless loop. This was caused by a bug where Jira would not
handle the MaxResults=50 that is sent by defaul properly, thus retur-
ning no issues. The SearchPages method didn't check for empty results
and ended up in an endless loop.

Fixed this by
1. Pre-escaping '&maxResults' to '&MaxResults'.
2. Adding a check in SearchPages to see if the issues array is empty
   before going into the endless 'for'.

Also fixed the appropriate tests.

Fixes issue #260.
2020-03-15 14:02:52 -07:00
clement
436469b62d fix(IssueService.GetWatchers): UserService.GetByAccountID support accountId params 2020-03-11 12:57:09 -07:00
Roman Volodin
1946cac0fe feat: Implement get remote links method 2019-12-14 08:27:17 -08:00
prugala
9ff562ae3e feat: add worklog update method
Allows updating work log entries

API reference url: https://docs.atlassian.com/software/jira/docs/api/REST/7.1.2/#api/2/issue-updateWorklog
2019-12-07 15:08:10 -08:00
Korenevskiy Denis
7530b7cd82 feat: provide access to issue transitions loaded from JIRA API
JIRA API is able to provide clients with list of transitions available
for issue in its current state (https://docs.atlassian.com/software/
jira/docs/api/REST/latest/#api/2/issue-getIssue)

Go-Jira client ignored the 'transitions' information in JIRA API JSON
response. Now it provides full access to transitions available for
current user in issue's current state
2019-12-04 07:07:43 -08:00
Mark Ramotowski
b3bf8c2d09 fix: empty SearchOptions causing malformed request
prevents empty SearchOptions from being interpolated into the JIRA REST
request when calling Search on the Issue Service
2019-05-22 19:28:25 -07:00
Edwin Kyalangalilwa
e93c0e1785 feat: added DeleteAttachment 2019-05-21 09:13:37 -07:00
falnyr
1ebd7e7f0d feat(issues): Added support for AddWorklog and GetWorklogs 2019-05-18 22:13:20 -07:00
David Url
b1589c4b06 Add 'affects versions' to issue fields 2019-04-28 20:10:26 +02:00
Jannis Andrija Schnitzer
8e94c551a3 Add test for creation and subsequent retrieval of issue 2018-10-15 11:24:37 +02:00
Thiago Oliveira
2990af0701 fix the DeleteComment unit test 2018-09-18 09:02:09 +02:00
Cory B. White
6e5d1122fb Adding DeleteComment method and stub for some unit tests 2018-09-18 09:02:09 +02:00
rbriski
47f48bdc59
Merge pull request #157 from oroshnivskyy/master
Add CreatedTime() (time.Time, error) func to ChangelogHistory
2018-09-12 12:30:26 -07:00
rbriski
5161c44da2
Merge pull request #159 from Tom-Xie/master
Change POST method to PUT method in UpdateComment
2018-09-12 12:26:07 -07:00
Oleh Roshnivskyi
17a49a2fd9 Fix TestIssueService_Get_Fields_Changelog test to use time.Equal 2018-09-03 22:55:40 +03:00
Oleh Roshnivskyi
1baa0576ef Merge branch 'master' of github.com:andygrunwald/go-jira 2018-09-03 22:51:52 +03:00
Nate Mara
bb1f9e1a50 Add UpdateAssignee method to allow users to change issue assignee 2018-08-26 19:44:17 +01:00
Machiel Molenaar
37eae9731c Updated create issue endpoint in accordance to the documentation 2018-08-13 19:04:30 +02:00
xiegongshang
9fd9a332be Change POST method to PUT method in UpdateComment 2018-08-10 11:08:51 +08:00
Oleh Roshnivskyi
e25bafc579 Add CreatedTime() (time.Time, error) func to ChangelogHistory 2018-07-24 17:58:12 +03:00
Frederick Ros
6b32ea13a0 Added support for the 'expand:renderfields' option
A couple of fields can be rendered server side, especially the ones
related to dates (that can become string like "2 hours ago"), and the
comments body that can be expanded from JIRA wiki markup into HTML.
A new type IssueRenderedFields has been introduced with a couple of
fields that can be expanded.
2018-06-03 23:42:41 +02:00
Ishu
e4572fccba Add support for ValidateQuery param in SearchAPI 2018-03-16 17:19:59 +05:30
Bob Briski
56d87db29c Cleaning a bunch of go vet issues 2018-02-28 22:46:54 -08:00
Rob Iball
8bb638807a Added method & tests for logging time against an issue 2018-02-17 12:09:23 +00:00
Jannis Andrija Schnitzer
1a2c703f7f Add unit test for Duedate type change
See #102.
2018-01-16 16:57:38 +01:00
Sytze Tempel
60a7c948cc Adds methods to add/remove/list watchers from/to an issue 2017-12-11 14:16:13 +01:00
Robert Bittle
6bfb81bc70
Add SearchPages 2017-11-01 12:19:23 -04:00
Robert Bittle
d1d02ac372
Add GetWorklogs 2017-10-31 12:55:08 -04:00
Morgan Patch
418d671092 Add UpdateComment method 2017-08-31 14:46:04 -07:00
zhaohaifeng [赵海锋]
e88af2595a add unittest for UpdateIssue 2017-08-16 17:56:08 +08:00
Hugo Torres
bb451f74be Fix bug in issue update
The issue was being found by ID, but there are cases where a user will
have the issue key but not the ID, whereas if the user has the ID then
it's highly likely they have the key, because they probably got the ID
from the API, which would also return the key.
2017-06-26 10:15:03 -04:00
Andy Grunwald
30841416a8 go fmt 2017-06-15 19:02:07 +02:00
Hugo Torres
c8cc00ff93 Add Issue Update method
JIRA only allows issues to be created with certain fields set. This
means if a user needs to create an issue through the API with the
description set, they need to create the issue first, and then call the
API again to update it.

Without this commit, the way to do this through the package is by
calling IssueService.Create and then use the client's NewRequest method
to create a raw HTTP request for the Update. This isn't bad, but it can
be better.
2017-06-09 15:51:29 -04:00
Kenji Yano
ccd16575a5 implemented low level do transition method. 2017-05-04 23:19:41 +09:00
Andy Grunwald
880a13c107 Fixed typos 2017-05-01 15:03:03 +02:00
Andy Grunwald
69e7535b62 go fmt and fixed some typos 2017-05-01 14:59:27 +02:00
Andreas Fuchs
dda28f9b9c Add a test case for the "option" field type 2017-04-27 09:41:25 -07:00
Andy Grunwald
e206cd4d4d Merge pull request #64 from gphakos/expand
Add Expand Query Parameter to Searches
2017-02-28 10:10:37 +01:00