In-Portal Issue Tracker

Welcome to the In-Portal Open Source CMS Issue Tracker! This is a central management / tracking tool for all types of tasks / issues / bugs for the In-Portal Project. Before reporting any issues, please make sure to read the Guide into Issue Tracker and How to Properly Test and Report Bugs!

Viewing Issue Advanced Details Jump to Notes ] Wiki ] View Simple ] Issue History ] Print ]
ID Category Type Reproducibility Date Submitted Last Update
0000614 [In-Portal CMS] Data Management feature request always 2010-03-14 14:46 2010-07-22 15:06
Reporter alex View Status public Project Name In-Portal CMS
Assigned To alex Developer
Priority normal Resolution fixed Platform
Status closed   OS
  OS Version
ETA none Fixed in Version 5.1.0-B1 Product Version 5.0.2
  Target Version 5.1.0 Product Build
Time EstimateNo estimate
Summary 0000614: Ability to load kDBItem class object from hash
Description Hi, I think, that we should add LoadFromHash (or something similar) method to kDBItem class. This method will allow use to simulate actual Load method, but data will be retrieved from given field set and not from database. This is not just call of SetDBFieldsFromHash as it might seem. Such method also calls OnBefore/OnAfter events and sets original field values and item ID. This method could be useful during import operations.
Steps To Reproduce
Additional Information
Tags No tags attached.
Reference http://groups.google.com/group/in-portal-dev/browse_thread/thread/7f1644d3dff4ecd4
Change Log Message Ability to load an Object from hash fields
Estimate Points 0
Attached Files patch file icon load_item_from_hash.patch [^] (873 bytes) 2010-03-14 14:46 [Show Content]
patch file icon load_item_from_hash_v2.patch [^] (1,053 bytes) 2010-05-01 08:15 [Show Content]

- Relationships Relation Graph ] Dependency Graph ]
related to 0000642closed (5.0.4)alex In-Commerce Notice about undefined field "File5" on product update 
related to 0000472closed (5.1.0)alex In-Portal CMS Domain-based site auto-configuration 
related to 0000907closed (5.1.3)alex In-Bulletin Tag "bb-post_PosterField" doesn't work with custom fields 

-  Notes
User avatar (0001596)
Dmitry (manager)
2010-03-14 15:42

Reminder sent to: alex

Hi Alex,


Would you please post a quick test scenario here. I guess we would need too imitate this part?


DA
User avatar (0001597)
alex (manager)
2010-03-14 16:02

Here testing code:

$normal_object =& $this->Application->recallObject('widget', null, Array ('skip_autoload' => true));
$normal_object->Load(5);

$improvised_object =& $this->Application->recallObject('widget', null, Array ('skip_autoload' => true));
$improvised_object->LoadFromHash( $normal_object->GetFieldValues() );

As the result both object should look same inside.
User avatar (0001779)
Dmitry (manager)
2010-04-04 18:23

Patch tested Good!
User avatar (0002029)
alex (manager)
2010-05-01 08:00

Moving to 5.1.0 since needed by Site Domain functionality (task: 0000472)
User avatar (0002030)
alex (manager)
2010-05-01 08:16

Problems found:
1. Doesn't process cases, when load could fail
2. Doesn't return true on successful load
User avatar (0002031)
alex (manager)
2010-05-01 08:17

Problems, described in comment above fixed. Please test.
User avatar (0002032)
Dmitry (manager)
2010-05-01 10:01

Tested good on 5.1.0.

Please commit.
User avatar (0002033)
alex (manager)
2010-05-01 11:17

Fix committed to 5.1.x branch. Commit Message:

Fixes 0000614: Ability to load kDBItem class object from hash
User avatar (0002537)
alex (manager)
2010-07-22 15:06

Closing, since 5.1.0 release has been released.

- Related Changesets
In-Portal CMS: 5.1.x r13474
Timestamp: 2010-05-01 11:17:56
Author: alex
Details ] Diff ]
Fixes 0000614: Ability to load kDBItem class object from hash
mod - /in-portal/branches/5.1.x/core/kernel/db/dbitem.php Diff ] File ]

- Issue History
Date Modified Username Field Change
2011-05-23 02:45 alex Relationship added related to 0000907
2010-07-22 15:06 alex Note Added: 0002537
2010-07-22 15:06 alex Status resolved => closed
2010-05-01 11:17 alex Note Added: 0002033
2010-05-01 11:17 alex Status reviewed and tested => resolved
2010-05-01 11:17 alex Fixed in Version => 5.1.0-B1
2010-05-01 11:17 alex Resolution open => fixed
2010-05-01 11:17 alex Changeset attached 5.1.x r13474
2010-05-01 10:03 Dmitry Change Log Message => Ability to load an Object from hash fields
2010-05-01 10:03 Dmitry Type bug report => feature request
2010-05-01 10:01 Dmitry Note Added: 0002032
2010-05-01 10:01 Dmitry Assigned To !COMMUNITY => alex
2010-05-01 10:01 Dmitry Status needs testing => reviewed and tested
2010-05-01 08:17 alex Note Added: 0002031
2010-05-01 08:17 alex Assigned To alex => !COMMUNITY
2010-05-01 08:17 alex Status needs work => needs testing
2010-05-01 08:16 alex Note Added: 0002030
2010-05-01 08:16 alex Assigned To !COMMUNITY => alex
2010-05-01 08:16 alex Status reviewed and tested => needs work
2010-05-01 08:15 alex File Added: load_item_from_hash_v2.patch
2010-05-01 08:00 alex Note Added: 0002029
2010-05-01 08:00 alex Target Version Icebox => 5.1.0
2010-05-01 07:59 alex Relationship added related to 0000472
2010-04-04 18:23 Dmitry Note Added: 0001779
2010-04-04 18:23 Dmitry Status needs testing => reviewed and tested
2010-03-26 03:02 alex Relationship added related to 0000642
2010-03-14 16:02 alex Note Added: 0001597
2010-03-14 15:42 Dmitry Note Added: 0001596
2010-03-14 14:46 alex Assigned To => !COMMUNITY
2010-03-14 14:46 alex Developer => alex
2010-03-14 14:46 alex Status active => needs testing
2010-03-14 14:46 alex New Issue
2010-03-14 14:46 alex File Added: load_item_from_hash.patch
2010-03-14 14:46 alex Reference => http://groups.google.com/group/in-portal-dev/browse_thread/thread/7f1644d3dff4ecd4



Web Development by Intechnic
In-Portal Open Source CMS
In-Portal Open Source CMS
Copyright © 2000 - 2009 MantisBT Group

Powered by Mantis Bugtracker