#11073 closed enhancement (fixed)
Get more appropriate resource ID from rendering context
Reported by: | Steffen Hoffmann | Owned by: | Jun Omae |
---|---|---|---|
Priority: | normal | Component: | VotePlugin |
Severity: | normal | Keywords: | |
Cc: | Steffen Hoffmann | Trac Release: |
Description
VoteList
has an issue when included into a milestone description, but executed in /roadmap
context, where it will show all recent votes instead of just these for the corresponding milestone.
While the root cause obviously is the inability to retrieve a valid resource ID (roadmap itself is not vote-able yet for the same reason), a backwards-compatible fix is not trivial, but certainly required.
Attachments (2)
Change History (22)
comment:1 Changed 12 years ago by
comment:2 Changed 10 years ago by
Owner: | Ryan J Ollos deleted |
---|
Feel free to push ahead now that 0.2.0 and 0.3.0 have been released.
comment:3 Changed 9 years ago by
A related issue revealed in #12595 is that the parent resource is not extracted from the path, needed for realms such as changeset
.
comment:4 follow-up: 5 Changed 9 years ago by
I think it was mentioned elsewhere, it would be nice to backport resource_from_path
to Trac.
comment:5 Changed 8 years ago by
Replying to Ryan J Ollos:
I think it was mentioned elsewhere, it would be nice to backport
resource_from_path
to Trac.
=> trac:#12813.
comment:6 Changed 7 years ago by
Type: | defect → enhancement |
---|
Changed 7 years ago by
Attachment: | t11073.diff added |
---|
comment:7 follow-up: 18 Changed 7 years ago by
I think we should use data['context'].resource
in post_process_request()
rather than resource_from_path which is detecting resource from path.
Another issue, attachment and changeset resources are not supported since missing parent realm and id in votes
table.
comment:13 Changed 7 years ago by
Owner: | set to Jun Omae |
---|---|
Resolution: | → fixed |
Status: | new → closed |
In 16920:
Changed 7 years ago by
Attachment: | t11073.1.diff added |
---|
comment:18 Changed 7 years ago by
Replying to Ryan J Ollos:
A related issue revealed in #12595 is that the parent resource is not extracted from the path, needed for realms such as
changeset
.
Replying to Jun Omae:
Another issue, attachment and changeset resources are not supported since missing parent realm and id in
votes
table.
=> #13315.
From previous work for BreadCrumbsNavPlugin I remember, that there are at least two, if not three different ways to get a resource ID from rendering context.
I'll have to dig that out again, and will very likely lift valuable code and inspiration for that plugin from here as well. Like with BookmarkPlugin there are some amazing similarities.