Mantis fields customize for a single project

Get help from other users here.

Moderators: Developer, Contributor

Post Reply
Nalanda
Posts: 6
Joined: 16 Jan 2023, 17:48

Mantis fields customize for a single project

Post by Nalanda »

Hello, I am trying to customize a few fields for a specific single project.
Can we create customized mandatory fields for a specific project?
1) want to give a option to that specific project users to have a customized column to upload 3 or more documents
2)I want to customize a enumeration field based on the value of a previous or different field.
create a field "subversion" who's value is based on what is selected in the version field
3)Delete one of the options in the dropdown for a field which is mandatory. -->Remove priority from the severity column field
4)Does Mantis have an API to create tickets?
cas
Posts: 1586
Joined: 11 Mar 2006, 16:08
Contact:

Re: Mantis fields customize for a single project

Post by cas »

Hi Nalanda, here are some answers:
4) yes, check out the REST api
3) If that is for all projects, can be done quite easily, see admin guide
2) there is a plugin that supports this dependency between 2 custom fields but not in combination with a standard field.
1) there was a plugin to allow multiple uploads, perhaps that can be tweaked to your eeds.
Nalanda
Posts: 6
Joined: 16 Jan 2023, 17:48

Re: Mantis fields customize for a single project

Post by Nalanda »

Hey Cas, Thank you for your inputs.
Can you please give me a tested link to the plugins that you mentioned?
Also, another question is can we change colour of the fields to bifurcate the mandatory and optional fields( again for a specific individual project only)
cas
Posts: 1586
Joined: 11 Mar 2006, 16:08
Contact:

Re: Mantis fields customize for a single project

Post by cas »

Linking custom fields : https://github.com/mantisbt-plugins/LinkedCustomFields.
For the file uploads, there is a generic setting ($g_file_upload_max_num = 10;), why would you change that on project basis?
As for your latest question, mandatory fields are already marked with a red *. Perhaps you can activate another theme for those projects or play around with conditional CSS files ( see also here https://github.com/mantisbt-plugins/MantisBT-Colorized)
Nalanda
Posts: 6
Joined: 16 Jan 2023, 17:48

Re: Mantis fields customize for a single project

Post by Nalanda »

Hey Cas, again thank you. I have downloaded the plugin and making it work. Although a few challenges there. :)

Meanwhile can you also let me know if and how can I add a additional customized upload field for a specific project again.
I do agree that its not a good idea to change and play around the no of uploads as it would affect all the projects.
I work as an administrator for Mantis at my org wherein I have 200+ projects from different BU's.
These custmizations are an ask for a specific projects under one BU.
cas
Posts: 1586
Joined: 11 Mar 2006, 16:08
Contact:

Re: Mantis fields customize for a single project

Post by cas »

Changing the number of uploads in one go is defined by the $g_file_upload_max_num field which you can set in core/config_inc.php.
You could try to set that value based on project_id in the config file but make sure you test that properly before moving that into production.
It remains maintenance intensive.
Post Reply