JILS-33: Issue Listings: DOM ID changes with every view



Issue Information

Issue Type: Bug
 
Priority: Major
Status: Closed

Reported By:
Ben Tasker
Assigned To:
Ben Tasker
Project: Jira Issue Listing Script (JILS)
Resolution: Fixed (2016-04-29 14:58:52)
Affects Version: 0.01b,
Target version: 0.01b,

Created: 2015-09-18 16:13:56
Time Spent Working
Estimated:
 
40 minutes
Remaining:
  
36 minutes
Logged:
  
4 minutes


Description
Commit b8cfd0f implemented Javascript based filtering and navigation on issue listing pages.

In order to do so, the issue listing table needed to be given an ID, and the output of mt_rand was used to ensure the ID was unique if the table was ever called multiple times in one page.

The downside of this, is that where the output of JILS is being used in an incremental backup, the pages change every time they're requested, regardless of whether there's been any activity on the project.

Need to change to use a consistent ID.


Issue Links

Commit b8cfd0f (Github)
Toggle State Changes

Activity


The table isn't currently called multiple times in any page,
# grep "issues-table" *
component-issues.php:<?php include 'issues-table.php'; ?>
project-index.php:<?php include 'issues-table.php'; ?>
version-issues.php:<?php include 'issues-table.php'; ?>

so moving to a static ID as a short-term fix should be a suitable method of stopping the issue with backups.

Needs addressing properly longer term though.

btasker changed status from 'Open' to 'In Progress'
Have set the id to be 1 for the time being.
btasker changed timespent from '0 minutes' to '2 minutes'

Repo: Jira-Issue-Listing
Commit: 5dcd22dae1c96ec21f9f229801d5bf58a3396fc6
Author: Ben Tasker <github@<Domain Hidden>>

Date: Fri Sep 18 16:17:31 2015 +0100
Commit Message: Temporary fix for JILS-33



Modified (-)(+)
-------
issues-table.php




Webhook User-Agent

GitHub-Hookshot/be3703b


View Commit

JILS-36 is going to introduce functionality whereby there will be two issue listing tables on one page, so we need to resolve this.

I think the best way forward is to have a 'default', but to allow the calling page to override it, so the first table might get ID 1 and then any page introducing a second table can set it to ID 2 (or 'foo' or 'biscuits' or whatever, so long as it's different).
Changed to using a simple if statement. Will use the work in JILS-36 to test it (as that'll implement what's needed for testing anyway).
btasker changed timespent from '2 minutes' to '4 minutes'

Repo: Jira-Issue-Listing
Commit: ec31f1c7591fa85c692b1466f576367d09c19de7
Author: Ben Tasker <github@<Domain Hidden>>

Date: Wed Sep 23 14:29:20 2015 +0100
Commit Message: Allowed parent page to set issue table ID. See JILS-33



Modified (-)(+)
-------
issues-table.php




Webhook User-Agent

GitHub-Hookshot/e8292bd


View Commit

The fix seems to work well, I think this issue can probably be marked as fixed now.
btasker changed status from 'In Progress' to 'Resolved'
btasker added 'Fixed' to resolution
btasker changed status from 'Resolved' to 'Closed'
Re-opening to assign to a version
btasker removed 'Fixed' from resolution
btasker changed status from 'Closed' to 'Reopened'
Assigning to v0.01b
btasker added '0.01b' to Version
btasker added '0.01b' to Fix Version
Re-Closing
btasker changed status from 'Reopened' to 'Resolved'
btasker added 'Fixed' to resolution
btasker changed status from 'Resolved' to 'Closed'

Work log


Ben Tasker
Permalink
2015-09-18 16:18:15

Time Spent: 2 minutes
Log Entry: Implementing and testing temporary fix

Ben Tasker
Permalink
2015-09-23 14:30:16

Time Spent: 2 minutes
Log Entry: Allowed parent page to set table ID