Ticket #7990: nooverwrite_comment.patch

File nooverwrite_comment.patch, 609 bytes (added by Raymond Wagner, 14 years ago)

Initial patch to only update comment on a status change.

  • jobqueue.cpp

     
    933933    MSqlQuery query(MSqlQuery::InitCon());
    934934
    935935    query.prepare("UPDATE jobqueue SET status = :STATUS, comment = :COMMENT "
    936                   "WHERE id = :ID;");
     936                  "WHERE id = :ID AND status <> :NEWSTATUS;");
    937937
    938938    query.bindValue(":STATUS", newStatus);
    939939    query.bindValue(":COMMENT", comment);
    940940    query.bindValue(":ID", jobID);
     941    query.bindValue(":NEWSTATUS", newStatus);
    941942
    942943    if (!query.exec())
    943944    {