View Issue Details

IDProjectCategoryView StatusLast Update
0001569RackTablesdefaultpublic2016-10-01 22:24
Reportermarti.cardusAssigned Toinfrastation 
PrioritynormalSeverityfeatureReproducibilityN/A
Status assignedResolutionopen 
Product Version 
Target VersionFixed in Version 
Summary0001569: Ability to make attributes required
DescriptionIs it possible to add an extra field on "attribute mapping" to make an attribute required depending of the type of object?

For example, in the VM object "FQDN" is required, but not in Server object.
TagsNo tags attached.

Activities

infrastation

infrastation

2015-12-23 15:29

administrator   ~0003071

Do you mean to require the attribute set when the object is created? Or to allow to create an object anyway and just block the "save properties" form if the value is empty?
marti.cardus

marti.cardus

2015-12-23 15:50

reporter   ~0003073

Hi

I need the second option. Create an object anyway and just block the "save properties" form if the value is empty

Kind regards
infrastation

infrastation

2015-12-23 17:05

administrator   ~0003075

A local plugin can solve this task.
marti.cardus

marti.cardus

2015-12-23 17:52

reporter   ~0003077

Is there any existing plugin with this functionality?

I don't know how to modify properties the form to solve this, can you explain me if you don't want to integrate in RackTables?

Kind regards
infrastation

infrastation

2015-12-24 00:26

administrator   ~0003079

Please try this:
https://github.com/RackTables/racktables-contribs/blob/master/mandatory_attr.php
marti.cardus

marti.cardus

2015-12-24 09:09

reporter   ~0003081

Hi,

I downloaded the file in the directory plugins.

When modifying an object I can leave empty "FQDN" field.

I have the version 0.20.8 of RackTables

I guess this was just a proof of concept, would be nice to define through gui the attributes required versus object type.

Kind regards
infrastation

infrastation

2015-12-24 09:34

administrator   ~0003083

The two constants at the file top provide the means for customisation.
marti.cardus

marti.cardus

2015-12-24 09:46

reporter   ~0003085

Hi,

How it works if i need to mark as required more attributes on especific object type?

Anyway, this doesn't work with the example.

Thanks
infrastation

infrastation

2015-12-24 09:54

administrator   ~0003087

Let me have some time to check and update.
marti.cardus

marti.cardus

2015-12-24 10:25

reporter   ~0003089

OK thanks,
I hope for your updates

Kind regards
marti.cardus

marti.cardus

2015-12-31 11:05

reporter   ~0003093

Hi there,

Is any update in this?

Thanks
infrastation

infrastation

2016-01-03 20:30

administrator   ~0003097

I've got a technical draft how to implement it without a plugin and with the flexibility you are looking for. I will update once there is a code to show.
infrastation

infrastation

2016-05-19 12:21

administrator   ~0003189

This was implemented about halfway and then I got backlogged with other work. I need more time to resolve this (in either way).
marti.cardus

marti.cardus

2016-05-19 12:39

reporter   ~0003191

Hi,

Thanks for the update. I'll keep waiting for more news

Kind regards
infrastation

infrastation

2016-10-01 22:24

administrator   ~0003483

I have saved my working copy here: https://github.com/infrastation/racktables/tree/Mantis-1569

Issue History

Date Modified Username Field Change
2015-12-17 17:34 marti.cardus New Issue
2015-12-23 15:29 infrastation Note Added: 0003071
2015-12-23 15:50 marti.cardus Note Added: 0003073
2015-12-23 17:05 infrastation Note Added: 0003075
2015-12-23 17:52 marti.cardus Note Added: 0003077
2015-12-24 00:26 infrastation Note Added: 0003079
2015-12-24 00:27 infrastation Assigned To => infrastation
2015-12-24 00:27 infrastation Status new => assigned
2015-12-24 09:09 marti.cardus Note Added: 0003081
2015-12-24 09:34 infrastation Note Added: 0003083
2015-12-24 09:46 marti.cardus Note Added: 0003085
2015-12-24 09:54 infrastation Note Added: 0003087
2015-12-24 10:25 marti.cardus Note Added: 0003089
2015-12-31 11:05 marti.cardus Note Added: 0003093
2016-01-03 20:30 infrastation Note Added: 0003097
2016-05-19 12:21 infrastation Note Added: 0003189
2016-05-19 12:39 marti.cardus Note Added: 0003191
2016-10-01 22:24 infrastation Note Added: 0003483