-
-
Notifications
You must be signed in to change notification settings - Fork 877
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add support for ranking after #1160
Conversation
5148472
to
6267e52
Compare
Would ranking work in the test if I create an epic first? Unfortunately can't seem to test locally, the tests always say "Connection aborted" even though it was working five minutes ago. |
c5522ba
to
6267e52
Compare
OK, was finally able to test on a different computer. Adding the issues to an epic doesn't help, so I guess there is just no ranking in the test instance? |
Any chance you are using Jira Cloud actually? But nothing for Jira Server https://docs.atlassian.com/software/jira/docs/api/REST/7.6.1/) which we currently se for the test instance (there is some work to start testing on Jira Cloud, but it is still in progress, e.g. #1107 ) |
Yes I personally use Jira Cloud where ranking does work! So that's where I developed this, I haven't tested the very latest version that I pushed here but I can just do some more hand-testing if that is the best way forward. |
Gotcha, we do have a Jira Cloud instance we can test on, so I'll try and test on that for you. For now what you've done with the |
Ping did you ever get a chance to test this? |
Sorry I haven't got the chance yet, might get an opportunity this upcoming weekend. Thanks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @durka !
I've been able to test this now, and actually have found it to work on both Jira Server and Cloud, although there are a handful of problems I had to navigate.
Here is the endpoint for Jira Server, confirming it does exist:
https://docs.atlassian.com/jira-software/REST/7.3.1/#agile/1.0/issue-rankIssues
I can see that the rank()
function does tries to account for different endpoint parameters in rank%sIssue
vs rank%sKey
(legacy Greenhopper API), but it looks like the Server endpoint parameters are now the same as the Cloud ones, so this difference is no longer necessary. We can also see from both the docs for these endpoints that they use the agile
rather than legacy greenhopper
url.
I've made a PR for updating the default api endpoint here: #1186 .
If you can rebase this branch to the branch used in #1186 I'm pretty confident the tests will pass without needing @broken_test
Side note: do you have trouble running the test server instance? For me, it fails almost every time. It only works if I add I will try to open an issue about this, although the bug template is cumbersome with a lot of questions I can't answer.
These URLs it's complaining about open fine in a browser so I don't know why docker is failing. |
e54c5eb
to
26fb003
Compare
5d5e5c4
to
3676d51
Compare
OK, looks good now, works on both server and cloud for me. Now waiting for your other MR to be merged. |
I personally haven't encountered any issues, although I'm no docker expert myself.
Gotcha, I think there is an option hidden for opening a blank issue, so maybe give that a try:
Only thing I can think of is perhaps trying a specific version: jira/.github/workflows/jira_server_ci.yml Line 26 in fa5dea1
So maybe something like this could work?
|
This is apparently a very well kept secret, but it seems on Linux docker containers cannot access the internet at all by default: https://superuser.com/a/1582710/1271061 |
hahah, classic Thanks for your contribution, this is now merged ! |
Thanks :) I will be waiting for the next release so I can update the dependency in my project. |
* also update `.rank()` to handle "agile" endpoint correctly
Adds a parameter to
JIRA.rank
to support ranking an issue after another one, as well as before.The reason this is necessary is if you have a list of issues, to move one to the end, the "rank before" operation is not sufficient as there is no next issue.
Since the function is kind of long, to avoid duplication I went with adding a parameter. The current usage is unaffected:
Although it might be clearer like this:
To contrast with the new syntax:
Note that passing neither or both optional parameters will throw an exception.
I added a test, but unfortunately ranking does not seem to work in the docker instance so I marked it broken. Did I miss something?