OK. I found the bug. It's in this function in agilo\scrum\backlog.py:

    def _remove_from_backlogs(self, ticket, scope, backlog_type,
strict=None, db=None):
        # We don't know how many backlogs the user configured (e.g.
sprint
        # backlogs) and what's their name so we just get all sprint
backlogs.
        subquery_sql = "SELECT name from %(btable)s where b_type=%
(btype)d"
        if strict:
            subquery_sql += " and b_strict=1"
        sql_template = "DELETE FROM %(bticket)s WHERE ticket_id=%
(ticket)s " + \
                        "and name = ( " + subquery_sql + ")"
        if scope != None:
            sql_template += " and scope='%(scope)s'"
        parameters = dict(ticket=ticket.id, scope=scope,
btype=backlog_type,
                          bticket=BACKLOG_TICKET_TABLE,
btable=BACKLOG_TABLE)
        sql_query = sql_template % parameters
        db, handle_ta = get_db_for_write(self.env, db)
        cursor = db.cursor()
        safe_execute(cursor, sql_query)
        if handle_ta:
            db.commit()

You get a list of all global backlogs strict backogs so you can remove
the assigned sprint items from them(?) but then on the SQL delete
command, you use = instead of IN so if there is more than one global
backlog, the statement will fail. Made this change and both of the
above mentioned problem situations, when updating a sptring backlog,
are fixed. See fixed function below. Line changes is:   "and name IN
( " + subquery_sql + ")"

    def _remove_from_backlogs(self, ticket, scope, backlog_type,
strict=None, db=None):
        # We don't know how many backlogs the user configured (e.g.
sprint
        # backlogs) and what's their name so we just get all sprint
backlogs.
        subquery_sql = "SELECT name from %(btable)s where b_type=%
(btype)d"
        if strict:
            subquery_sql += " and b_strict=1"
        sql_template = "DELETE FROM %(bticket)s WHERE ticket_id=%
(ticket)s " + \
                        "and name IN ( " + subquery_sql + ")"
        if scope != None:
            sql_template += " and scope='%(scope)s'"
        parameters = dict(ticket=ticket.id, scope=scope,
btype=backlog_type,
                          bticket=BACKLOG_TICKET_TABLE,
btable=BACKLOG_TABLE)
        sql_query = sql_template % parameters
        db, handle_ta = get_db_for_write(self.env, db)
        cursor = db.cursor()
        safe_execute(cursor, sql_query)
        if handle_ta:
            db.commit()
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Agilo for Scrum" group. This group is moderated by agile42 GmbH 
http://www.agile42.com and is focused in supporting Agilo for Scrum users.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/agilo?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to