Commit Graph

164 Commits

Author SHA1 Message Date
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
Romain Quetiez
a6b74d6538 Optimization: when displaying an object details, do not check data synchro for each and every attribute (the cache did exist but was inoperant)
SVN:trunk[3634]
2015-07-09 13:43:34 +00:00
Romain Quetiez
baf54a7c02 #942 OQL now supporting unions. Unions support polymorphism and can be used anywhere in the application.
SVN:trunk[3631]
2015-07-08 17:10:40 +00:00
Denis Flaven
4ee78ea59c #1078: Properly record the history of LinkedSet(Indirect)
SVN:trunk[3626]
2015-07-07 13:01:40 +00:00
Romain Quetiez
7f65e9fd5e New lifecycle action SetCurrentPerson. Also improved the existing lifecycle action SetCurrentUser to prevent from calling it on an external key that is not pointing to users (!= contact), and if the target attribute is a string, then store the friendlyname there.
SVN:trunk[3616]
2015-07-02 09:43:15 +00:00
Romain Quetiez
f314036cef #1079 DBWriteLinks deleting related objects
SVN:trunk[3572]
2015-04-30 15:55:38 +00:00
Denis Flaven
d63b4ef6d1 Integration of the new way to compute relations into the datamodel (ComputeImpactedItems)
SVN:trunk[3570]
2015-04-29 16:35:21 +00:00
Romain Quetiez
ff1514dc75 Modules implementing a lifecycle written in PHP (and having actions executed on transitions) do not work until 2.1.0. The compatibility patch had been implemented but it was not working. Good candidate for a retrofit to the branch 2.1.0
SVN:trunk[3547]
2015-04-16 13:49:36 +00:00
Romain Quetiez
ef8888c679 Rework of the relation diagrams: implemented MetaModel::GetRelatedObjectsDown (still not taking the redundancy into account)
SVN:trunk[3544]
2015-04-13 12:59:26 +00:00
Romain Quetiez
e64b6d1d98 XML Modelization of the relations: reworked toward an asymetric definition (downstream: A impacts B, upstream: B depends on A)
- The queries are developped at runtime (cache)
- More complex algorithm to take into account the legacy type of specification (GetRelationQueries)
- New dictionary naming convention (preserving backward compatibility): "VerbUp" to be replaced by "DownStream
- Temporary hacks to preserve the relation 'depends on', until we have a new GUI
- Special handling for the relation LogicalVolume impacts VirtualDevice which had to be implemented in the bridge module
- Improved the backward compatibility by leaving legacy methods GetRelationQueries returning an empty definition, allowing for an eventual XML redefinition

SVN:trunk[3542]
2015-04-10 10:09:22 +00:00
Romain Quetiez
3cf0fa3ee2 XML Modelization of the relations, with full support of the previous way (by implementing a method GetRelationQueries). Still, the standard data model has not been migrated to the new format.
SVN:trunk[3519]
2015-03-26 11:12:25 +00:00
Denis Flaven
930d833e1b #803: template placeholders are now built on demand. Yes !!
SVN:trunk[3498]
2015-02-27 10:02:44 +00:00
Romain Quetiez
6bb9754628 Internal: fixed the caching of DBObject::ToArgs()
1) Wasn't reset when the object was written the DB (thus having its ID set)
2) Wasn't taking the argument name into account (the list of placeholders was defined by the first caller)

SVN:trunk[3491]
2015-01-30 10:04:42 +00:00
Denis Flaven
1f2ad9ecdb Demo mode: prevent the deletion of Users...
SVN:trunk[3452]
2014-12-04 10:02:14 +00:00
Romain Quetiez
b822cff269 Instrumented the code to ease the troubleshooting of the computing of working hours
SVN:trunk[3425]
2014-11-25 15:25:28 +00:00
Romain Quetiez
f4b10d3e81 #1022 Do cascade the resolution of an incident to its child requests + rework of the lifecycle/actions to ease the extensibility (New handlers: Rest, Copy, SetCurrentDate, SetCurrentUser, SetElapsedTime)
SVN:trunk[3423]
2014-11-19 09:44:52 +00:00
Romain Quetiez
f45c783396 #965 Since 2.0.3, for each synchronized object, around 100 queries are performed (2 are required), and this is multiplied be the number of duplicate replicas (then resulting in a significant slowdown).
SVN:trunk[3380]
2014-10-28 08:53:30 +00:00
Denis Flaven
fd9008a163 New concept in the XML: HighlightScale to avoid overloading GetIcon and GetHilightClass...
SVN:trunk[3291]
2014-07-28 15:16:16 +00:00
Romain Quetiez
d2961c585e #926 JSON/REST Delete: nasty report
SVN:trunk[3200]
2014-06-06 09:50:57 +00:00
Romain Quetiez
d7ba4166e5 #919 Circular references between tickets (parent/child). Protect the framework against infinite recursions on cascaded updates (done at the DBUpdate level).
SVN:trunk[3190]
2014-06-03 18:05:31 +00:00
Romain Quetiez
92b2131d3b #483 Added placeholders for the notifications: html(caselog), head_html(caselog), html(linkset). The HTML can be customized. Fixes the issue about lines being wrapped in a curious way (root cause: swift mailer).
SVN:trunk[3167]
2014-05-23 12:32:08 +00:00
Denis Flaven
196fba7d81 Implement the iDisplay interface on any class derived from DBObject, but also limit the possible actions on such objects (disable edition)
SVN:trunk[3156]
2014-05-16 05:01:45 +00:00
Denis Flaven
9ed5ceb11e Fix for a regression introduced by [3149]
SVN:trunk[3153]
2014-05-14 13:47:40 +00:00
Denis Flaven
389b97dc50 Two experimental perf. enhancements:
- maintain list the attributes (potentially) modified to speed-up ListChanges() by avoiding a systematic comparison between the content of linkedsets.
- cache the list of SynchroDataSources and use this in InSyncScope() to avoid searching in the SynchroReplicas when it's not needed...

Depending on the configuration, these optimizations may speed-up the CSV import by up to 40% !!

SVN:trunk[3149]
2014-05-06 15:45:04 +00:00
Denis Flaven
d950422912 #867 (and #907 as a dup') De-harcode set_time_limit (per loop) in lengthy operations. Default value is 30 seconds (per loop), configurable via the new parameter "max_execution_time_per_loop", instead of 5 seconds previously.
SVN:trunk[3144]
2014-05-06 14:09:55 +00:00
Denis Flaven
2574a0c8a4 #887 short term fix for preventing ToArgs to alter the content of an object...
SVN:trunk[3095]
2014-03-04 13:58:28 +00:00
Romain Quetiez
6334370ef0 Optimization: map the extended attribute code to the corresponding external field when this if possible (ex: org_id->name to org_name); this reduces the number of queries, in particular when using the "export CSV" menu on a list.
SVN:trunk[3069]
2014-02-03 14:35:05 +00:00
Romain Quetiez
96c1ec42ed Internal: API to build the SQL statements to (re)-create an object
SVN:trunk[3017]
2013-12-03 09:59:42 +00:00
Romain Quetiez
36149df584 Extensibility: make sure that checks implemented in an overload of CheckToWrite will be seen when parent::CheckToWrite is invoked at the end of the overload
SVN:trunk[2978]
2013-11-21 16:30:58 +00:00
Denis Flaven
272a249d14 #805 Use a mutex to turn the insertion of a new ticket into an atomic operation
SVN:trunk[2953]
2013-10-24 09:15:41 +00:00
Romain Quetiez
f0c66be7cd #783, #233 and #466 The recent revision (2921 for ticket #783) introduced a significant slow down when performing CSV import (but not only). This new revision does suppress the regression, and even speeds up bulk updates in general. This revision is candidate for retrofit into branch 2.0.1 (along with 2921)
SVN:trunk[2948]
2013-10-22 12:46:09 +00:00
Romain Quetiez
20ba6242e7 No time limit for long operations like: Bulk delete, CSV import (interactive) and Bulk modify
SVN:trunk[2946]
2013-10-22 08:09:34 +00:00
Denis Flaven
36e6a6106b #757 Better UI to manage direct linksets... on going...
SVN:trunk[2927]
2013-10-18 08:26:31 +00:00