For the Drupal.org D7 port, we are using extended_file_field for the display of files in an issue node.

We need to add extended_file_field integration into pift if we want to display file status in the issue file table.

Comments

jthorson’s picture

StatusFileSize
new3.98 KB

Step 1: Basic data integration, with no custom formatters.

jthorson’s picture

StatusFileSize
new8.8 KB

Version 2: Data integration with custom formatters

jthorson’s picture

StatusFileSize
new8.82 KB

Cleanup of the patch from #2 ... this should give us something roughly equivalent with today, except for the css formatting.

jthorson’s picture

Patch in #3 committed to 7.x-2.x: http://drupalcode.org/project/project_issue_file_test.git/commit/95fff2c...

Leaving open for many further refinements.

dww’s picture

Mostly looks good on a quick visual inspection. A few minor nits:

+ return l(t('View details'), variable_get('pift_server', 'http://example.com') . 'pifr/test/' . check_plain($test_id));

A) l() already does check_plain() on the path, so the check_plain() call here (and nearby in the patch) is unnecessary (and in the bizzarre case that $test_id had an & or something, would lead to double-escaping and brokenness).

If $test_id is always supposed to be an int, you could cast it to an int here if you wanted to be extra careful, but again, not really needed. ;)

B) Is the pift_server setting supposed to have a trailing slash? Do we enforce that? If it's not defined, this would lead to a URL like http://example.compifr/test/1. Seems like we want
variable_get('pift_server', 'http://example.com') . '/pifr/test/' ... (with a leading slash in front of '/pifr/test/' no?

--

The bigger question is how this integration will actually work on d.o -- namely, are we just doing N more columns in the attachments table, or are we trying to do a multi-row thing? If multi-row, how is that going to work? ;) And is any of this being configured on rebuilds (and if so, where)?

Thanks!
-Derek

jthorson’s picture

Currently, it's built as columns ... only because that's how I did it before the mockup discussion, and haven't revisited it yet.

As for configuration on rebuilds, I'm thinking this is drupalorg territory ... but to answer your question, it's not happening yet. Baby steps first ... PIFT 7.x-2.x-alpha1 hasn't been merged into bzr yet. ;)

jthorson’s picture

Status: Active » Fixed

a) and b) were fixed a while back.

The columns aren't currently being configured on rebuilds; but this configuration also isn't going to exist once the code is refactored to add test results in rows instead of columns.

With that in mind, I'm going to close this off as fixed, since we've actually had basic integration for a number of weeks, and there's no need to artificially inflate the issue counts!

The refactoring of test data into rows instead of columns is also listed as a task in #1979574: Testbot info display on issues, and will be chased there.

Automatically closed -- issue fixed for 2 weeks with no activity.