Page 1 of 2

How to Add Fied to Mangament Project Page?

Posted: Apr 12, 2012 7:35 am
by danilolutz
Hi,

How to Add Field to Mangament Project Page?

This field would be added below the project name field and will be a dropdown field.

I'm developing a plugin for this... but until now, i see new fields added in bugs page only!

Someone can help me?

Note: Sorry if this post already exists, I could't find it!

Thank's
Danilo Lutz.

Re: How to Add Fied to Mangament Project Page?

Posted: Apr 12, 2012 8:53 am
by istvanb
There is no easy way to do that, you have to edit the /mantis/manage_proj_edit_page.php page directly.

Custom fields appear only for the issues, which makes sense. What would be the purpose of the new field?

Re: How to Add Fied to Mangament Project Page?

Posted: Apr 12, 2012 9:07 am
by danilolutz
hi, istvanb !
Thank,s for helping!

This is a project type field. It's must be linked to the project and dosen't to the bug!

I have made the plugin with table, inserting, updating data.
I cannot insert the new field in the mantis management project page only! Like new fields added by plugins on the bug's page.

Thank's!

Re: How to Add Fied to Mangament Project Page?

Posted: Apr 12, 2012 9:21 am
by istvanb
Dan,

as I said, you can not add custom fields to the project management page, you have to find your own way to do it. I am not aware of any plugins actually modifing the project management page, but I could miss the things.

Again, if you tell us what is the reason of the change you want to make we may can come out with some ideas (especially atrol:)

Re: How to Add Fied to Mangament Project Page?

Posted: Apr 12, 2012 9:26 am
by danilolutz
istvanb,

The idea is create a project type filter...

thanks again for helping! :)

Re: How to Add Fied to Mangament Project Page?

Posted: Apr 12, 2012 9:32 am
by istvanb
Dan,

What you mean on project type filter?

Option 1: you explain your idea in details and then you may receive some hints (if we can help)
Option 2: dont explain your idea in details and then you wont receive hints :)

Re: How to Add Fied to Mangament Project Page?

Posted: Apr 12, 2012 9:53 am
by danilolutz
Now I can explain, I think :lol: !! Sorry for confusion!

The Mantis Project Management Page like bellow:
Image

The Project Type field loads the values from plugin. The question is: How I add the Project Type Field like the image?

The Plugin page is:
Image

Thanks for help me!

Re: How to Add Fied to Mangament Project Page?

Posted: Apr 12, 2012 10:38 am
by istvanb
Well, I think MS Paint would suffice:) But asides to jokes: you have to modify the php source of the page, there is no other way I am aware of to include the field to that page.

The good news is that modifying that page wouldnt be a big trouble for you since I know you know php a lot. The bad news is that its your best interest to comply with the mantis architecture if you want this change working fine. Also a bad news that if you modify the source code, you may find difficulties to upgrade later on.

I see the result you want to achieve, but still dont understand what is the underlying idea. What is the feature you want to achieve? Isnt this something you may can achieve by proper subproject system?

Re: How to Add Fied to Mangament Project Page?

Posted: Apr 12, 2012 11:17 am
by danilolutz
A more plausible explanation: Instead of registering an application, responsible for testing, registered each screen as a project instead of creating a hierarchical structure as:
1. Project;
1.1. Sub-projects(Modules);
1.1.1. Screen;

Now, the boss ask me to include this field... we have more than 150 registered screens.

Anyway, correct this mistake is not in boss plans.

So thanks a lot for help!

Re: How to Add Fied to Mangament Project Page?

Posted: Apr 12, 2012 11:31 am
by istvanb
Just give me the number of your boss, I will kick his ass:)

I see the point although - and I went thru this many times - mantis is an awesome tool for doing certain things, and not that awesome for doing other things.

This being said, good luck for your project! Dont forget to come back to us and share your solution when its done!

i-

Re: How to Add Fied to Mangament Project Page?

Posted: Apr 13, 2012 7:18 am
by danilolutz
istvanb, hi! Hi community!

I found a solution! It's the attachment (pluginsolution.png)!

But together I found another trouble: how I create a new filter in the View Issues Page? If is possible, of course!

For more explanation see the viewissue.png attachment... pay attention to red labels called Module.

:mrgreen: I'm a Paint Piccasso ? kkkkkk. Poor joke! hahaha.

Thanks for everything folks!

Re: How to Add Fied to Mangament Project Page?

Posted: Apr 13, 2012 2:51 pm
by danilolutz
Nobody can help me?

Re: How to Add Fied to Mangament Project Page?

Posted: Apr 17, 2012 3:06 am
by istvanb
Hey dude,

nice work. Unfortunately you will face the same issue when you try to add this new filter to the filter options, since its for filtering the fields of the issues and not for filtering your new project field. So if you add a custom field to the project than that field will appear in the filter options, but since you did something completly different which anyways not supported by the original mantis architecture you have to apply a custom solution as well.

i-

Re: How to Add Fied to Mangament Project Page?

Posted: Apr 17, 2012 8:53 am
by danilolutz
Hi man!!
The custom fields can't get the values of a table? This should end my problem!

If can't, is a tip to increment the Mantis Project..

Thanks!

Re: How to Add Fied to Mangament Project Page?

Posted: Apr 17, 2012 9:01 am
by istvanb
Well, let me rephrase:

1, lets call "custom field" what is supported by Mantis. These can be added via the administration interface and they belongs to issues of the project to which you assign these custom fields
2, the one you try to add is not a custom field in mantis terminology, its a new feature thing, or customization. "special-feature-thing"

Now, the original "custom fields" will show up in the filter list. This is supported by the mantis engine. So if the certain project has the field then you can filter to it. But dont forget this works on an issue basis.

What you did is out of the scope of the current mantis infrastructure. Your "special-feature-field" is assigned to the project itself (via your plugin) and the individual issues have nothing to do with it. Or at least this how I understand you work.

I suggest to try to create some "custom fields" to understand the difference if you have not done it yet.

not sure if this helps,
i-