#1724 Improve Issue Roadmap page
Merged by pingou. Opened by mreynolds.
mreynolds/pagure roadmap-filtering  into  master

Download 1724.patch

The roapmap page appears to have been started, but not finished. Certain features did not work, like sorting on tags (tags were previosuly being treated as milestones).

This fix now makes it possible to isolate individual milestones, status, and tags. All three can be combined to create a new report. Each criteria is clicked to select and deselect.

The layout of the page has also been improved to be more consistent, and uniform

https://pagure.io/pagure/issue/1711

We can't do this since close_status are set per project and thus vary from one project to another.

I'm wondering if we do not have some duplications of variables here between requested_stones, milestones and all_milestones. Maybe we only need two of the three and can come up with the third one where needed?

A few comments on the code (without testing it), but it would be nice if we could also get the unit-tests for this :)

I was just trying to accomplish what the original code was incorrectly trying to do :) I will remove this altogether

Not sure, they all have a separate purpose. They are needed to do all the special filtering that you can now do. Basically we need:

  • All the existing milestones (to setup the milestone buttons for filtering)
  • All the requested milestones (custom filtering)
  • All the milestones that actually have issues (displaying milestones)

I don't think this can be "reduced" to fewer variables - not without adding a lot more complexity.

Most likely a left over from before we re-work the close_status :)

But here we have one variable milestones that is either equivalent to requested_stones or to all_milestones, so can't be do without milestones?

It's not that simple, but no problem, I'll add more complex code to remove that single variable.

It's a question he, the answer could be "no" and we're done :)

It's just that it got wondering when reading this diff.

@pingou do you know what this "Due" part is? I left it in from the old code, but I'm not sure what it's really used for. Is this something that can also be removed?

Milestone can have a due date, say, we need to have the milestone FOSDEM done by Jan 31 2017.

Multiple tables with this id will be created. Append an index to make them unique maybe?

I've applied everyone's comments, just working on the unit tests now....

1 new commit added

  • Applied recommendations

If the milestone is two words or more, then the id attribute will have a space. Try {{ milestone|replace(' ', '_') }} or something to that effect? Or simply use an index in the loop.

index as in id="pagure-issues-list-{{ index }}" jinja nicely provides it to us :)

1 new commit added

  • Fix table id

1 new commit added

  • Add table milestone class for table indentation

1 new commit added

  • Remove "reset" links from priority and assigned

rebased

I have a fairly big patch on this feature, shall I push it to your fork or attach it as a patch here?

I have a fairly big patch

The stats:

 pagure/templates/roadmap.html | 409 +++++++++++++++++++++++++++++++++++++++-----------------------------------------
 pagure/ui/issues.py           |  48 ++++------
 2 files changed, 218 insertions(+), 239 deletions(-)

I have a fairly big patch on this feature, shall I push it to your fork or attach it as a patch here

You should push it. Very interested to see what you added.

2 new commits added

  • Use loop.index to access the index
  • Rework the roadmap page based on Mark Reynold's work

Oupsy, this one shouldn't have changed

Odd, I did not make this change. Perhaps a rebase issue? I'll restore it

1 new commit added

  • We do not want the message if nothing changed

rebased

You moved all the status/ tags and milestones to a single line. This gets really sloppy as soon as you have many tags and milestones. Our main project will have 20 - 30 milestones, and at least 10 tags.

1 new commit added

  • Attempt to make all the flags on one line and remain as such

rebased

Alright, I am happy with this PR

Cool, let's merge :)

Pull-Request has been merged by pingou

Metadata