= Procedura zmiany daty lub godziny wydania gazety = Należy znaleźć: {{{ $regularIssueDate - normalna data zamknięcia wydania $changeIssueDate - zmieniona data wydania }}} 1. Ogłoszenia które normalnie wygasną przed 17:00, we wtorek - one nie powinny iść do tego poniedziałkowego wydania {{{ select * from ads where enddate > '$changeIssueDate' and enddate < '$regularIssueDate ' and status = 1 and magazinepromotion > 0 }}} Te ogłoszenia wyłączamy 2. Ogłoszenia które normalnie wygasną przed 17:00 we wtorek ale mają przedłużenia - one powinny pójść {{{ select * from orderitems i join orders o on o.id = i.orderid where productid in ( select id from ads where enddate > '$changeIssueDate' and enddate < '$regularIssueDate' and status = 1 ) and i.startdate >= '$regularIssueDate' and i.magazinepromotion > 0 and o.status <> 4 }}} Należy aktywować przedłużenia, a więc w OrderItems odpowiednio zmodyfikować start oraz end date i uruchomić na team city task activate. 3. Ogłoszenia, które nie są aktywne w poniedziałek, ale włączą się jeszcze przed 17:00 we wtorek. {{{ select * from orderitems i join orders o on o.id = i.orderid where o.status <> 4 and i.startdate >= '$changeIssueDate' and startdate < '$regularIssueDate' and subscriptionpromotion is null and i.magazinepromotion > 0 }}} Należy aktywować ogłoszenia, a więc w OrderItems odpowiednio zmodyfikować start oraz end date i uruchomić na team city task activate.