Page 1 of 1

Mantis fields customize for a single project

Posted: 16 Jan 2023, 18:07
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?

Re: Mantis fields customize for a single project

Posted: 17 Jan 2023, 09:44
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.

Re: Mantis fields customize for a single project

Posted: 17 Jan 2023, 10:04
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)

Re: Mantis fields customize for a single project

Posted: 17 Jan 2023, 12:15
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)

Re: Mantis fields customize for a single project

Posted: 17 Jan 2023, 15:13
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.

Re: Mantis fields customize for a single project

Posted: 17 Jan 2023, 16:08
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.