From: SourceForge.net <no...@so...> - 2009-03-06 20:46:06
|
Bugs item #2669428, was opened at 2009-03-06 12:45 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=108956&aid=2669428&group_id=8956 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: kswartz (kswartz) Assigned to: Nobody/Anonymous (nobody) Summary: Copying an existing survey does not copy conditions Initial Comment: I'm working with version 2.0.2 of phpESP, and noticed that if you copy an existing survey, it copies everything BUT the conditions. If this isn't fixed in the latest version, please consider it for the next update. (If this IS fixed in 2.1.2, it will probably speed up my upgrade. Only reason I haven't so far is because I made a lot of changes and fixed some bugs in 2.0.2, and wasn't sure how long it would take to copy the changes over.) ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=108956&aid=2669428&group_id=8956 |
From: SourceForge.net <no...@so...> - 2009-03-06 23:40:53
|
Bugs item #2669428, was opened at 2009-03-06 21:45 Message generated for change (Comment added) made by liedekef You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=108956&aid=2669428&group_id=8956 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: kswartz (kswartz) Assigned to: Nobody/Anonymous (nobody) Summary: Copying an existing survey does not copy conditions Initial Comment: I'm working with version 2.0.2 of phpESP, and noticed that if you copy an existing survey, it copies everything BUT the conditions. If this isn't fixed in the latest version, please consider it for the next update. (If this IS fixed in 2.1.2, it will probably speed up my upgrade. Only reason I haven't so far is because I made a lot of changes and fixed some bugs in 2.0.2, and wasn't sure how long it would take to copy the changes over.) ---------------------------------------------------------------------- >Comment By: Franky Van Liedekerke (liedekef) Date: 2009-03-07 00:40 Message: Hi, sorry, but I don't think it is fixed in 2.1.2 (it was known to me though, and I'm pretty sure I documented it somewhere...) But feel free to make any contribution, be it patches, bug fixes, etc ... Franky ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=108956&aid=2669428&group_id=8956 |
From: SourceForge.net <no...@so...> - 2009-03-07 00:01:28
|
Bugs item #2669428, was opened at 2009-03-06 12:45 Message generated for change (Comment added) made by kswartz You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=108956&aid=2669428&group_id=8956 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: kswartz (kswartz) Assigned to: Nobody/Anonymous (nobody) Summary: Copying an existing survey does not copy conditions Initial Comment: I'm working with version 2.0.2 of phpESP, and noticed that if you copy an existing survey, it copies everything BUT the conditions. If this isn't fixed in the latest version, please consider it for the next update. (If this IS fixed in 2.1.2, it will probably speed up my upgrade. Only reason I haven't so far is because I made a lot of changes and fixed some bugs in 2.0.2, and wasn't sure how long it would take to copy the changes over.) ---------------------------------------------------------------------- >Comment By: kswartz (kswartz) Date: 2009-03-06 16:01 Message: That's cool - it's not a feature I use very often, which is why it took so long to say anything. Next time I go to do this, I'll add a comment to the request with the SQL necessary to do the copy (which is the hard part). If I have time to actually fix the code, I'll gladly supply a patch. (And yes, I'll upgrade to 2.1.2 first. :) ) ---------------------------------------------------------------------- Comment By: Franky Van Liedekerke (liedekef) Date: 2009-03-06 15:40 Message: Hi, sorry, but I don't think it is fixed in 2.1.2 (it was known to me though, and I'm pretty sure I documented it somewhere...) But feel free to make any contribution, be it patches, bug fixes, etc ... Franky ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=108956&aid=2669428&group_id=8956 |
From: SourceForge.net <no...@so...> - 2009-03-07 19:45:50
|
Bugs item #2669428, was opened at 2009-03-06 12:45 Message generated for change (Comment added) made by kswartz You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=108956&aid=2669428&group_id=8956 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: kswartz (kswartz) Assigned to: Nobody/Anonymous (nobody) Summary: Copying an existing survey does not copy conditions Initial Comment: I'm working with version 2.0.2 of phpESP, and noticed that if you copy an existing survey, it copies everything BUT the conditions. If this isn't fixed in the latest version, please consider it for the next update. (If this IS fixed in 2.1.2, it will probably speed up my upgrade. Only reason I haven't so far is because I made a lot of changes and fixed some bugs in 2.0.2, and wasn't sure how long it would take to copy the changes over.) ---------------------------------------------------------------------- >Comment By: kswartz (kswartz) Date: 2009-03-07 11:45 Message: Okay, I've set up 2.1.2, and I may have a patch for this coming, but I've discovered a weird quirk that's affecting the SQL. The starting position for all my surveys (in the question table) is 0. However, when I copy a survey, the starting position is 1. Is that intended behavior? Can I always assume that the value of "position" for a question in a copied survey is always one greater than its counterpart in the original survey? ---------------------------------------------------------------------- Comment By: kswartz (kswartz) Date: 2009-03-06 16:01 Message: That's cool - it's not a feature I use very often, which is why it took so long to say anything. Next time I go to do this, I'll add a comment to the request with the SQL necessary to do the copy (which is the hard part). If I have time to actually fix the code, I'll gladly supply a patch. (And yes, I'll upgrade to 2.1.2 first. :) ) ---------------------------------------------------------------------- Comment By: Franky Van Liedekerke (liedekef) Date: 2009-03-06 15:40 Message: Hi, sorry, but I don't think it is fixed in 2.1.2 (it was known to me though, and I'm pretty sure I documented it somewhere...) But feel free to make any contribution, be it patches, bug fixes, etc ... Franky ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=108956&aid=2669428&group_id=8956 |
From: SourceForge.net <no...@so...> - 2009-03-08 04:24:22
|
Bugs item #2669428, was opened at 2009-03-06 12:45 Message generated for change (Comment added) made by kswartz You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=108956&aid=2669428&group_id=8956 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: kswartz (kswartz) Assigned to: Nobody/Anonymous (nobody) Summary: Copying an existing survey does not copy conditions Initial Comment: I'm working with version 2.0.2 of phpESP, and noticed that if you copy an existing survey, it copies everything BUT the conditions. If this isn't fixed in the latest version, please consider it for the next update. (If this IS fixed in 2.1.2, it will probably speed up my upgrade. Only reason I haven't so far is because I made a lot of changes and fixed some bugs in 2.0.2, and wasn't sure how long it would take to copy the changes over.) ---------------------------------------------------------------------- >Comment By: kswartz (kswartz) Date: 2009-03-07 20:24 Message: Okay, I've set up 2.1.2, and I may have a patch for this coming, but I've discovered a weird quirk that's affecting the SQL. The starting position for all my surveys (in the question table) is 0. However, when I copy a survey, the starting position is 1. Is that intended behavior? Can I always assume that the value of "position" for a question in a copied survey is always one greater than its counterpart in the original survey? ---------------------------------------------------------------------- Comment By: kswartz (kswartz) Date: 2009-03-07 11:45 Message: Okay, I've set up 2.1.2, and I may have a patch for this coming, but I've discovered a weird quirk that's affecting the SQL. The starting position for all my surveys (in the question table) is 0. However, when I copy a survey, the starting position is 1. Is that intended behavior? Can I always assume that the value of "position" for a question in a copied survey is always one greater than its counterpart in the original survey? ---------------------------------------------------------------------- Comment By: kswartz (kswartz) Date: 2009-03-06 16:01 Message: That's cool - it's not a feature I use very often, which is why it took so long to say anything. Next time I go to do this, I'll add a comment to the request with the SQL necessary to do the copy (which is the hard part). If I have time to actually fix the code, I'll gladly supply a patch. (And yes, I'll upgrade to 2.1.2 first. :) ) ---------------------------------------------------------------------- Comment By: Franky Van Liedekerke (liedekef) Date: 2009-03-06 15:40 Message: Hi, sorry, but I don't think it is fixed in 2.1.2 (it was known to me though, and I'm pretty sure I documented it somewhere...) But feel free to make any contribution, be it patches, bug fixes, etc ... Franky ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=108956&aid=2669428&group_id=8956 |
From: SourceForge.net <no...@so...> - 2009-03-08 05:23:57
|
Bugs item #2669428, was opened at 2009-03-06 12:45 Message generated for change (Comment added) made by kswartz You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=108956&aid=2669428&group_id=8956 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: kswartz (kswartz) Assigned to: Nobody/Anonymous (nobody) Summary: Copying an existing survey does not copy conditions Initial Comment: I'm working with version 2.0.2 of phpESP, and noticed that if you copy an existing survey, it copies everything BUT the conditions. If this isn't fixed in the latest version, please consider it for the next update. (If this IS fixed in 2.1.2, it will probably speed up my upgrade. Only reason I haven't so far is because I made a lot of changes and fixed some bugs in 2.0.2, and wasn't sure how long it would take to copy the changes over.) ---------------------------------------------------------------------- >Comment By: kswartz (kswartz) Date: 2009-03-07 21:23 Message: (Sorry for the double post before.) Okay, I've looked at survey_aggregate.inc, and I think what I described previously is actually a bug. I've logged a separate bug for this. With that fix in place, this is the SQL I used to copy the conditions from the old survey to the new survey: INSERT INTO conditions (id,survey_id,q1_id,q2_id,cond,cond_value) SELECT NULL, $new_survey_id, qnew1.id, qnew2.id, cond, cond_value FROM question qold1, question qold2, question qnew1, question qnew2, conditions c WHERE qold1.id=c.q1_id AND qold2.id=c.q2_id AND qnew1.survey_id=$new_survey_id AND qnew1.position=qold1.position AND qnew1.deleted=qold1.deleted AND qnew2.survey_id=$new_survey_id AND qnew2.position=qold2.position AND qnew2.deleted=qold2.deleted; I'll work on producing a patch that incorporates this into survey_aggregate.inc Incidentally, I'm not sure why you chose to insert the questions one at a time while cycling through the results of a select. I think all the changes you made to the old data could have been made in SQL. I elected to do an INSERT INTO ... SELECT FROM ... instead, as you can see, as it's much faster. ---------------------------------------------------------------------- Comment By: kswartz (kswartz) Date: 2009-03-07 20:24 Message: Okay, I've set up 2.1.2, and I may have a patch for this coming, but I've discovered a weird quirk that's affecting the SQL. The starting position for all my surveys (in the question table) is 0. However, when I copy a survey, the starting position is 1. Is that intended behavior? Can I always assume that the value of "position" for a question in a copied survey is always one greater than its counterpart in the original survey? ---------------------------------------------------------------------- Comment By: kswartz (kswartz) Date: 2009-03-07 11:45 Message: Okay, I've set up 2.1.2, and I may have a patch for this coming, but I've discovered a weird quirk that's affecting the SQL. The starting position for all my surveys (in the question table) is 0. However, when I copy a survey, the starting position is 1. Is that intended behavior? Can I always assume that the value of "position" for a question in a copied survey is always one greater than its counterpart in the original survey? ---------------------------------------------------------------------- Comment By: kswartz (kswartz) Date: 2009-03-06 16:01 Message: That's cool - it's not a feature I use very often, which is why it took so long to say anything. Next time I go to do this, I'll add a comment to the request with the SQL necessary to do the copy (which is the hard part). If I have time to actually fix the code, I'll gladly supply a patch. (And yes, I'll upgrade to 2.1.2 first. :) ) ---------------------------------------------------------------------- Comment By: Franky Van Liedekerke (liedekef) Date: 2009-03-06 15:40 Message: Hi, sorry, but I don't think it is fixed in 2.1.2 (it was known to me though, and I'm pretty sure I documented it somewhere...) But feel free to make any contribution, be it patches, bug fixes, etc ... Franky ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=108956&aid=2669428&group_id=8956 |
From: SourceForge.net <no...@so...> - 2009-04-09 21:18:33
|
Bugs item #2669428, was opened at 2009-03-06 20:45 Message generated for change (Comment added) made by nobody You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=108956&aid=2669428&group_id=8956 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: kswartz (kswartz) Assigned to: Nobody/Anonymous (nobody) Summary: Copying an existing survey does not copy conditions Initial Comment: I'm working with version 2.0.2 of phpESP, and noticed that if you copy an existing survey, it copies everything BUT the conditions. If this isn't fixed in the latest version, please consider it for the next update. (If this IS fixed in 2.1.2, it will probably speed up my upgrade. Only reason I haven't so far is because I made a lot of changes and fixed some bugs in 2.0.2, and wasn't sure how long it would take to copy the changes over.) ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2009-04-09 21:18 Message: Sorry, the SQL in the last update was missing a line. It should read: INSERT INTO conditions (id,survey_id,q1_id,q2_id,cond,cond_value) SELECT NULL, $new_survey_id, qnew1.id, qnew2.id, cond, cond_value FROM question qold1, question qold2, question qnew1, question qnew2, conditions c WHERE qold1.id=c.q1_id AND qold2.id=c.q2_id AND qold1.survey_id=3 and qold2.survey_id=3 AND qnew1.survey_id=$new_survey_id AND qnew1.position=qold1.position AND qnew1.deleted=qold1.deleted AND qnew2.survey_id=$new_survey_id AND qnew2.position=qold2.position AND qnew2.deleted=qold2.deleted; Just a reminder, too, this enhancement REQUIRES the fix to 2672129 also (which makes copied surveys start with the same position as the original). This SQL cannot be manually applied to previously copied surveys unless the positions between the original and copy are re-aligned by hand, which may or may not be part of the fix to 2672129. (Probably not.) ---------------------------------------------------------------------- Comment By: kswartz (kswartz) Date: 2009-03-08 05:23 Message: (Sorry for the double post before.) Okay, I've looked at survey_aggregate.inc, and I think what I described previously is actually a bug. I've logged a separate bug for this. With that fix in place, this is the SQL I used to copy the conditions from the old survey to the new survey: INSERT INTO conditions (id,survey_id,q1_id,q2_id,cond,cond_value) SELECT NULL, $new_survey_id, qnew1.id, qnew2.id, cond, cond_value FROM question qold1, question qold2, question qnew1, question qnew2, conditions c WHERE qold1.id=c.q1_id AND qold2.id=c.q2_id AND qnew1.survey_id=$new_survey_id AND qnew1.position=qold1.position AND qnew1.deleted=qold1.deleted AND qnew2.survey_id=$new_survey_id AND qnew2.position=qold2.position AND qnew2.deleted=qold2.deleted; I'll work on producing a patch that incorporates this into survey_aggregate.inc Incidentally, I'm not sure why you chose to insert the questions one at a time while cycling through the results of a select. I think all the changes you made to the old data could have been made in SQL. I elected to do an INSERT INTO ... SELECT FROM ... instead, as you can see, as it's much faster. ---------------------------------------------------------------------- Comment By: kswartz (kswartz) Date: 2009-03-08 04:24 Message: Okay, I've set up 2.1.2, and I may have a patch for this coming, but I've discovered a weird quirk that's affecting the SQL. The starting position for all my surveys (in the question table) is 0. However, when I copy a survey, the starting position is 1. Is that intended behavior? Can I always assume that the value of "position" for a question in a copied survey is always one greater than its counterpart in the original survey? ---------------------------------------------------------------------- Comment By: kswartz (kswartz) Date: 2009-03-07 19:45 Message: Okay, I've set up 2.1.2, and I may have a patch for this coming, but I've discovered a weird quirk that's affecting the SQL. The starting position for all my surveys (in the question table) is 0. However, when I copy a survey, the starting position is 1. Is that intended behavior? Can I always assume that the value of "position" for a question in a copied survey is always one greater than its counterpart in the original survey? ---------------------------------------------------------------------- Comment By: kswartz (kswartz) Date: 2009-03-07 00:01 Message: That's cool - it's not a feature I use very often, which is why it took so long to say anything. Next time I go to do this, I'll add a comment to the request with the SQL necessary to do the copy (which is the hard part). If I have time to actually fix the code, I'll gladly supply a patch. (And yes, I'll upgrade to 2.1.2 first. :) ) ---------------------------------------------------------------------- Comment By: Franky Van Liedekerke (liedekef) Date: 2009-03-06 23:40 Message: Hi, sorry, but I don't think it is fixed in 2.1.2 (it was known to me though, and I'm pretty sure I documented it somewhere...) But feel free to make any contribution, be it patches, bug fixes, etc ... Franky ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=108956&aid=2669428&group_id=8956 |
From: SourceForge.net <no...@so...> - 2009-04-09 21:20:07
|
Bugs item #2669428, was opened at 2009-03-06 20:45 Message generated for change (Comment added) made by nobody You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=108956&aid=2669428&group_id=8956 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: kswartz (kswartz) Assigned to: Nobody/Anonymous (nobody) Summary: Copying an existing survey does not copy conditions Initial Comment: I'm working with version 2.0.2 of phpESP, and noticed that if you copy an existing survey, it copies everything BUT the conditions. If this isn't fixed in the latest version, please consider it for the next update. (If this IS fixed in 2.1.2, it will probably speed up my upgrade. Only reason I haven't so far is because I made a lot of changes and fixed some bugs in 2.0.2, and wasn't sure how long it would take to copy the changes over.) ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2009-04-09 21:20 Message: Crap, another typo! Man, I wish I could edit these posts. One more time: INSERT INTO conditions (id,survey_id,q1_id,q2_id,cond,cond_value) SELECT NULL, 11, qnew1.id, qnew2.id, cond, cond_value FROM question qold1, question qold2, question qnew1, question qnew2, conditions c WHERE qold1.id=c.q1_id AND qold2.id=c.q2_id AND qold1.survey_id=$old_survey_id and qold2.survey_id=$old_survey_id AND qnew1.survey_id=$new_survey_id AND qnew1.position=qold1.position AND qnew1.deleted=qold1.deleted AND qnew2.survey_id=$new_survey_id AND qnew2.position=qold2.position AND qnew2.deleted=qold2.deleted; ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2009-04-09 21:18 Message: Sorry, the SQL in the last update was missing a line. It should read: INSERT INTO conditions (id,survey_id,q1_id,q2_id,cond,cond_value) SELECT NULL, $new_survey_id, qnew1.id, qnew2.id, cond, cond_value FROM question qold1, question qold2, question qnew1, question qnew2, conditions c WHERE qold1.id=c.q1_id AND qold2.id=c.q2_id AND qold1.survey_id=3 and qold2.survey_id=3 AND qnew1.survey_id=$new_survey_id AND qnew1.position=qold1.position AND qnew1.deleted=qold1.deleted AND qnew2.survey_id=$new_survey_id AND qnew2.position=qold2.position AND qnew2.deleted=qold2.deleted; Just a reminder, too, this enhancement REQUIRES the fix to 2672129 also (which makes copied surveys start with the same position as the original). This SQL cannot be manually applied to previously copied surveys unless the positions between the original and copy are re-aligned by hand, which may or may not be part of the fix to 2672129. (Probably not.) ---------------------------------------------------------------------- Comment By: kswartz (kswartz) Date: 2009-03-08 05:23 Message: (Sorry for the double post before.) Okay, I've looked at survey_aggregate.inc, and I think what I described previously is actually a bug. I've logged a separate bug for this. With that fix in place, this is the SQL I used to copy the conditions from the old survey to the new survey: INSERT INTO conditions (id,survey_id,q1_id,q2_id,cond,cond_value) SELECT NULL, $new_survey_id, qnew1.id, qnew2.id, cond, cond_value FROM question qold1, question qold2, question qnew1, question qnew2, conditions c WHERE qold1.id=c.q1_id AND qold2.id=c.q2_id AND qnew1.survey_id=$new_survey_id AND qnew1.position=qold1.position AND qnew1.deleted=qold1.deleted AND qnew2.survey_id=$new_survey_id AND qnew2.position=qold2.position AND qnew2.deleted=qold2.deleted; I'll work on producing a patch that incorporates this into survey_aggregate.inc Incidentally, I'm not sure why you chose to insert the questions one at a time while cycling through the results of a select. I think all the changes you made to the old data could have been made in SQL. I elected to do an INSERT INTO ... SELECT FROM ... instead, as you can see, as it's much faster. ---------------------------------------------------------------------- Comment By: kswartz (kswartz) Date: 2009-03-08 04:24 Message: Okay, I've set up 2.1.2, and I may have a patch for this coming, but I've discovered a weird quirk that's affecting the SQL. The starting position for all my surveys (in the question table) is 0. However, when I copy a survey, the starting position is 1. Is that intended behavior? Can I always assume that the value of "position" for a question in a copied survey is always one greater than its counterpart in the original survey? ---------------------------------------------------------------------- Comment By: kswartz (kswartz) Date: 2009-03-07 19:45 Message: Okay, I've set up 2.1.2, and I may have a patch for this coming, but I've discovered a weird quirk that's affecting the SQL. The starting position for all my surveys (in the question table) is 0. However, when I copy a survey, the starting position is 1. Is that intended behavior? Can I always assume that the value of "position" for a question in a copied survey is always one greater than its counterpart in the original survey? ---------------------------------------------------------------------- Comment By: kswartz (kswartz) Date: 2009-03-07 00:01 Message: That's cool - it's not a feature I use very often, which is why it took so long to say anything. Next time I go to do this, I'll add a comment to the request with the SQL necessary to do the copy (which is the hard part). If I have time to actually fix the code, I'll gladly supply a patch. (And yes, I'll upgrade to 2.1.2 first. :) ) ---------------------------------------------------------------------- Comment By: Franky Van Liedekerke (liedekef) Date: 2009-03-06 23:40 Message: Hi, sorry, but I don't think it is fixed in 2.1.2 (it was known to me though, and I'm pretty sure I documented it somewhere...) But feel free to make any contribution, be it patches, bug fixes, etc ... Franky ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=108956&aid=2669428&group_id=8956 |
From: SourceForge.net <no...@so...> - 2009-04-09 21:33:54
|
Bugs item #2669428, was opened at 2009-03-06 21:45 Message generated for change (Comment added) made by liedekef You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=108956&aid=2669428&group_id=8956 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: kswartz (kswartz) >Assigned to: bishop (bishopb) Summary: Copying an existing survey does not copy conditions Initial Comment: I'm working with version 2.0.2 of phpESP, and noticed that if you copy an existing survey, it copies everything BUT the conditions. If this isn't fixed in the latest version, please consider it for the next update. (If this IS fixed in 2.1.2, it will probably speed up my upgrade. Only reason I haven't so far is because I made a lot of changes and fixed some bugs in 2.0.2, and wasn't sure how long it would take to copy the changes over.) ---------------------------------------------------------------------- >Comment By: Franky Van Liedekerke (liedekef) Date: 2009-04-09 23:33 Message: I'm assigning this to Bishop as well, but I'm really planning on releasing a new version after this fix (seems good enough reasons/bugfixes exist now). So Bishop, I don't know if you have the time to look at this and 2672129 any time soon? Franky ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2009-04-09 23:20 Message: Crap, another typo! Man, I wish I could edit these posts. One more time: INSERT INTO conditions (id,survey_id,q1_id,q2_id,cond,cond_value) SELECT NULL, 11, qnew1.id, qnew2.id, cond, cond_value FROM question qold1, question qold2, question qnew1, question qnew2, conditions c WHERE qold1.id=c.q1_id AND qold2.id=c.q2_id AND qold1.survey_id=$old_survey_id and qold2.survey_id=$old_survey_id AND qnew1.survey_id=$new_survey_id AND qnew1.position=qold1.position AND qnew1.deleted=qold1.deleted AND qnew2.survey_id=$new_survey_id AND qnew2.position=qold2.position AND qnew2.deleted=qold2.deleted; ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2009-04-09 23:18 Message: Sorry, the SQL in the last update was missing a line. It should read: INSERT INTO conditions (id,survey_id,q1_id,q2_id,cond,cond_value) SELECT NULL, $new_survey_id, qnew1.id, qnew2.id, cond, cond_value FROM question qold1, question qold2, question qnew1, question qnew2, conditions c WHERE qold1.id=c.q1_id AND qold2.id=c.q2_id AND qold1.survey_id=3 and qold2.survey_id=3 AND qnew1.survey_id=$new_survey_id AND qnew1.position=qold1.position AND qnew1.deleted=qold1.deleted AND qnew2.survey_id=$new_survey_id AND qnew2.position=qold2.position AND qnew2.deleted=qold2.deleted; Just a reminder, too, this enhancement REQUIRES the fix to 2672129 also (which makes copied surveys start with the same position as the original). This SQL cannot be manually applied to previously copied surveys unless the positions between the original and copy are re-aligned by hand, which may or may not be part of the fix to 2672129. (Probably not.) ---------------------------------------------------------------------- Comment By: kswartz (kswartz) Date: 2009-03-08 06:23 Message: (Sorry for the double post before.) Okay, I've looked at survey_aggregate.inc, and I think what I described previously is actually a bug. I've logged a separate bug for this. With that fix in place, this is the SQL I used to copy the conditions from the old survey to the new survey: INSERT INTO conditions (id,survey_id,q1_id,q2_id,cond,cond_value) SELECT NULL, $new_survey_id, qnew1.id, qnew2.id, cond, cond_value FROM question qold1, question qold2, question qnew1, question qnew2, conditions c WHERE qold1.id=c.q1_id AND qold2.id=c.q2_id AND qnew1.survey_id=$new_survey_id AND qnew1.position=qold1.position AND qnew1.deleted=qold1.deleted AND qnew2.survey_id=$new_survey_id AND qnew2.position=qold2.position AND qnew2.deleted=qold2.deleted; I'll work on producing a patch that incorporates this into survey_aggregate.inc Incidentally, I'm not sure why you chose to insert the questions one at a time while cycling through the results of a select. I think all the changes you made to the old data could have been made in SQL. I elected to do an INSERT INTO ... SELECT FROM ... instead, as you can see, as it's much faster. ---------------------------------------------------------------------- Comment By: kswartz (kswartz) Date: 2009-03-08 05:24 Message: Okay, I've set up 2.1.2, and I may have a patch for this coming, but I've discovered a weird quirk that's affecting the SQL. The starting position for all my surveys (in the question table) is 0. However, when I copy a survey, the starting position is 1. Is that intended behavior? Can I always assume that the value of "position" for a question in a copied survey is always one greater than its counterpart in the original survey? ---------------------------------------------------------------------- Comment By: kswartz (kswartz) Date: 2009-03-07 20:45 Message: Okay, I've set up 2.1.2, and I may have a patch for this coming, but I've discovered a weird quirk that's affecting the SQL. The starting position for all my surveys (in the question table) is 0. However, when I copy a survey, the starting position is 1. Is that intended behavior? Can I always assume that the value of "position" for a question in a copied survey is always one greater than its counterpart in the original survey? ---------------------------------------------------------------------- Comment By: kswartz (kswartz) Date: 2009-03-07 01:01 Message: That's cool - it's not a feature I use very often, which is why it took so long to say anything. Next time I go to do this, I'll add a comment to the request with the SQL necessary to do the copy (which is the hard part). If I have time to actually fix the code, I'll gladly supply a patch. (And yes, I'll upgrade to 2.1.2 first. :) ) ---------------------------------------------------------------------- Comment By: Franky Van Liedekerke (liedekef) Date: 2009-03-07 00:40 Message: Hi, sorry, but I don't think it is fixed in 2.1.2 (it was known to me though, and I'm pretty sure I documented it somewhere...) But feel free to make any contribution, be it patches, bug fixes, etc ... Franky ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=108956&aid=2669428&group_id=8956 |
From: SourceForge.net <no...@so...> - 2009-04-09 23:58:34
|
Bugs item #2669428, was opened at 2009-03-06 15:45 Message generated for change (Comment added) made by bishopb You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=108956&aid=2669428&group_id=8956 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: kswartz (kswartz) Assigned to: bishop (bishopb) Summary: Copying an existing survey does not copy conditions Initial Comment: I'm working with version 2.0.2 of phpESP, and noticed that if you copy an existing survey, it copies everything BUT the conditions. If this isn't fixed in the latest version, please consider it for the next update. (If this IS fixed in 2.1.2, it will probably speed up my upgrade. Only reason I haven't so far is because I made a lot of changes and fixed some bugs in 2.0.2, and wasn't sure how long it would take to copy the changes over.) ---------------------------------------------------------------------- >Comment By: bishop (bishopb) Date: 2009-04-09 19:58 Message: Franky, I'll try and get to them before Monday, 13-April-09. ---------------------------------------------------------------------- Comment By: Franky Van Liedekerke (liedekef) Date: 2009-04-09 17:33 Message: I'm assigning this to Bishop as well, but I'm really planning on releasing a new version after this fix (seems good enough reasons/bugfixes exist now). So Bishop, I don't know if you have the time to look at this and 2672129 any time soon? Franky ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2009-04-09 17:20 Message: Crap, another typo! Man, I wish I could edit these posts. One more time: INSERT INTO conditions (id,survey_id,q1_id,q2_id,cond,cond_value) SELECT NULL, 11, qnew1.id, qnew2.id, cond, cond_value FROM question qold1, question qold2, question qnew1, question qnew2, conditions c WHERE qold1.id=c.q1_id AND qold2.id=c.q2_id AND qold1.survey_id=$old_survey_id and qold2.survey_id=$old_survey_id AND qnew1.survey_id=$new_survey_id AND qnew1.position=qold1.position AND qnew1.deleted=qold1.deleted AND qnew2.survey_id=$new_survey_id AND qnew2.position=qold2.position AND qnew2.deleted=qold2.deleted; ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2009-04-09 17:18 Message: Sorry, the SQL in the last update was missing a line. It should read: INSERT INTO conditions (id,survey_id,q1_id,q2_id,cond,cond_value) SELECT NULL, $new_survey_id, qnew1.id, qnew2.id, cond, cond_value FROM question qold1, question qold2, question qnew1, question qnew2, conditions c WHERE qold1.id=c.q1_id AND qold2.id=c.q2_id AND qold1.survey_id=3 and qold2.survey_id=3 AND qnew1.survey_id=$new_survey_id AND qnew1.position=qold1.position AND qnew1.deleted=qold1.deleted AND qnew2.survey_id=$new_survey_id AND qnew2.position=qold2.position AND qnew2.deleted=qold2.deleted; Just a reminder, too, this enhancement REQUIRES the fix to 2672129 also (which makes copied surveys start with the same position as the original). This SQL cannot be manually applied to previously copied surveys unless the positions between the original and copy are re-aligned by hand, which may or may not be part of the fix to 2672129. (Probably not.) ---------------------------------------------------------------------- Comment By: kswartz (kswartz) Date: 2009-03-08 00:23 Message: (Sorry for the double post before.) Okay, I've looked at survey_aggregate.inc, and I think what I described previously is actually a bug. I've logged a separate bug for this. With that fix in place, this is the SQL I used to copy the conditions from the old survey to the new survey: INSERT INTO conditions (id,survey_id,q1_id,q2_id,cond,cond_value) SELECT NULL, $new_survey_id, qnew1.id, qnew2.id, cond, cond_value FROM question qold1, question qold2, question qnew1, question qnew2, conditions c WHERE qold1.id=c.q1_id AND qold2.id=c.q2_id AND qnew1.survey_id=$new_survey_id AND qnew1.position=qold1.position AND qnew1.deleted=qold1.deleted AND qnew2.survey_id=$new_survey_id AND qnew2.position=qold2.position AND qnew2.deleted=qold2.deleted; I'll work on producing a patch that incorporates this into survey_aggregate.inc Incidentally, I'm not sure why you chose to insert the questions one at a time while cycling through the results of a select. I think all the changes you made to the old data could have been made in SQL. I elected to do an INSERT INTO ... SELECT FROM ... instead, as you can see, as it's much faster. ---------------------------------------------------------------------- Comment By: kswartz (kswartz) Date: 2009-03-07 23:24 Message: Okay, I've set up 2.1.2, and I may have a patch for this coming, but I've discovered a weird quirk that's affecting the SQL. The starting position for all my surveys (in the question table) is 0. However, when I copy a survey, the starting position is 1. Is that intended behavior? Can I always assume that the value of "position" for a question in a copied survey is always one greater than its counterpart in the original survey? ---------------------------------------------------------------------- Comment By: kswartz (kswartz) Date: 2009-03-07 14:45 Message: Okay, I've set up 2.1.2, and I may have a patch for this coming, but I've discovered a weird quirk that's affecting the SQL. The starting position for all my surveys (in the question table) is 0. However, when I copy a survey, the starting position is 1. Is that intended behavior? Can I always assume that the value of "position" for a question in a copied survey is always one greater than its counterpart in the original survey? ---------------------------------------------------------------------- Comment By: kswartz (kswartz) Date: 2009-03-06 19:01 Message: That's cool - it's not a feature I use very often, which is why it took so long to say anything. Next time I go to do this, I'll add a comment to the request with the SQL necessary to do the copy (which is the hard part). If I have time to actually fix the code, I'll gladly supply a patch. (And yes, I'll upgrade to 2.1.2 first. :) ) ---------------------------------------------------------------------- Comment By: Franky Van Liedekerke (liedekef) Date: 2009-03-06 18:40 Message: Hi, sorry, but I don't think it is fixed in 2.1.2 (it was known to me though, and I'm pretty sure I documented it somewhere...) But feel free to make any contribution, be it patches, bug fixes, etc ... Franky ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=108956&aid=2669428&group_id=8956 |
From: SourceForge.net <no...@so...> - 2009-04-10 07:13:41
|
Bugs item #2669428, was opened at 2009-03-06 21:45 Message generated for change (Comment added) made by liedekef You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=108956&aid=2669428&group_id=8956 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: kswartz (kswartz) Assigned to: bishop (bishopb) Summary: Copying an existing survey does not copy conditions Initial Comment: I'm working with version 2.0.2 of phpESP, and noticed that if you copy an existing survey, it copies everything BUT the conditions. If this isn't fixed in the latest version, please consider it for the next update. (If this IS fixed in 2.1.2, it will probably speed up my upgrade. Only reason I haven't so far is because I made a lot of changes and fixed some bugs in 2.0.2, and wasn't sure how long it would take to copy the changes over.) ---------------------------------------------------------------------- >Comment By: Franky Van Liedekerke (liedekef) Date: 2009-04-10 09:13 Message: That would be great! Thanks, Bishop. Don't let it ruin the holidays though :-) ---------------------------------------------------------------------- Comment By: bishop (bishopb) Date: 2009-04-10 01:58 Message: Franky, I'll try and get to them before Monday, 13-April-09. ---------------------------------------------------------------------- Comment By: Franky Van Liedekerke (liedekef) Date: 2009-04-09 23:33 Message: I'm assigning this to Bishop as well, but I'm really planning on releasing a new version after this fix (seems good enough reasons/bugfixes exist now). So Bishop, I don't know if you have the time to look at this and 2672129 any time soon? Franky ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2009-04-09 23:20 Message: Crap, another typo! Man, I wish I could edit these posts. One more time: INSERT INTO conditions (id,survey_id,q1_id,q2_id,cond,cond_value) SELECT NULL, 11, qnew1.id, qnew2.id, cond, cond_value FROM question qold1, question qold2, question qnew1, question qnew2, conditions c WHERE qold1.id=c.q1_id AND qold2.id=c.q2_id AND qold1.survey_id=$old_survey_id and qold2.survey_id=$old_survey_id AND qnew1.survey_id=$new_survey_id AND qnew1.position=qold1.position AND qnew1.deleted=qold1.deleted AND qnew2.survey_id=$new_survey_id AND qnew2.position=qold2.position AND qnew2.deleted=qold2.deleted; ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2009-04-09 23:18 Message: Sorry, the SQL in the last update was missing a line. It should read: INSERT INTO conditions (id,survey_id,q1_id,q2_id,cond,cond_value) SELECT NULL, $new_survey_id, qnew1.id, qnew2.id, cond, cond_value FROM question qold1, question qold2, question qnew1, question qnew2, conditions c WHERE qold1.id=c.q1_id AND qold2.id=c.q2_id AND qold1.survey_id=3 and qold2.survey_id=3 AND qnew1.survey_id=$new_survey_id AND qnew1.position=qold1.position AND qnew1.deleted=qold1.deleted AND qnew2.survey_id=$new_survey_id AND qnew2.position=qold2.position AND qnew2.deleted=qold2.deleted; Just a reminder, too, this enhancement REQUIRES the fix to 2672129 also (which makes copied surveys start with the same position as the original). This SQL cannot be manually applied to previously copied surveys unless the positions between the original and copy are re-aligned by hand, which may or may not be part of the fix to 2672129. (Probably not.) ---------------------------------------------------------------------- Comment By: kswartz (kswartz) Date: 2009-03-08 06:23 Message: (Sorry for the double post before.) Okay, I've looked at survey_aggregate.inc, and I think what I described previously is actually a bug. I've logged a separate bug for this. With that fix in place, this is the SQL I used to copy the conditions from the old survey to the new survey: INSERT INTO conditions (id,survey_id,q1_id,q2_id,cond,cond_value) SELECT NULL, $new_survey_id, qnew1.id, qnew2.id, cond, cond_value FROM question qold1, question qold2, question qnew1, question qnew2, conditions c WHERE qold1.id=c.q1_id AND qold2.id=c.q2_id AND qnew1.survey_id=$new_survey_id AND qnew1.position=qold1.position AND qnew1.deleted=qold1.deleted AND qnew2.survey_id=$new_survey_id AND qnew2.position=qold2.position AND qnew2.deleted=qold2.deleted; I'll work on producing a patch that incorporates this into survey_aggregate.inc Incidentally, I'm not sure why you chose to insert the questions one at a time while cycling through the results of a select. I think all the changes you made to the old data could have been made in SQL. I elected to do an INSERT INTO ... SELECT FROM ... instead, as you can see, as it's much faster. ---------------------------------------------------------------------- Comment By: kswartz (kswartz) Date: 2009-03-08 05:24 Message: Okay, I've set up 2.1.2, and I may have a patch for this coming, but I've discovered a weird quirk that's affecting the SQL. The starting position for all my surveys (in the question table) is 0. However, when I copy a survey, the starting position is 1. Is that intended behavior? Can I always assume that the value of "position" for a question in a copied survey is always one greater than its counterpart in the original survey? ---------------------------------------------------------------------- Comment By: kswartz (kswartz) Date: 2009-03-07 20:45 Message: Okay, I've set up 2.1.2, and I may have a patch for this coming, but I've discovered a weird quirk that's affecting the SQL. The starting position for all my surveys (in the question table) is 0. However, when I copy a survey, the starting position is 1. Is that intended behavior? Can I always assume that the value of "position" for a question in a copied survey is always one greater than its counterpart in the original survey? ---------------------------------------------------------------------- Comment By: kswartz (kswartz) Date: 2009-03-07 01:01 Message: That's cool - it's not a feature I use very often, which is why it took so long to say anything. Next time I go to do this, I'll add a comment to the request with the SQL necessary to do the copy (which is the hard part). If I have time to actually fix the code, I'll gladly supply a patch. (And yes, I'll upgrade to 2.1.2 first. :) ) ---------------------------------------------------------------------- Comment By: Franky Van Liedekerke (liedekef) Date: 2009-03-07 00:40 Message: Hi, sorry, but I don't think it is fixed in 2.1.2 (it was known to me though, and I'm pretty sure I documented it somewhere...) But feel free to make any contribution, be it patches, bug fixes, etc ... Franky ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=108956&aid=2669428&group_id=8956 |
From: SourceForge.net <no...@so...> - 2009-04-13 19:34:12
|
Bugs item #2669428, was opened at 2009-03-06 15:45 Message generated for change (Comment added) made by bishopb You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=108956&aid=2669428&group_id=8956 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None >Status: Closed >Resolution: Fixed Priority: 5 Private: No Submitted By: kswartz (kswartz) Assigned to: bishop (bishopb) Summary: Copying an existing survey does not copy conditions Initial Comment: I'm working with version 2.0.2 of phpESP, and noticed that if you copy an existing survey, it copies everything BUT the conditions. If this isn't fixed in the latest version, please consider it for the next update. (If this IS fixed in 2.1.2, it will probably speed up my upgrade. Only reason I haven't so far is because I made a lot of changes and fixed some bugs in 2.0.2, and wasn't sure how long it would take to copy the changes over.) ---------------------------------------------------------------------- >Comment By: bishop (bishopb) Date: 2009-04-13 15:34 Message: I have applied this functionality to trunk and tested it in a few different configurations. Note that the final given SQL still had an error: "SELECT NULL, 11,..." the "11" should have been the new survey ID, which I addressed. I applied this change to the survey_copy_questions() helper of survey_aggregate(): so both the survey copy and survey aggregate functionality have access to this new behavior. I also changed the name of the helper function to reflect that it copies both questions and conditions: survey_copy_questions_and_conditions(). Re: the question of iterating an insert over a select: I don't know -- that's the way the original code was written, so it's just been grandfathered in. I did have some concern that the INSERT INTO ... SELECT ... syntax would be problematic for SQLite, but I checked its documentation and we're good there. However, if we ever add a database that doesn't support this construct, we'll need to revisit this section. Future generations be warned. There is no provision to copy conditions for surveys created prior to this fix being implemented, owing to the bug Keith described in SFID 2672129. Franky, since this and SFID 2672129 are now complete, a new release may be tagged. ---------------------------------------------------------------------- Comment By: Franky Van Liedekerke (liedekef) Date: 2009-04-10 03:13 Message: That would be great! Thanks, Bishop. Don't let it ruin the holidays though :-) ---------------------------------------------------------------------- Comment By: bishop (bishopb) Date: 2009-04-09 19:58 Message: Franky, I'll try and get to them before Monday, 13-April-09. ---------------------------------------------------------------------- Comment By: Franky Van Liedekerke (liedekef) Date: 2009-04-09 17:33 Message: I'm assigning this to Bishop as well, but I'm really planning on releasing a new version after this fix (seems good enough reasons/bugfixes exist now). So Bishop, I don't know if you have the time to look at this and 2672129 any time soon? Franky ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2009-04-09 17:20 Message: Crap, another typo! Man, I wish I could edit these posts. One more time: INSERT INTO conditions (id,survey_id,q1_id,q2_id,cond,cond_value) SELECT NULL, 11, qnew1.id, qnew2.id, cond, cond_value FROM question qold1, question qold2, question qnew1, question qnew2, conditions c WHERE qold1.id=c.q1_id AND qold2.id=c.q2_id AND qold1.survey_id=$old_survey_id and qold2.survey_id=$old_survey_id AND qnew1.survey_id=$new_survey_id AND qnew1.position=qold1.position AND qnew1.deleted=qold1.deleted AND qnew2.survey_id=$new_survey_id AND qnew2.position=qold2.position AND qnew2.deleted=qold2.deleted; ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2009-04-09 17:18 Message: Sorry, the SQL in the last update was missing a line. It should read: INSERT INTO conditions (id,survey_id,q1_id,q2_id,cond,cond_value) SELECT NULL, $new_survey_id, qnew1.id, qnew2.id, cond, cond_value FROM question qold1, question qold2, question qnew1, question qnew2, conditions c WHERE qold1.id=c.q1_id AND qold2.id=c.q2_id AND qold1.survey_id=3 and qold2.survey_id=3 AND qnew1.survey_id=$new_survey_id AND qnew1.position=qold1.position AND qnew1.deleted=qold1.deleted AND qnew2.survey_id=$new_survey_id AND qnew2.position=qold2.position AND qnew2.deleted=qold2.deleted; Just a reminder, too, this enhancement REQUIRES the fix to 2672129 also (which makes copied surveys start with the same position as the original). This SQL cannot be manually applied to previously copied surveys unless the positions between the original and copy are re-aligned by hand, which may or may not be part of the fix to 2672129. (Probably not.) ---------------------------------------------------------------------- Comment By: kswartz (kswartz) Date: 2009-03-08 00:23 Message: (Sorry for the double post before.) Okay, I've looked at survey_aggregate.inc, and I think what I described previously is actually a bug. I've logged a separate bug for this. With that fix in place, this is the SQL I used to copy the conditions from the old survey to the new survey: INSERT INTO conditions (id,survey_id,q1_id,q2_id,cond,cond_value) SELECT NULL, $new_survey_id, qnew1.id, qnew2.id, cond, cond_value FROM question qold1, question qold2, question qnew1, question qnew2, conditions c WHERE qold1.id=c.q1_id AND qold2.id=c.q2_id AND qnew1.survey_id=$new_survey_id AND qnew1.position=qold1.position AND qnew1.deleted=qold1.deleted AND qnew2.survey_id=$new_survey_id AND qnew2.position=qold2.position AND qnew2.deleted=qold2.deleted; I'll work on producing a patch that incorporates this into survey_aggregate.inc Incidentally, I'm not sure why you chose to insert the questions one at a time while cycling through the results of a select. I think all the changes you made to the old data could have been made in SQL. I elected to do an INSERT INTO ... SELECT FROM ... instead, as you can see, as it's much faster. ---------------------------------------------------------------------- Comment By: kswartz (kswartz) Date: 2009-03-07 23:24 Message: Okay, I've set up 2.1.2, and I may have a patch for this coming, but I've discovered a weird quirk that's affecting the SQL. The starting position for all my surveys (in the question table) is 0. However, when I copy a survey, the starting position is 1. Is that intended behavior? Can I always assume that the value of "position" for a question in a copied survey is always one greater than its counterpart in the original survey? ---------------------------------------------------------------------- Comment By: kswartz (kswartz) Date: 2009-03-07 14:45 Message: Okay, I've set up 2.1.2, and I may have a patch for this coming, but I've discovered a weird quirk that's affecting the SQL. The starting position for all my surveys (in the question table) is 0. However, when I copy a survey, the starting position is 1. Is that intended behavior? Can I always assume that the value of "position" for a question in a copied survey is always one greater than its counterpart in the original survey? ---------------------------------------------------------------------- Comment By: kswartz (kswartz) Date: 2009-03-06 19:01 Message: That's cool - it's not a feature I use very often, which is why it took so long to say anything. Next time I go to do this, I'll add a comment to the request with the SQL necessary to do the copy (which is the hard part). If I have time to actually fix the code, I'll gladly supply a patch. (And yes, I'll upgrade to 2.1.2 first. :) ) ---------------------------------------------------------------------- Comment By: Franky Van Liedekerke (liedekef) Date: 2009-03-06 18:40 Message: Hi, sorry, but I don't think it is fixed in 2.1.2 (it was known to me though, and I'm pretty sure I documented it somewhere...) But feel free to make any contribution, be it patches, bug fixes, etc ... Franky ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=108956&aid=2669428&group_id=8956 |
From: SourceForge.net <no...@so...> - 2009-11-14 21:43:09
|
Bugs item #2897816, was opened at 2009-11-14 22:43 Message generated for change (Tracker Item Submitted) made by bochoven You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=108956&aid=2897816&group_id=8956 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Admin Group: 2.1.3 Status: Open Resolution: None Priority: 5 Private: No Submitted By: Arjen van Bochoven (bochoven) Assigned to: Nobody/Anonymous (nobody) Summary: Copying an existing survey does not copy conditions Initial Comment: I would like to reopen SFID 2669428, but I can't seem to find a way to do that. The sql statement in survey_aggregate.inc on line 152 to 165 contains hardcoded tablenames which will fail when used together with prefixed tables: // copy conditions $sql =<<<EOSQL INSERT INTO conditions (id, survey_id, q1_id, q2_id, cond, cond_value) SELECT NULL, $new_sid, qnew1.id, qnew2.id, cond, cond_value FROM question qold1, question qold2, question qnew1, question qnew2, conditions c WHERE qold1.id=c.q1_id AND qold2.id=c.q2_id AND qold1.survey_id=$sid AND qold2.survey_id=$sid AND qnew1.survey_id=$new_sid AND qnew1.position=qold1.position AND qnew1.deleted=qold1.deleted AND qnew2.survey_id=$new_sid AND qnew2.position=qold2.position AND qnew2.deleted=qold2.deleted EOSQL; Arjen ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=108956&aid=2897816&group_id=8956 |
From: SourceForge.net <no...@so...> - 2009-11-14 22:07:45
|
Bugs item #2897816, was opened at 2009-11-14 22:43 Message generated for change (Comment added) made by bochoven You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=108956&aid=2897816&group_id=8956 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Admin Group: 2.1.3 Status: Open Resolution: None Priority: 5 Private: No Submitted By: Arjen van Bochoven (bochoven) Assigned to: Nobody/Anonymous (nobody) Summary: Copying an existing survey does not copy conditions Initial Comment: I would like to reopen SFID 2669428, but I can't seem to find a way to do that. The sql statement in survey_aggregate.inc on line 152 to 165 contains hardcoded tablenames which will fail when used together with prefixed tables: // copy conditions $sql =<<<EOSQL INSERT INTO conditions (id, survey_id, q1_id, q2_id, cond, cond_value) SELECT NULL, $new_sid, qnew1.id, qnew2.id, cond, cond_value FROM question qold1, question qold2, question qnew1, question qnew2, conditions c WHERE qold1.id=c.q1_id AND qold2.id=c.q2_id AND qold1.survey_id=$sid AND qold2.survey_id=$sid AND qnew1.survey_id=$new_sid AND qnew1.position=qold1.position AND qnew1.deleted=qold1.deleted AND qnew2.survey_id=$new_sid AND qnew2.position=qold2.position AND qnew2.deleted=qold2.deleted EOSQL; Arjen ---------------------------------------------------------------------- >Comment By: Arjen van Bochoven (bochoven) Date: 2009-11-14 23:07 Message: My proposed fix: // copy conditions $sql = " INSERT INTO ".$GLOBALS['ESPCONFIG']['condition_table']." (id, survey_id, q1_id, q2_id, cond, cond_value) SELECT NULL, $new_sid, qnew1.id, qnew2.id, cond, cond_value FROM ".$GLOBALS['ESPCONFIG']['question_table']." qold1, ".$GLOBALS['ESPCONFIG']['question_table']." qold2, ".$GLOBALS['ESPCONFIG']['question_table']." qnew1, ".$GLOBALS['ESPCONFIG']['question_table']." qnew2, ".$GLOBALS['ESPCONFIG']['condition_table']." c WHERE qold1.id=c.q1_id AND qold2.id=c.q2_id AND qold1.survey_id=$sid AND qold2.survey_id=$sid AND qnew1.survey_id=$new_sid AND qnew1.position=qold1.position AND qnew1.deleted=qold1.deleted AND qnew2.survey_id=$new_sid AND qnew2.position=qold2.position AND qnew2.deleted=qold2.deleted "; Arjen ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=108956&aid=2897816&group_id=8956 |
From: SourceForge.net <no...@so...> - 2009-11-14 23:06:40
|
Bugs item #2897816, was opened at 2009-11-14 22:43 Message generated for change (Comment added) made by liedekef You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=108956&aid=2897816&group_id=8956 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Admin Group: 2.1.3 >Status: Closed >Resolution: Accepted Priority: 5 Private: No Submitted By: Arjen van Bochoven (bochoven) Assigned to: Nobody/Anonymous (nobody) Summary: Copying an existing survey does not copy conditions Initial Comment: I would like to reopen SFID 2669428, but I can't seem to find a way to do that. The sql statement in survey_aggregate.inc on line 152 to 165 contains hardcoded tablenames which will fail when used together with prefixed tables: // copy conditions $sql =<<<EOSQL INSERT INTO conditions (id, survey_id, q1_id, q2_id, cond, cond_value) SELECT NULL, $new_sid, qnew1.id, qnew2.id, cond, cond_value FROM question qold1, question qold2, question qnew1, question qnew2, conditions c WHERE qold1.id=c.q1_id AND qold2.id=c.q2_id AND qold1.survey_id=$sid AND qold2.survey_id=$sid AND qnew1.survey_id=$new_sid AND qnew1.position=qold1.position AND qnew1.deleted=qold1.deleted AND qnew2.survey_id=$new_sid AND qnew2.position=qold2.position AND qnew2.deleted=qold2.deleted EOSQL; Arjen ---------------------------------------------------------------------- Comment By: Franky Van Liedekerke (liedekef) Date: 2009-11-15 00:06 Message: The latest development code contains the fix, please update to the development code or wait for an official release. ---------------------------------------------------------------------- Comment By: Arjen van Bochoven (bochoven) Date: 2009-11-14 23:07 Message: My proposed fix: // copy conditions $sql = " INSERT INTO ".$GLOBALS['ESPCONFIG']['condition_table']." (id, survey_id, q1_id, q2_id, cond, cond_value) SELECT NULL, $new_sid, qnew1.id, qnew2.id, cond, cond_value FROM ".$GLOBALS['ESPCONFIG']['question_table']." qold1, ".$GLOBALS['ESPCONFIG']['question_table']." qold2, ".$GLOBALS['ESPCONFIG']['question_table']." qnew1, ".$GLOBALS['ESPCONFIG']['question_table']." qnew2, ".$GLOBALS['ESPCONFIG']['condition_table']." c WHERE qold1.id=c.q1_id AND qold2.id=c.q2_id AND qold1.survey_id=$sid AND qold2.survey_id=$sid AND qnew1.survey_id=$new_sid AND qnew1.position=qold1.position AND qnew1.deleted=qold1.deleted AND qnew2.survey_id=$new_sid AND qnew2.position=qold2.position AND qnew2.deleted=qold2.deleted "; Arjen ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=108956&aid=2897816&group_id=8956 |
From: Franky V. L. <lie...@te...> - 2009-03-06 23:33:29
|
Hi, sorry, but iirc this is still not the case ... so unless somebody else did it already ... Franky On Fri, 06 Mar 2009 20:45:28 +0000 "SourceForge.net" <no...@so...> wrote: > Bugs item #2669428, was opened at 2009-03-06 12:45 > Message generated for change (Tracker Item Submitted) made by Item > Submitter You can respond by visiting: > https://sourceforge.net/tracker/?func=detail&atid=108956&aid=2669428&group_id=8956 > > Please note that this message will contain a full copy of the comment > thread, including the initial issue submission, for this request, > not just the latest update. > Category: None > Group: None > Status: Open > Resolution: None > Priority: 5 > Private: No > Submitted By: kswartz (kswartz) > Assigned to: Nobody/Anonymous (nobody) > Summary: Copying an existing survey does not copy conditions > > Initial Comment: > I'm working with version 2.0.2 of phpESP, and noticed that if you > copy an existing survey, it copies everything BUT the conditions. If > this isn't fixed in the latest version, please consider it for the > next update. > > (If this IS fixed in 2.1.2, it will probably speed up my upgrade. > Only reason I haven't so far is because I made a lot of changes and > fixed some bugs in 2.0.2, and wasn't sure how long it would take to > copy the changes over.) > > ---------------------------------------------------------------------- > > You can respond by visiting: > https://sourceforge.net/tracker/?func=detail&atid=108956&aid=2669428&group_id=8956 > > ------------------------------------------------------------------------------ > Open Source Business Conference (OSBC), March 24-25, 2009, San > Francisco, CA -OSBC tackles the biggest issue in open source: Open > Sourcing the Enterprise -Strategies to boost innovation and cut costs > with open source participation -Receive a $600 discount off the > registration fee with the source code: SFAD > http://p.sf.net/sfu/XcvMzF8H > _______________________________________________ phpESP-devel mailing > list php...@li... > https://lists.sourceforge.net/lists/listinfo/phpesp-devel > |
From: Bishop B. <ph...@id...> - 2009-03-07 00:11:28
|
Probably still exists: I didn't address it when I implemented survey_copy() as a special case of survey_aggregate(). bishop Quoting Franky Van Liedekerke <lie...@te...>: > Hi, > > sorry, but iirc this is still not the case ... so unless somebody else > did it already ... > > Franky > > On Fri, 06 Mar 2009 20:45:28 +0000 > "SourceForge.net" <no...@so...> wrote: > >> Bugs item #2669428, was opened at 2009-03-06 12:45 >> Message generated for change (Tracker Item Submitted) made by Item >> Submitter You can respond by visiting: >> https://sourceforge.net/tracker/?func=detail&atid=108956&aid=2669428&group_id=8956 >> >> Please note that this message will contain a full copy of the comment >> thread, including the initial issue submission, for this request, >> not just the latest update. >> Category: None >> Group: None >> Status: Open >> Resolution: None >> Priority: 5 >> Private: No >> Submitted By: kswartz (kswartz) >> Assigned to: Nobody/Anonymous (nobody) >> Summary: Copying an existing survey does not copy conditions >> >> Initial Comment: >> I'm working with version 2.0.2 of phpESP, and noticed that if you >> copy an existing survey, it copies everything BUT the conditions. If >> this isn't fixed in the latest version, please consider it for the >> next update. >> >> (If this IS fixed in 2.1.2, it will probably speed up my upgrade. >> Only reason I haven't so far is because I made a lot of changes and >> fixed some bugs in 2.0.2, and wasn't sure how long it would take to >> copy the changes over.) >> >> ---------------------------------------------------------------------- >> >> You can respond by visiting: >> https://sourceforge.net/tracker/?func=detail&atid=108956&aid=2669428&group_id=8956 >> >> ------------------------------------------------------------------------------ >> Open Source Business Conference (OSBC), March 24-25, 2009, San >> Francisco, CA -OSBC tackles the biggest issue in open source: Open >> Sourcing the Enterprise -Strategies to boost innovation and cut costs >> with open source participation -Receive a $600 discount off the >> registration fee with the source code: SFAD >> http://p.sf.net/sfu/XcvMzF8H >> _______________________________________________ phpESP-devel mailing >> list php...@li... >> https://lists.sourceforge.net/lists/listinfo/phpesp-devel >> > > ------------------------------------------------------------------------------ > Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA > -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise > -Strategies to boost innovation and cut costs with open source participation > -Receive a $600 discount off the registration fee with the source code: SFAD > http://p.sf.net/sfu/XcvMzF8H > _______________________________________________ > phpESP-devel mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/phpesp-devel > -- Bishop Bettini ideacode, Inc. (main) +1 919 341 5170 / (fax) +1 919 521 4100 Visit us on the web at: ideacode.com Professional software research and development reviewmysoftware.com Improve sales! Review your software before you release bytejar.com Solutions to those annoying development problems |