Problem/Motivation

D6 => D8 does have a mapping on file size, but it recalculated. D7 => D8 doesn't migrate the filesize, since it is re-calculated. And we feel that re-calculating the size is OK. I'll open a follow-up to make D6 migrate the same as D7.

Proposed resolution

Update the d6_file default template to match what we are doing in D7.

Remaining tasks

User interface changes

API changes

Data model changes

Comments

heddn created an issue. See original summary.

quietone’s picture

Issue tags: +migrate-d6-d8
shashikant_chauhan’s picture

Assigned: Unassigned » shashikant_chauhan
shashikant_chauhan’s picture

Status: Active » Needs review
StatusFileSize
new578 bytes

Adding patch.

heddn’s picture

Status: Needs review » Needs work
+++ b/core/modules/file/migration_templates/d6_file.yml
@@ -40,7 +40,9 @@ process:
+  # filesize is dynamically computed when file entities are saved, so there is

Small nit: Sentences should begin with a capital letter. Not sure if if it is possible, but it would be nice to fit this to < 80 characters. If not, no big deal either.

Lastly, can you dig up and paste into this issue what the comment is in D7? I'd like the keep the language between the two similar. That will help with the reviewing.

jofitz’s picture

Assigned: shashikant_chauhan » Unassigned
Status: Needs work » Needs review
StatusFileSize
new602 bytes
new578 bytes

I don't think it is possible to get all that information into 80 characters I'm afraid (I tried!).

Sentence capitalised.

Controversially(!) the sentence isn't capitalised in d7_file.yml:

  # filesize is dynamically computed when file entities are saved, so there is
  # no point in migrating it.
jofitz’s picture

StatusFileSize
new624 bytes
new547 bytes

I just took a second look at this and realised why the sentence shouldn't be capitalised - because "filesize" is the name of the variable. So I have re-jigged the sentence and made an attempt at getting it within 80 characters. Does it still make sense?

jofitz’s picture

I have opened a ticket to deal with the capitalisation of all comments in d6_file.yml and d7_file.yml - #2857681: Comments not starting with a capital letter in d6_file.yml & d7_file.yml. Whatever is decided here about the wording should be reflected there too.

quietone’s picture

Status: Needs review » Needs work

Since I wasn't sure about the use of the hyphen here. I checked http://www.grammarbook.com/punctuation/hyphens.asp
, which states, "Hyphens' main purpose is to glue words together.". That suggests that the use of the hyphen here is not correct. Perhaps a simple comma will do nicely.

+++ b/core/modules/file/migration_templates/d6_file.yml
@@ -40,7 +40,8 @@ process:
+  # No need to migrate filesize - it is computed when file entities are saved.

s/ - /, /

jofitz’s picture

Status: Needs work » Needs review
Issue tags: -Novice
StatusFileSize
new592 bytes
new546 bytes

If we were feeling extravagant, we could even use a semi-colon(!), but I agree a comma is best.

quietone’s picture

Status: Needs review » Reviewed & tested by the community

Sweet!

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed d65d76f to 8.4.x and 5142162 to 8.3.x. Thanks!

  • alexpott committed d65d76f on 8.4.x
    Issue #2857502 by Jo Fitzgerald, shashikant_chauhan, quietone, heddn:...

  • alexpott committed 5142162 on 8.3.x
    Issue #2857502 by Jo Fitzgerald, shashikant_chauhan, quietone, heddn:...

Status: Fixed » Closed (fixed)

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