uniqueness of a record in a custom field

General discussion of Mantis.

Moderators: Developer, Contributor

Post Reply
rondezo
Posts: 85
Joined: 09 Feb 2021, 09:18

uniqueness of a record in a custom field

Post by rondezo »

Hello everyone. How can I check the uniqueness of a record in a custom field? So that it is impossible to create a task if a value that has already been used in other tasks is selected in a custom field in the list? Thanks for the help.
cas
Posts: 1586
Joined: 11 Mar 2006, 16:08
Contact:

Re: uniqueness of a record in a custom field

Post by cas »

Do not think that is an option right now, bets would be to use a plugin for that with a dedicated field.
Mophilly
Posts: 66
Joined: 24 Feb 2005, 23:47
Location: California
Contact:

Re: uniqueness of a record in a custom field

Post by Mophilly »

Build a plugin that is invoked by the custom field can do the trick. In the custom field definition, you can enter the function call, and set up an event trigger for that. We use this approach for job numbers and some lookups.
rondezo
Posts: 85
Joined: 09 Feb 2021, 09:18

Re: uniqueness of a record in a custom field

Post by rondezo »

Mophilly wrote: 07 Jan 2022, 22:56 Build a plugin that is invoked by the custom field can do the trick. In the custom field definition, you can enter the function call, and set up an event trigger for that. We use this approach for job numbers and some lookups.
Could you tell us more about how to do this? I would be very grateful for your help.
Mophilly
Posts: 66
Joined: 24 Feb 2005, 23:47
Location: California
Contact:

Re: uniqueness of a record in a custom field

Post by Mophilly »

The tricky bit is adding the function call to the default values field. I will dig up an example.
Post Reply