Commit Graph

196 Commits

Author SHA1 Message Date
Eric
c3c1897258 N°931: Tags data class display name 2018-09-18 11:38:34 +02:00
Eric
0c75b98f48 N°931: TagSet Fix Bulk update 2018-09-13 17:49:25 +02:00
Pierre Goiffon
40a4e6d7b0 Fix files using CrLf, convert them to Lf to have the whole repo using Lf
Warn your git config (core.autocrlf = input or true)
2018-09-04 17:59:51 +02:00
Eric Espié
4cd591f81c DBObject->GetOriginal() hardening (now support attributes not set: for example sla_tto_passed for UserRequest until it is closed)
SVN:trunk[5932]
2018-07-11 13:40:38 +00:00
Guillaume Lajarige
7ca95b9413 Code cleanup: Warning suppression & PHPDoc.
SVN:trunk[5928]
2018-06-29 17:14:13 +00:00
Eric Espié
f920851420 N°1420 - Performances enhancement (enhance counts)
SVN:trunk[5844]
2018-06-08 13:13:33 +00:00
Denis Flaven
6cc4a6e1be PHP 7.2 compatibility: count(null) now generates a PHP warning !!
SVN:trunk[5815]
2018-05-28 14:08:31 +00:00
Stephen Abello
6a089aa1b7 N°729 Form prefill : Included Contract case in the datamodel.
SVN:trunk[5703]
2018-04-20 10:07:43 +00:00
Stephen Abello
a84748a544 N°729 Form prefill : Allow to overload new methods in order to prefill search forms, creation forms and transition forms
SVN:trunk[5609]
2018-04-05 08:17:19 +00:00
Pierre Goiffon
94ba32af57 Some PHPDoc
SVN:trunk[5229]
2018-01-10 14:08:36 +00:00
Pierre Goiffon
cc08613304 New method to test if a field is read only in the current DBObject state
SVN:trunk[5228]
2018-01-10 14:08:29 +00:00
Pierre Goiffon
d80b890cd0 Fix warnings and errors in SynchroReplica
SVN:trunk[5142]
2017-11-29 14:30:10 +00:00
Eric Espié
2f8062d296 N°454 - Check data validity during CSV import
* The controls are only done on database integrity for the different keys.
* If retrofit to branch 2.4 take also the revisions: 4999, 5000, 5005, 5006

SVN:trunk[5022]
2017-10-13 12:28:09 +00:00
Eric Espié
56e14fc107 N°454 - Check data validity during CSV import
* "simulate" phase is more permissive on new hierarchical entries
* Better check during "apply" phase

SVN:trunk[5005]
2017-10-11 15:31:57 +00:00
Eric Espié
5408545c07 N°454 - Check data validity during CSV import
* "simulate" phase is more permissive on new hierarchical entries
* Better check during "apply" phase

SVN:trunk[5000]
2017-10-11 09:28:23 +00:00
Eric Espié
d504fb209f N°454 - Check data validity during CSV import
* Added additional checks for external keys (including hierarchical ones)

SVN:trunk[4999]
2017-10-10 10:00:05 +00:00
Romain Quetiez
635e7cfeec Fixed integration issue (possibly a regression): if an extension implements iApplicationExtension::OnDBInsert, and it calls DBWrite, then a fatal error occurs (call a member function on a null value). The error occurs for several types of attributes such as ormCustomField, ormCaseLog, ormLinkSet. The fix consists in aligning the internal values of a DBObject as soon as it has been written into the Database.
SVN:trunk[4993]
2017-10-06 14:06:01 +00:00
Guillaume Lajarige
df1ebaebf9 N°1104 DBObject::__toString() was way too verbose and returned all objects from linksets as string as well, causing memory limits.
SVN:trunk[4971]
2017-10-05 15:38:27 +00:00
Romain Quetiez
43b8522b85 Rework of the edition of 1-N and N-N links: managed as a delta from the GUI down to the the lowest APIs.
- Fixes the management of obsolete linked data.
- N.744 Fixes concurrent modifications (example: a user modifies a team, another user modifies a person related to that same team). Still NOT fixed with the customer portal.
- N.849 Fixes links edition in the case some data are not allowed to the current user (organization silos) -TO BE TESTED
- #1145 Fixes the creation of duplicate links in one step (Server to NW Device)
- #1147 Fixes the update of duplicate links

SVN:trunk[4766]
2017-06-21 15:47:28 +00:00
Romain Quetiez
248f8d6fd4 Obsolescence: finalizing the implementation of the flag (hide obsolete objects, show an icon on hyperlinks and a tag on the object details, user preference defaulting to the new setting 'show_obsolete_data')
SVN:trunk[4739]
2017-05-17 08:51:10 +00:00
Guillaume Lajarige
e9b7ccd475 Advanced customization: New overridable verb DBObject::GetDefaultValue($sAttCode)
SVN:trunk[4737]
2017-05-16 09:50:24 +00:00
Romain Quetiez
44b53e40a0 Obsolescence: introduction of this new concept (wording could change later). The obsolescence of an object is computed after other attributes, by the mean of an OQL expression. The code has been refactored (again) so as to factorize between the computation of friendly names and the computation of obsolescence flags. The refactoring involved a significant AND RISKY change: external key friendly names (magic attributes) have been changed from AttributeFriendlyName to AttributeExternalField, which simplifies the SQL query build logic.
SVN:trunk[4732]
2017-05-11 11:58:42 +00:00
Romain Quetiez
d2d895fdf5 Archives: regression. Forms not working with various symptom having the same root cause: DBObject::Set issuing an exception "Attempting to set the value on the read-only attribute operational_status"
SVN:trunk[4721]
2017-05-09 12:07:43 +00:00
Romain Quetiez
a8ad3004ea Internal:
- code refactoring to generalize attributes based on an OQL expression (friendly name, obsolescence flag, ....). The intermediate class AttributeComputedFieldVoid has been swept in favor of the use of a new method: IsBasedOnOQLExpresssion.
- added an introspection API (experimental), allowing an external application to request for information about the capabilities of the framework (first step: list attributes and their main characteristics)

SVN:trunk[4720]
2017-05-05 15:08:49 +00:00
Romain Quetiez
fa2fd6dcdf NEW! Archiving data. Archiving is a soft delete. It can be undone. Enter the archive mode to see all the data including archives (everything is read-only in that mode). Archiving must be enabled per class (data model). Archiving is achieved by the mean of the API DBObject::Archive (or Unarchive).
SVN:trunk[4692]
2017-04-26 09:52:20 +00:00
Guillaume Lajarige
2fcf50bb88 N°653 Lifecycle flags can be defined on both states and transitions (Note: This is a beta version and need to be tested!)
SVN:trunk[4688]
2017-04-21 14:59:04 +00:00
Guillaume Lajarige
86191b36d8 DBObject::ExecActions : add_to_list action now accepts the source object id as first parameter
SVN:trunk[4647]
2017-03-31 15:18:50 +00:00
Guillaume Lajarige
76ca7dc9e8 N°602: InlineImage "randomly" not available for display.
Adding an InlineImage while adding an object in a IndirectLinkedSet at the same time would attach the InlineImage to the linked object instead of the host one. If their organizations were different, it could result in a security issue, denying the display of the InlineImage.

SVN:trunk[4561]
2017-02-28 09:47:24 +00:00
Romain Quetiez
a908dcd752 #1178 Internals: Object Update/Reload should never fail: as soon as a given object has been read in the current execution context, updating/reloading it is not an issue.
SVN:trunk[4402]
2016-09-15 10:01:32 +00:00
Romain Quetiez
09fad78952 #1223 Custom lifecycle actions: improved the reporting when an action returns false (class/function/id logged into error.log)+ the framework now considers that no return value is equivalent to 'true'
SVN:trunk[4195]
2016-06-10 13:59:56 +00:00
Romain Quetiez
1fb346da67 #1235 Internal: DBObject API - external fields not up to date after changing the external key (though they seem to be in sync when inspecting the internal values, Get() does not return the expected value).
SVN:trunk[4165]
2016-06-01 14:13:20 +00:00
Denis Flaven
22f73506a2 Support for objects to go "out of the silo" during a transition by making sure that we can reload an object we've just saved.
SVN:trunk[4144]
2016-05-25 12:32:32 +00:00
Romain Quetiez
1ebafb0566 XSS: Fixed a regression caused by the fix [3994]. Object hyperlinks were escaped twice causing accuented characters displayed as '´'. The API DBObject::MakeHyperLink has been clarified and the original fix moved elsewhere. The XSS injection that was not handled correctly prior to [3994] was in the display of an external key in the details of an object. To reproduce easily, inject some malicious characters in the name of the organization 'Demo' and view any object owned by Demo.
SVN:trunk[4106]
2016-05-19 09:51:09 +00:00
Denis Flaven
3b38388c73 Support "recusrive placeholders" (i.e. $this->org_id->code$) inside notifications... when using the HTML notation (i.e. -> becomes ->)
SVN:trunk[4100]
2016-05-17 19:01:22 +00:00
Denis Flaven
6e074f5486 Regression: properly initialize mandatory date (and time) attributes when using a custom date/time format.
SVN:trunk[4086]
2016-05-14 17:04:20 +00:00
Romain Quetiez
ae22bbbc81 Internal: added DBObject::RegisterURLMakerClass, to allow for overriding the standard behavior of template placeholders such as $this->org_id->hyperlink(portal)$
SVN:trunk[4039]
2016-05-09 16:01:56 +00:00
Denis Flaven
8eba9ae714 Enhancement: Date and time formats are now configurable in iTop !! (beta version, beware!)
SVN:trunk[4011]
2016-04-22 09:26:27 +00:00
Romain Quetiez
25287a8c04 XSS: Correctly escape the name of an object when it is displayed within an hyperlink
SVN:trunk[3994]
2016-04-11 11:51:59 +00:00
Romain Quetiez
725c7d45d1 Internal: Implemented DBObject::ExecActions, enables scripting object preset/modifications
SVN:trunk[3991]
2016-04-08 07:34:38 +00:00
Romain Quetiez
0104c3fe41 ResetStopWatch could not be used as a lifecycle action: the symptom is "The action has failed".
SVN:trunk[3967]
2016-03-25 10:02:29 +00:00
Romain Quetiez
847c1d2736 Custom fields: track the changes and improve the robustness with regards to the Exception thrown by the handler. Also fixed an issue with DBObject, causing the custom fields to be written several times if invoking DBUpdate more than once. Theoretically, this issue affects any type of attribute.
SVN:trunk[3966]
2016-03-24 10:49:04 +00:00
Romain Quetiez
e6887ab317 Custom fields: alpha version.
SVN:trunk[3943]
2016-03-10 16:55:13 +00:00
Romain Quetiez
e26eed3142 #1210 (reopened) ...fixed a regression on commit [r3936]: dependent fields could not be loaded when there are link set attribute in the current form
SVN:trunk[3938]
2016-03-04 14:22:13 +00:00
Denis Flaven
4e24e9899e (HTML) Formatted Case Logs, Description and Notifications with inline images uploaded as Attachments. Beta Version !!
SVN:trunk[3916]
2016-02-19 10:03:59 +00:00
Denis Flaven
410c47178d #1176: empty placeholders are represented by an empty string as in previous version.
SVN:trunk[3873]
2016-01-25 12:46:56 +00:00
Romain Quetiez
8c4e84dfaf New type of attribute: AttributeMetaEnum.
Designed to cope with the need to select tickets by operational status. The value of this attribute is computed by the framework. It depends on the actual ticket status (that attribute cannot be known by the root class because its definition varies from one type of ticket to another).
The data model has been enriched with the new attribute Ticket::operational_status. Its value is 'active' unless the ticket status is either 'rejected', 'resolved' or 'closed'. The existing dashboards have been left unchanged but should be revised to fully benefit from the new attribute (e.g. Open requests, Open problems, etc.)
Note: the alpha version of the compiler had already been committed by mistake a few days ago.

SVN:trunk[3859]
2016-01-13 14:35:21 +00:00
Denis Flaven
489820cfe7 #1049: CSV import (and edition) of n:n links. The Differences() function is NOT commutative: the original value (i.e. the one from the database) must the the first argument.
SVN:trunk[3752]
2015-09-12 09:29:32 +00:00
Romain Quetiez
f26bcd812c Could not add more than one link between a given server and a given network device. This is a regression in 2.2.0 beta. This issue affect N-N links where duplicates are allowed. One single link is being affected in the standard datamodel.
SVN:trunk[3745]
2015-09-11 12:03:22 +00:00
Romain Quetiez
b1887ae431 #1111 Could not attach a UserRequest to a Problem (1-N links). Could not detach either! This fix requires attention: it is assumed that an item of a link set, if it is "modified" then its key to the current object has already been set.
SVN:trunk[3693]
2015-08-21 10:27:54 +00:00
Romain Quetiez
3ba2c3d657 Log REST/JSON calls (config: 'log_rest_service' => true ; stored as EventRestService)
SVN:trunk[3688]
2015-08-19 14:35:08 +00:00