#11615 closed enhancement (fixed)
Extension point for event providers
Reported by: | Peter Suter | Owned by: | lucid |
---|---|---|---|
Priority: | normal | Component: | WeekPlanPlugin |
Severity: | normal | Keywords: | |
Cc: | Trac Release: |
Description
This plugin could define a new extension point for event providers.
The existing DB stored notes would then be moved to a separate component, and additional components could be added for different kinds of events:
- Milestone and ticket events (due dates)
- External iCalendar feed events
- ...
These providers should define a "plan prefix" and are used as data sources when that prefix is used. (E.g. [[WeekPlan(plan=milestone:iteration1|ical:myfeed)]]
)
They should also be informed if the event is moved / edited. (Or !mark events as readonly.)
Attachments (4)
Change History (13)
Changed 11 years ago by
Attachment: | T11615-extension-point.patch added |
---|
Changed 11 years ago by
Attachment: | T11615-milestones.patch added |
---|
comment:1 Changed 11 years ago by
Changed 10 years ago by
Attachment: | T11615-extension-point-2.diff added |
---|
Changed 10 years ago by
Attachment: | T11615-milestones-2.patch added |
---|
comment:2 Changed 10 years ago by
Updated patches (works with event sources, see changeset:14089).
Now only calls responsible providers.
comment:4 follow-up: 5 Changed 7 years ago by
I managed to include a list of regex-filtered milestone due dates into our week calendar by means of a modified version of the T11615-milestones-2.patch. I see the following possible improvements:
Display in the legend could be nicer (currently says "milestone:*")Ok, that was actually a no-brainer. I didn't notice the title element. But the color is wrong. It seems it always uses the first color, not the matching one.- As you already said, either the milestones should be r/o somehow (and not be selectable in the plan list) or the changes should be "fed back" into the milestone table. I'd currently be happy with the former.
- It would be very useful to make the milestone events clickable so they open the corresponding milestone details page. Maybe this can be generalized to each event being able to provide a clickable URL.
I could try to hack something that suits my needs, but wonder if you might already be working on a clean solution to any of these or a general update of the plugin.
comment:5 follow-up: 6 Changed 7 years ago by
Replying to pleumann:
- But the color is wrong. It seems it always uses the first color, not the matching one.
Please create a new ticket with more information (e.g. your modified patch) if this is a defect in WeekPlanPlugin, thanks.
- As you already said, either the milestones should be r/o somehow (and not be selectable in the plan list) or the changes should be "fed back" into the milestone table. I'd currently be happy with the former.
I can't check at the moment, but wasn't this (read-only events) already implemented? I think you just have to remove the add_event
etc. methods, but I might remember this wrong. If it doesn't work well please open a new ticket for that as well, thanks.
- It would be very useful to make the milestone events clickable so they open the corresponding milestone details page. Maybe this can be generalized to each event being able to provide a clickable URL.
Nice idea. But this is actually also already possible I think: The event's title supports wiki formatting, so just put a milestone:name
Trac-link in there in get_events()
. Actually that was already there, the milestone:*
you mentioned, no? Sorry, maybe I'm misunderstanding.
I could try to hack something that suits my needs, but wonder if you might already be working on a clean solution to any of these or a general update of the plugin.
There is currently no work in-progress or planned. Please feel free to send create new tickets and attach patches. (Also note that you can put the milestone provider in a separate (single-file) plugin. You don't actually have to patch the WeekPlanPlugin itself. That was the point of this ticket. T11615-milestones-2.patch was just there as a test / demo.)
comment:6 Changed 7 years ago by
Replying to lucid:
Replying to pleumann:
- But the color is wrong. It seems it always uses the first color, not the matching one.
Please create a new ticket with more information (e.g. your modified patch) if this is a defect in WeekPlanPlugin, thanks.
It's possible that the color doesn't match because in my case the actual name of the milestone differs from "plan" specification (where it's a regex). I'll have another look on Monday. If I cannot solved it I will upload my stuff and create a ticket.
- As you already said, either the milestones should be r/o somehow (and not be selectable in the plan list) or the changes should be "fed back" into the milestone table. I'd currently be happy with the former.
I can't check at the moment, but wasn't this (read-only events) already implemented? I think you just have to remove the
add_event
etc. methods, but I might remember this wrong. If it doesn't work well please open a new ticket for that as well, thanks.
Yes, that what I found out, too, by reading the source. Removing the methods did the trick.
- It would be very useful to make the milestone events clickable so they open the corresponding milestone details page. Maybe this can be generalized to each event being able to provide a clickable URL.
Nice idea. But this is actually also already possible I think: The event's title supports wiki formatting, so just put a
milestone:name
Trac-link in there inget_events()
. Actually that was already there, themilestone:*
you mentioned, no? Sorry, maybe I'm misunderstanding.
Yup, works! Very cool. :)
I could try to hack something that suits my needs, but wonder if you might already be working on a clean solution to any of these or a general update of the plugin.
There is currently no work in-progress or planned. Please feel free to send create new tickets and attach patches. (Also note that you can put the milestone provider in a separate (single-file) plugin. You don't actually have to patch the WeekPlanPlugin itself. That was the point of this ticket. T11615-milestones-2.patch was just there as a test / demo.)
Will do. The single-file solution is actually what I did. I started with the .py file from the patch and modified it as needed.
Thanks!
comment:7 Changed 7 years ago by
I was able to solve the final bit, too. Had to return the "original" plan name in a place where my code used the "actual" milestone name. Now the colors are right, and I am quite happy with the result. Thanks again & a good weekend!
comment:8 Changed 7 years ago by
Glad it worked for you. Could you attach your version of the file also to this ticket? Maybe it helps anyone else. Have a nice weekend.
comment:9 Changed 7 years ago by
Sure. Let me do a bit of cleanup next week, then I will attach it to the ticket.
The attached patches:
[[WeekPlan(plan=milestone:milestone1)]]
Both need some refinement but the basic concept is working.