Do offers not expire when maturation date passes?

1 view
Skip to first unread message

Georg Link

unread,
Apr 8, 2018, 12:54:32 AM4/8/18
to bugmark_dev
Hi Andy,

I want to get abandoned Issues that have no open offer and no open contract.

I came up with the following code:
    issues_not_abandoned = []
    issues_contracted = Contract.joins(:issue).open.where('issues.stm_status = ?', 'open').pluck('stm_issue_uuid')
    issues_not_abandoned.concat(issues_contracted)
    issues_offered = Offer.joins(:issue).open.where('issues.stm_status = ?', 'open').pluck('stm_issue_uuid')
    issues_not_abandoned.concat(issues_offered)
    abandoned_issue_count = Issue.open.where('uuid NOT IN (?)', issues_not_abandoned).count


However, it appears that offers, who's maturation date passed, are still considered 'open'. and not expired.

Feature, Bug, or do I not understand something?

Best,
Georg

Georg Link

unread,
Apr 11, 2018, 11:05:38 AM4/11/18
to bugmark_dev, Andy Leak
Hi Andy,

Here is the repository with the code: https://github.com/GeorgLink/bmx-bot/tree/master/sbot

The code in question is in file 'issuetracker.rb' on lines 104ff.

Best,
Georg
Reply all
Reply to author
Forward
0 new messages