#1624 closed enhancement (fixed)
removing fields from trac.ini results in a server error
Reported by: | anonymous | Owned by: | Russ Tyndall |
---|---|---|---|
Priority: | lowest | Component: | TimingAndEstimationPlugin |
Severity: | trivial | Keywords: | ClientScript |
Cc: | Trac Release: | 0.10 |
Description
Hello,
Thanks for the great plugin. Is it possible to be able to remove the "Add Hours to Ticket" field when creating a new ticket using this plugin? I tried removing them from trac.ini, but a server error is returned.
What I would like to do is only allow people to log in the total hours through the use of the post-commit hook. They would only put in the estimated number of hours when creating the ticket; adding any hours to the ticket should only be done through the post-commit hook.
Attachments (0)
Change History (5)
comment:1 Changed 17 years ago by
Keywords: | ClientScript added |
---|---|
Priority: | normal → lowest |
Severity: | normal → trivial |
Status: | new → assigned |
Type: | defect → enhancement |
comment:2 Changed 17 years ago by
Thanks for the quick reply and sorry for not putting in the name; i'm the anonymous poster of this ticket. This is the first ticket I have posted.
I'm trying to disable entering hours from the tickets tab since we're using the Scrum Burndown Plugin. We are having trouble synchronizing the data with the burndown sheet due to some people accidentally adding total hours when it should be estimated hours, etc. We'd like to just have one way of inputting the data so that the burndown is accurate.
I'll look into the javascript solution. Is there any file in the source which I should start looking at? Thanks in advance!
comment:3 Changed 17 years ago by
This is the page I would pay most attention to if I were you. Given this it should be pretty easy to come up with javascript to do what you want.
browser:/timingandestimationplugin/trunk/timingandestimationplugin/ticket_webui.py
Do not worry about making it config file selectable or anything like that (unless you already know how.) That stuff is easy, and I am willing to just do that for you when I incorporate your javascript.
This kinda looks silly, because I emit the javascript as a navigation item, but this was the only way I could find to easily add javascript to the ticket page without needing to redo the ticket control.
Please note the following code block which is to provide better compatibility with different versions of trac.
var x = document.getElementById('totalhours'); x = x || document.getElementById('field-totalhours');
Hope this is enough to get you going, if you have any other questions please let me know.
Russ
comment:4 Changed 17 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
comment:5 Changed 17 years ago by
if anything else happens that you need help with, please feel free to open another ticket. Just closing this one because I do not anticipate there being anything else to happen on this
Just curious, are you the same anonymous from #1621 ?
While I have never tried to run it in this manner, and don't really suggest you do (how would log hours for communication and meetings), there is probably a way to make this work. My opinion is that this is better as a policy about usage rather than a change to the software.
The problem I foresee, is that the by removing those fields from the ticket, you are also removing them from the form post (where they are expected) and from the custom fields that are on a ticket. The only way I can for see this working, is as a javascript that is loaded onto the page, so that those form fields can be removed from the ticket. Incidentally this is how the 'Total Hours' field is made not editable. This script could be implemented as a client side add on with greasemonkey/trixy if you want to go that route. Other wise, if you provide an appropriate javascript file, I can include it with a configuration flag, so that this only needs to happen on the server rather than all the clients.
Please let me know what you decide or if you need help,
Russ