This is the block summarizing issues that's displayed on project pages. It's all still living in a monolithic hook_block(). Since we're about to add another block for #1696872: Create a block that shows the issue metadata I want to split up this hook_block() implementation and get this quickly working again on D7.

Level Of Effort

It is estimated to take 0.5 days to complete this task.

CommentFileSizeAuthor
#4 1712314-4.issue-cockpit-block.patch6.02 KBdww

Comments

dww’s picture

Assigned: dww » Unassigned
Status: Active » Needs work

I just pushed two commits for this:
http://drupalcode.org/project/project.git/commit/4c471ca
http://drupalcode.org/project/project_issue.git/commit/0c3e613

- ported project_get_project_from_menu() and got that working in D7
- hook_block() stuff is ported
- theme template plumbing is in place and working again

The block is basically functional again. However, template_preprocess_project_issue_issue_cockpit() is unported, and makes all kinds of D6-project* assumptions. So, the block payload doesn't include the interesting stuff we care about. But, this is now Ported Enough(tm) for the benefit of #1696872: Create a block that shows the issue metadata and I'm going to turn my attention there since that's more time-critical.

dww’s picture

Assigned: Unassigned » dww

I'll be working on this today.

dww’s picture

For the record, bdragon worked on this issue without telling anyone, resulting in http://drupalcode.org/project/project_issue.git/commit/a1ce6aa1 -- there are some problems with that commit that I'm going to fix. In particular, he changed field_issue_component from being defined by admins to having a hard-coded allowed_values() callback, just since that made it easier to get this block's settings page working again. We don't want to make Project* less flexible and fieldable -- the whole point of the D7 port is to make everything as much of an off-the-shelf core field as possible. If other functionality that depends on the fields needs to be made more flexible to handle it, so be it. Just wanted to record this in case anyone else is trying to figure out the history of this block in D7. ;)

dww’s picture

Status: Needs work » Needs review
StatusFileSize
new6.02 KB

The 'Oldest open issue' stuff was supposed to be killed via #1211058: "Oldest open issue" in project issue cockpit is meaningless but it was re-introduced here. So I ripped that back out: http://drupalcode.org/project/project_issue.git/commit/3d962c1
That was an obvious win, so I already committed and pushed that.

Meanwhile, here's a patch that restores field_issue_categories to being defined by the admin via the UI instead of a hard-coded allowed_values function, and the corresponding changes to the cockpit block.

I also did a few code cleanup things in here to make this a bit more readable.

Since this touches the node type that's being created during migration, I'm posting a patch and pinging sdboyer about it.

dww’s picture

p.s. Forgot to mention that this patch also fixes some access-checking bugs:
- 'access project issues' is no longer a perm in D7.
- We can't just call node_access('create', 'project_issue') since we can't assume that node type exists and is the only node type configured to be an issue.

sdboyer’s picture

cool, have this marked down on my list. let's go for it.

dww’s picture

Status: Needs review » Fixed

Committed and pushed to 7.x-2.x and merged into bzr.

Automatically closed -- issue fixed for 2 weeks with no activity.

Anonymous’s picture

Issue summary: View changes

It is estimated to take 0.5 days to complete this task.