List:Eventum General Discussion« Previous MessageNext Message »
From:Jeffrey D. Wheelhouse Date:March 15 2005 5:20am
Subject:Re: Bug updating an issue
View as plain text  
I'm still getting this on pages where the issue is not assigned to 
anyone.  The browser is Firefox and it does not appear to be submitting 
the empty list if the assignments[] field is not populated.

Here's the HTML it's parsing:

<input type="hidden" name="keep_assignments" value="no">
<select size="4" multiple class="default" name="assignments[]" 
onChange="javascript:showSelections('update_form', 'assignments[]');">
<option label="Jeff Wheelhouse" value="2">Jeff Wheelhouse</option>
<option label="..." value="9">...</option>
<option label="..." value="12">...</option>
<option label="..." value="14">...</option>
<option label="..." value="13">...</option>
</select>

If I have even one person on the issue, it's fine.

The patch below seems to handle it.

Jeff

--- orig/include/class.issue.php
+++ mod/include/class.issue.php
@@ -1060,7 +1060,9 @@
          if (@$HTTP_POST_VARS["keep_assignments"] == "no") {
              // only change the issue-user associations if there really 
were any changes
              $old_assignees = $current['assigned_users'];
-            $new_assignees = @$HTTP_POST_VARS['assignments'];
+            if (isset($HTTP_POST_VARS['assignments']))
+              $new_assignees = @$HTTP_POST_VARS['assignments'];
+            else $new_assignees = array();
              $assignment_notifications = array();

              // remove people from the assignment list, if appropriate


-- 
Jeff Wheelhouse
jdw@stripped
Thread
Bug updating an issueJeffrey D. Wheelhouse13 Mar
  • RE: Bug updating an issueJoao Prado Maia14 Mar
    • Re: Bug updating an issueJeffrey D. Wheelhouse14 Mar
      • Re: Bug updating an issueBryan Alsdorf14 Mar
        • Re: Bug updating an issueElan Ruusamäe14 Mar
          • Re: Bug updating an issueJeffrey D. Wheelhouse14 Mar
          • RE: Bug updating an issueJoao Prado Maia14 Mar
            • Re: Bug updating an issueJeffrey D. Wheelhouse15 Mar
              • Re: Bug updating an issueBryan Alsdorf16 Mar
      • RE: Bug updating an issueJoao Prado Maia14 Mar