ChiliProject is not maintained anymore.
Please be advised that there will be no more updates.
We do not recommend that you setup new ChiliProject instances and
we urge all existing users to migrate their data to a maintained
system, e.g. Redmine. We will
provide a migration script later. In the meantime, you can use the
instructions by
Christian Daehn.
Forums » Develop »
Backlogs Plugin / disabled issue fields
Added by Kurt Klinner at 2012-02-02 01:16 pm
Hello
right nor we are testing the backlogs plugin (beta) and hit some issues.
Sometimes the start-/enddate & remaining hours fields of issues are disabled,
while in a similar constellation (1 issue with to related tasks) they are editable.
i found the following code whithin the hook.rb file of the plugin
if issue.descendants.length != 0
unless Backlogs::Compatibility.using_jquery?
snippet << javascript_include_tag_backlogs('lib/jquery.js')
end
snippet << javascript_tag(<<-JS)
(function($) {
$(document).ready(function() {
$('#issue_estimated_hours').attr('disabled', 'disabled');
$('#issue_remaining_hours').attr('disabled', 'disabled');
$('#issue_done_ratio').attr('disabled', 'disabled');
$('#issue_start_date').parent().hide();
$('#issue_due_date').parent().hide();
});
}(jQuery))
JS
end
What i would like to know is what does
issue.descendants contain (a list of related tasks ???)
Thanks in advance
Kurt
You should probably ask on the issue tracker of the plugin on github, but I've informed someone I know worked on it about this thread, maybe he'll be able to help you.
This code is already part of the original redmine_backlogs. It only changed places.
The remaining hours are disabled b/c they are calculated automatically for issues with sub issues. The same goes for the other fields. Those are handled in ChiliProject/Redmine core. I'm not sure though, why some of the are hidden while others are disabled.
All in all, this is a usability optimization, that should probably take place in the core. But that's another story ;)
Best
Gregor