########################################################################################## JILS-40: Database change indicator ########################################################################################## Issue Type: New Feature ----------------------------------------------------------------------------------------- Issue Information ==================== Priority: Major Status: Closed Resolution: Won't Fix (2019-09-09 16:34:20) Project: Jira Issue Listing Script (JILS) Reported By: btasker Assigned To: btasker Targeted for fix in version: - 0.1 Labels: API, Time Estimate: 45 minutes Time Logged: 0 minutes ----------------------------------------------------------------------------------------- Issue Description ================== At the moment, wget based mirrors of a JILS instance need to simply pull a new copy periodically, as there's no programmatic way to identify whether anything's changed without doing so. Although it doesn't take long, it's a waste of bandwidth, especially as the mtime's of the files on disk will change, so any downstream proxies revalidating against (for example) projects.bentasker.co.uk will need to reacquire pages even if they haven't actually changed. One solution would be to add a new "API" call, much like the status page. Any change against an issue will result in an entry in JIRAs worklog, so returning a simple count of entries for the relevant project filter would be sufficient for a client to identify if anything's changed (though if it has, they'd still need to pull everything). A query along the lines of -- BEGIN SNIPPET -- SELECT count(ja.ID) AS actioncount FROM jiraissue AS a LEFT JOIN project AS b on a.PROJECT = b.ID LEFT JOIN jiraaction AS ja ON ja.issueid=a.ID WHERE b.pkey IN ('JILS'); -- END SNIPPET -- Would probably be sufficient ----------------------------------------------------------------------------------------- Issue Relations ================ - relates to JILS-41: Add support for downstream re-validation ----------------------------------------------------------------------------------------- Activity ========== ----------------------------------------------------------------------------------------- 2015-12-24 14:28:17 btasker ----------------------------------------------------------------------------------------- Actually, it seems that query won't take issue creation into account, so needs adjusting to include an issue count. -- BEGIN SNIPPET -- SELECT count(ja.ID) AS actioncount FROM jiraissue AS a LEFT JOIN project AS b on a.PROJECT = b.ID LEFT JOIN jiraaction AS ja ON ja.issueid=a.ID WHERE b.pkey IN ('JILS'); SELECT count(a.ID) as issuecount FROM jiraissue AS a LEFT JOIN project AS b on a.PROJECT = b.ID WHERE b.pkey IN ('JILS'); -- END SNIPPET -- Though that still won't take adding components/versions into account. Not sure if that's necessarily an issue though, as updating an issue to assign it to a component or a version will create an entry in jiraaction. Do we really need to display a version or component before it has anything assigned to it? Simple enough to add additional queries if not I suppose ----------------------------------------------------------------------------------------- 2015-12-24 14:46:52 ----------------------------------------------------------------------------------------- btasker added 'API' to labels ----------------------------------------------------------------------------------------- 2016-04-20 13:58:02 btasker ----------------------------------------------------------------------------------------- As of JILS-41 there is a means to identify whether individual pages (limited to Issue pages and attachments at the moment) have changed as Last-Modified and ETags have been implemented (alongside support for conditional requests). It may be that the considerations that need to be taken for Version/Component pages tie in well with what needs to be considered for this feature. ----------------------------------------------------------------------------------------- 2016-04-24 18:27:06 ----------------------------------------------------------------------------------------- btasker added '0.1' to Fix Version ----------------------------------------------------------------------------------------- 2019-09-09 16:34:20 btasker ----------------------------------------------------------------------------------------- Bulk Change. Clearing out old issues - it's unlikely I'll find time to do any further work on JILS. New issues will be raised for relevant items if that proves not to be the case ----------------------------------------------------------------------------------------- 2019-09-09 16:34:20 ----------------------------------------------------------------------------------------- btasker changed status from 'Open' to 'Closed' ----------------------------------------------------------------------------------------- 2019-09-09 16:34:20 ----------------------------------------------------------------------------------------- btasker added 'Won't Fix' to resolution