Assign film submissions to drupal accounts if possible

Submitted by jamie on May 9, 2007 - 10:59am.
login or register to post comments
Submitted by dkg on May 10, 2007 - 5:04pm.

This is now done. every film proposal which has an e-mail address associated with an account is now linked with that account.

Here's how i did it:


CREATE OR REPLACE VIEW dkg_latest_film AS select MAX(vid) AS vid from
node_content_film_festival_submission GROUP BY nid;

CREATE OR REPLACE VIEW dkg_film AS SELECT * from
node_content_film_festival_submission JOIN dkg_latest_film USING
(vid);

CREATE OR REPLACE VIEW dkg_film_assignments AS SELECT nid, users.uid
FROM dkg_film JOIN node USING (nid) LEFT JOIN users ON
(field_film_contact_email_value = users.mail) WHERE node.uid = 0 AND
users.uid IS NOT NULL;

UPDATE node,dkg_film_assignments SET node.uid =
dkg_film_assignments.uid WHERE node.nid = dkg_film_assignments.nid;

DROP VIEW dkg_film_assignments;
DROP VIEW dkg_film;
DROP VIEW dkg_latest_film;


Submitted by dkg on May 22, 2007 - 12:40am.

I just re-ran the film assignment listed above, which appears to have tagged an additional 18 anonymous film proposals with their user accounts.

However, there appear to be many more anonymous film festival submissions remaining:

mysql> select COUNT(distinct nid) FROM node where type = 'content_film_festival_submission';
+---------------------+
| COUNT(distinct nid) |
+---------------------+
| 139 |
+---------------------+
1 row in set (0.02 sec)

mysql>


Submitted by dkg on May 22, 2007 - 12:44am.

techissue 3045 describes how we created accounts for missing users based on the submitted e-mails for the session proposals. It also describes some of the downsides of doing this.

If anyone thinks a comparable step should be taken for film festival submissions, please re-open this ticket (move workflow from "Accepted/Done" to "Pending") and explain why it's needed.