Changed /lib/init.py to accept order in which the PR's are to be sorted from requests.html, so that if either Opened/Modified is clicked, the PR's are sorted accordingly with an arrow symbol beside them describing the way they were sorted.
It fixes https://pagure.io/pagure/issue/1404
There is a .swo file that we should remove :)
.swo
While interesting this change isn't related to this commit and isn't used later on, so let's remove it for now, or make it another commit and finish it :)
This looks like a good start, but should add some tests to it though :)
1 new commit added
why is the docstring changed?
@farhaan, there are two functions with very similar names: request_pull & request_pulls.
They both had the same docstring though the functionality of request_pulls is to list all the PR's, whereas the functionality of request_pull is to create PR related to changes from the fork, so I changed it.
Did I do something wrong?
Ohh! That is fine then :smile:
What is the progress with test cases?
ping?
Working on it :)
@pingou i found a bug which is when we open PR's page, Modified date present is actually not last_updated date, so changed it in order to show correct modified date.
Also added test cases, pls tell me if there's anything wrong (or) i should improve anything :)
No you actually want the updated_on as otherwise any change made to the entry in the database will affect this field, including resetting the merged status. So if I merge a PR, all the other PRs will have the last_updated field changed and this ends up being more confusing than helpful.
@pingou Yeah..you're right, i tried this on my machine and other PR's last_updated field changed when i merged a PR.
There are some mistakes with the test cases also, will get back on this.
We'll want to squash all the commits into one (or max two) and rebase on the top of master, but from a quick look it looks good :)
rebased onto 430d59e4b0e3fb2fa0a64c5581e1e86249dfe530
rebased onto 45514142dd469f4c7fe655738640a6ebefacb30d
2 new commits added
@pingou , i added tests for sorting functionality and also rebased, let me know if i need to add anything more. :)
Could you rebase, I'd like to give it a final test :)
rebased onto 832ab804b391f9c46c7f7eda8ffe8259483acb02
@pingou Done :) Are there any more changes i should make?
I am going to fix a small wording in the first commit and merge this PR manually (if it passes the tests which are currently running locally).
Thanks for working on this and sorry it took so long to get it in :(
Looking in the details of the two commits (and not the combined diff), I will squash both commits into one as the second commit undo a mistake from the first and as a little code style change so there is no real point to have both.
@pingou , Reason i made two different commits was, one has the functionality and other the tests, i thought it would be better to separate both of them. If you think its ok, to squash them, feel free to do.
If you find any problems, please let me know :)
Commit 9ab5d00c fixes this pull-request
Pull-Request has been merged by pingou
Reason i made two different commits was, one has the functionality and other the tests
Somewhere the split got lost, see: https://pagure.io/fork/ymdatta/pagure/c/596624b715ab2ea24d25112c80a48b7affa77918
Changed /lib/init.py to accept order in which the PR's are to
be sorted from requests.html, so that if either Opened/Modified
is clicked, the PR's are sorted accordingly with an arrow symbol
beside them describing the way they were sorted.
It fixes https://pagure.io/pagure/issue/1404