#12367 closed enhancement (fixed)
Manage project components from the standard Trac component admin panel
Reported by: | Cinc-th | Owned by: | Cinc-th |
---|---|---|---|
Priority: | low | Component: | SimpleMultiProjectPlugin |
Severity: | normal | Keywords: | |
Cc: | Trac Release: | 0.12 |
Description
The association of components with projects should be done using the standard Trac Components admin panel. The chosen projects should be visible in the default components table.
It's a little bit confusing to have a second Components panel just for that in the Manage Projects section.
Attachments (9)
Change History (53)
comment:1 Changed 10 years ago by
Owner: | changed from falkb to Cinc-th |
---|---|
Status: | new → accepted |
comment:2 Changed 10 years ago by
comment:3 follow-up: 5 Changed 10 years ago by
Changed 10 years ago by
Attachment: | wrongCol.PNG added |
---|
comment:4 Changed 10 years ago by
Furthermore, I have about 50 projects which makes the first (gray) table very large. This is another place where a multi-selection dropdown list (see #11162) would be much cooler :-)
comment:5 follow-up: 7 Changed 10 years ago by
Replying to falkb:
Today I tested your SmpFilterDefaultComponentPanels and it works almost perfect. Good job!
Hmm, that's strange. You mention another plugin adding a column in #12373. Does this problem still show when that plugin is disabled?
What's a little puzzling is that there is no data in that malformed row at all... It may be that the row is inserted after SMP did it's job inserting the column.
comment:7 Changed 10 years ago by
Replying to Cinc-th:
Replying to falkb:
Today I tested your SmpFilterDefaultComponentPanels and it works almost perfect. Good job!
Hmm, that's strange. You mention another plugin adding a column in #12373. Does this problem still show when that plugin is disabled?
No. If I disable ComponentHierarchyPlugin, everything is fine again. Now I know why the radiobutton is in the 'owner' (='Verantwortlicher') column. It's that current misbehavior that when 2 plugins want to add columns to that table, the table columns get mixed up somehow, no idea why. You can see in the second row that "PC Software" is also in the wrong column, it should be in 'Parent'.
That was the reason why I kept a separate component page for SimpleMultiProjectPlugin. If we can fix this mixup, nothing will stand in the way to move everything to the regular component Admin page.
comment:8 follow-up: 37 Changed 10 years ago by
The empty row in the screenshot is just because we want to allow to keep the component field empty.
comment:9 Changed 10 years ago by
comment:11 follow-ups: 12 13 Changed 10 years ago by
After update to [14639] it's still displayed mixed up like in the screenshot above. The content of column 'parent' is in column 'owner'.
Changed 10 years ago by
Attachment: | wrongCol-withEmptyRow.PNG added |
---|
comment:12 follow-up: 14 Changed 10 years ago by
comment:13 Changed 10 years ago by
Replying to falkb:
After update to [14639] it's still displayed mixed up like in the screenshot above. The content of column 'parent' is in column 'owner'.
Try this patch:
-
trunk/simplemultiproject/admin_filter.py
59 59 else: 60 60 if mark == 'INSIDE' and kind == 'START' and data[0].localname == 'input': 61 61 if data[1].get('type') == u"checkbox": 62 self._value = data[1].get('value') 62 self._value = data[1].get('value') or data[1].get('name') 63 63 yield event 64 64
comment:14 Changed 10 years ago by
Replying to Cinc-th:
Replying to falkb:
After update to [14639] it's still displayed mixed up like in the screenshot above. The content of column 'parent' is in column 'owner'.
How do you manage to create a component without a name?
I tried to remember but I can't say. Maybe we tweaked the db manually, just to force the user to select a component on ticket creation.
Changed 10 years ago by
Attachment: | wrongCol-withEmptyRow2.PNG added |
---|
comment:15 follow-ups: 16 19 Changed 10 years ago by
Thanks, your patch of comment:13 improves it as you can see in attachment:wrongCol-withEmptyRow2.PNG . I wonder if it's also possible to move column name to be the first right next to the checkbox column (?)...
comment:16 follow-up: 17 Changed 10 years ago by
Replying to falkb:
I wonder if it's also possible to move column name to be the first right next to the checkbox column (?)...
You mean swapping the position of Restrict to Project and name?
comment:17 Changed 10 years ago by
comment:18 follow-up: 26 Changed 10 years ago by
I also noticed the little issue that the text "Please select the projects for which this component will be visible. ..."
is on the right-hand side of the upper table if I resize the browser to the full screen width.
comment:19 Changed 10 years ago by
Replying to falkb:
Thanks, your patch of comment:13 improves it as you can see in attachment:wrongCol-withEmptyRow2.PNG.
Please attach the html source of the first row of your broken table like this:
<tbody> <tr> <td class="sel"><input name="sel" value="AAA" type="checkbox"></td><td></td> <td class="name"> <a href="/Foo/admin/ticket/components/AAA">AAA</a> </td> <td class="owner"></td><td class="parent">Aaaa</td> <td class="default"> <input name="default" value="AAA" type="radio"> </td> </tr><tr> <td class="sel"><input name="sel" value="Aaaa" type="checkbox"></td><td></td> <td class="name"> <a href="/Foo/admin/ticket/components/Aaaa">Aaaa</a> </td> <td class="owner"></td><td class="parent">HW</td> <td class="default"> <input name="default" value="Aaaa" type="radio"> </td> </tr>
comment:20 Changed 10 years ago by
<thead> <tr><th class="sel"> </th><th>Restricted to Project</th> <th>Name</th><th>Parent</th><th>Owner</th><th>Default</th> </tr> </thead> <tbody> <tr> <td class="sel"><input name="sel" value="" type="checkbox"></td><td></td> <td class="name"> <a href="/Foo/admin/ticket/components/"></a> </td> <td class="owner"></td> <td class="default"> <input name="default" value="" checked="checked" type="radio"> </td> </tr><tr> <td class="sel"><input name="sel" value="Abc" type="checkbox"></td><td></td> <td class="name"> <a href="/Foo/admin/ticket/components/Abc">Abc</a> </td><td class="parent">Browser: IE8</td> <td class="owner"></td> <td class="default"> <input name="default" value="Abc" type="radio"> </td> </tr><tr>
comment:21 Changed 10 years ago by
Thanks for the dump. The parent column is missing which should have been inserted by ComponentHierarchyPlugin.
Did you apply the patch from ticket #12385?
comment:23 follow-up: 24 Changed 10 years ago by
Improved the patch in #12385. Should fix the issue at last.
comment:24 Changed 10 years ago by
Replying to Cinc-th:
Improved the patch in #12385. Should fix the issue at last.
Yes, great, it does fix.
Now only 2 issues remain:
- see comment:16
- see comment:18
comment:26 Changed 10 years ago by
Replying to falkb:
I also noticed the little issue that the text
"Please select the projects for which this component will be visible. ..."
is on the right-hand side of the upper table if I resize the browser to the full screen width.
I can't see that. It's probably some CSS/Browser issue. Please provide some screenshot so I know more precisely what's the problem. It's perfectly aligned over here with FF 38.0.5.
comment:27 Changed 10 years ago by
Try the attached admin_filter.py for an easy fix. That one puts the help text below the table.
Changed 10 years ago by
Attachment: | text-pos-issue.PNG added |
---|
Changed 10 years ago by
Attachment: | text-pos-issue2.PNG added |
---|
comment:28 Changed 10 years ago by
<div id="tabcontent"> <h2>Manage Components <span class="trac-count">(45)</span></h2> <form class="addnew" id="addcomponent" method="post" action=""><div><input name="__FORM_TOKEN" value="ceef8caf60d835b7e76262e4" type="hidden"></div> <fieldset> <legend>Add Component:</legend> <div class="field"> <label>Name: <input name="name" type="text"></label> </div> <div class="field"> <label>Owner: <input name="owner" value="" type="text"> </label> </div><div style="overflow:hidden;"> <div style="float:left"> <p class="help">Please select the projects for which this component will be visible. Selecting nothing leaves this component visible for all projects.</p> </div> <div class="admin-smp-proj-tbl-div"> <table id="projectlist" class="listing admin-smp-project-table"> <thead> <tr><th></th><th>Project</th></tr> </thead> <tbody> <tr> <td class="name"> <input name="sel" value="1" type="checkbox"> </td> <td>aaa1</td> </tr><tr> <td class="name"> <input name="sel" value="23" type="checkbox"> </td> <td>aaa2</td> </tr><tr>
comment:30 Changed 10 years ago by
Probably, just a line-break is missing between text and table because it looks fine if I use a smaller browser window width.
comment:31 Changed 10 years ago by
The Text on the left side as shown in text-pos-issue2.PNG is what I expected :-/. I'm not the CSS guru but admin_filter.3.py may fix it.
comment:32 follow-up: 33 Changed 10 years ago by
Yezzzz! Now it's perfect. (y)
BTW: Testing around with the component hierarchy I noticed a traceback as I tried to change a parent of a component... *sigh*
comment:33 Changed 10 years ago by
Replying to falkb:
Yezzzz! Now it's perfect. (y)
BTW: Testing around with the component hierarchy I noticed a traceback as I tried to change a parent of a component... *sigh*
but I think that's another story
comment:35 Changed 10 years ago by
Hi falkb,
please test this final version. If it works we are probably done :-).
comment:36 Changed 10 years ago by
Tested with 0.12 and 1.0, and also with having ComponentHierarchyPlugin active on the same config page. Works great! Cinc-th, you can remove the Admin->projects->components page and close this ticket.
comment:37 Changed 10 years ago by
Replying to falkb:
The empty row in the screenshot is just because we want to allow to keep the component field empty.
... remembered it was a fast hack to allow removing a parent component by simply choosing the empty component :) ...
comment:38 Changed 10 years ago by
Keywords: | testing added |
---|
comment:40 Changed 9 years ago by
If you were to define a BoolOption
on the SmpComponentAdminPanel
class then you'd implicitly have documentation for the legacy_component_panel
option on the TracIni page. Untested patch is attached.
The more common pattern though is to just enable/disable components using the plugin admin panel rather than adding a redundant option.
Changed 9 years ago by
Attachment: | ticket12367_booloption.patch added |
---|
comment:41 Changed 9 years ago by
Thanks for the more elaborate patch. This option is just some temporary solution. The panel will be completely removed in the near future so no heavy thinking went into the code.
comment:44 Changed 9 years ago by
Keywords: | testing removed |
---|
[14600]: added project column to components table of Tracs component admin panel to show the associations.