Anonymous Login
2022-09-26 15:33 PDT

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0000398v1.3 Release (Closed)[All Projects] Generalpublic2010-03-31 22:43
Assigned Tocaseydk 
Product Version 
Target VersionFixed in Version1.3 
Summary0000398: file_show_attr function doesn't get file version and category values
DescriptionWhen editing or checking back in a file, version and category get lost and causes either data loss in database when updading or a crash when checking in because these values are null.
TagsNo tags attached.
Attached Files




caseydk (administrator)

Could you check this one in the latest nightly snapshots? I think we already have this covered.


egemme (reporter)

I did sync with the latest SVN and didn't see any changes to files/files.class.php nor files/addedit.php therefore didn't see any relief.

files.class.php is supposed to carry $obj object down to the file_show_attr function thru Globals, but $obj seems null. The only place I see $obj is being populated is in addedit.php around line 40. This piece of code looks weird to me because I don't know the behavior of the restoreObject method.

$file = new CFile();
$obj = $AppUI->restoreObject();
if ($obj) {
  $file = $obj;
  $file_id = $file->file_id;
} else {

I looked in the SVN history of addedit.php and this seems it has been reworked by you in r795. Prior to this, it used to work.


egemme (reporter)

I just did a little experiment with the file_show_attr function. In the global statement, I replaced the $obj by $file, then all the $obj references by $file in the code. file_show_attr is only used by addedit.php anyway, so I couldn't break very much code. Now the addedit doesn't loose values anymore. However,

I'm questionning the use of file_show_attr which naming convention seems out of the track and which purpose is only to hide a little complex logic regarding whether or not edits should be protected whenever a file is co. I could have been relocated in addedit therefore eliminate this funky and quite heavy global statement at the beginning of the function. I don't know at all, just asking. This looks like an heritage of dP.


caseydk (administrator)

I came to a similar conclusion... yes, we have a few crazy uncles in our family tree.

In the meantime, I've written a simple patch for this one (committing once I fix some conflicts) and we'll look at cleaning this up for v2.0.

If you have a proposal for cleanup, please share. If you get brave, you can check out our git repository and try to make the changes yourself - :)


egemme (reporter)

You openned me a door for a question. I noticed you are now working with git when I started to see .gitignore files. What's your statement regarding SVN? Are you actually dropping it? Also, which IDE do you use and which git plugin? Although I know its existence, I strictly don't know anything about git features and how to use it. I would appreciate a clue.

As for reworking the file attributes query, I'm not sure I would since I did some tweaks here and there and must be very carefull when retrofitting my code into a sharable state. For instance, I always found the file list a little too fat and dropped few columns such as the description and the task name so each file now stands on a single line. I plan to move the file description to a floating hint like you used so well in the project and task modules. It's not yet done, but I target a very lean but functional list.


caseydk (administrator)

With respect to git:

On the columns part, I'm working on some code to allow the columns on each module's List screen to be configurable. :)


caseydk (administrator)

Resolved as described in r984


caseydk (administrator)

Closed in v1.3 release.

-Issue History
Date Modified Username Field Change
2010-03-26 15:16 egemme New Issue
2010-03-27 05:14 caseydk Note Added: 0000774
2010-03-27 05:14 caseydk Status new => feedback
2010-03-28 04:53 egemme Note Added: 0000780
2010-03-28 05:00 caseydk Status feedback => assigned
2010-03-28 05:00 caseydk Assigned To => caseydk
2010-03-28 05:24 egemme Note Added: 0000781
2010-03-28 09:13 caseydk Note Added: 0000782
2010-03-28 17:47 egemme Note Added: 0000783
2010-03-28 18:12 caseydk Note Added: 0000784
2010-03-28 21:49 caseydk Project v1.2 Release (Closed) => v1.3 Release (Closed)
2010-03-28 21:49 caseydk Note Added: 0000785
2010-03-28 21:49 caseydk Status assigned => resolved
2010-03-28 21:49 caseydk Resolution open => fixed
2010-03-31 22:43 caseydk Note Added: 0000809
2010-03-31 22:43 caseydk Status resolved => closed
2010-03-31 22:43 caseydk Fixed in Version => 1.3
+Issue History