project Websites / Gitlab Issue Listing Script avatar

websites/Gitlab-Issue-Listing-Script#44: Label timeline



Issue Information

Issue Type: issue
Status: closed
Reported By: btasker
Assigned To: btasker

Milestone: v0.5
Created: 18-Aug-22 20:00



Description

It'd be useful to be able to generate a timeline of issues for a given label.

It needn't be perfect, but it'd be good to be able to generate a (scrolldown) chart of when issues were raised.

For example,in a project used for financial planning you could chart out when a specific budget was tweaked



Toggle State Changes

Activity


assigned to @btasker

I've figured out generating a simple vertical timeline in terms of getting dates in place:

<html>
<style>

.left, .right {
    width: 45%;
    display: inline-block;
    min-height: 200px;
    margin: 0px;
}

.right {
    text-align: left;
    border-left: 1px solid;
    padding-left: 15px;    

}

.left {
    text-align: right;
    padding-right: 15px;    
}

</style>


<?php

$begin = new DateTime('2020-07-18');
$end = new DateTime('2022-08-08');

$daterange = new DatePeriod($begin, new DateInterval('P1M'), $end);

$x = 0;
foreach($daterange as $date){

    echo "<div class='row'>\n";
    if ($x == 0){
        ?>
            <div class='left'>
                <?php echo $date->format("M Y") ;?>
            </div>
            <div class='right'>
                &nbsp;
            </div>
        <?php
        $x = 1;
    }else{
        ?>
            <div class='left'>
                &nbsp;
            </div>
            <div class='right'>
                <?php echo $date->format("M Y") ;?>
            </div>
        <?php
        $x = 0;
    }
    echo "</div>\n";


}

?>

</html>

To embed it into GILS there are still a few steps though

  • We'd need to be able to retrieve all issues with a specific label (not currently supported)
  • We'd need to take the first and last issue date to calculate the range for the timeline
  • As we walk through the months we'd need to write in relevant issues
  • We'd need to add a view

And, of course, we'd need to add the means to get there in the first place - either an index showing all labels for a project (#26), or, having labels on issues link out to it.

verified

mentioned in commit 740233563d64e29dcfd5d2fc75dbe68110aaae51

Commit: 740233563d64e29dcfd5d2fc75dbe68110aaae51 
Author: B Tasker                            
                            
Date: 2022-08-25T20:46:21.000+01:00 

Message

Start implementing label timeline logic for websites/Gitlab-Issue-Listing-Script#44

This retrieves a set of issues for a label within a project and lays them out alongside a timeline.

Example URL: http://127.0.0.1:1480/labeltimeline/websites/privacy-sensitive-analytics/Improvement.html

+255 -1 (256 lines changed)
verified

mentioned in commit 62c43a44a84b00a1b6865dd685043d70764547eb

Commit: 62c43a44a84b00a1b6865dd685043d70764547eb 
Author: B Tasker                            
                            
Date: 2022-08-26T08:52:13.000+01:00 

Message

Add styling to labels on label timeline view (websites/Gitlab-Issue-Listing-Script#44)

+32 -2 (34 lines changed)
verified

mentioned in commit 89198cf6891d4d480c799d627cfbd135007dbcef

Commit: 89198cf6891d4d480c799d627cfbd135007dbcef 
Author: B Tasker                            
                            
Date: 2022-08-26T08:55:17.000+01:00 

Message

Add named anchors to each month and change link color to black. (websites/Gitlab-Issue-Listing-Script#44)

+10 -3 (13 lines changed)
verified

mentioned in commit a379936705ea90fd363a5d4a5d97dc6898d72c95

Commit: a379936705ea90fd363a5d4a5d97dc6898d72c95 
Author: B Tasker                            
                            
Date: 2022-08-26T08:59:00.000+01:00 

Message

Add issue status to entries in the timeline (websites/Gitlab-Issue-Listing-Script#44)

+3 -3 (6 lines changed)

There is, undoubtedly, some work to do on aesthetics, but the base functionality is now in place

Screenshot_20220826_090540

mentioned in issue #26

verified

mentioned in commit 17f9fa7d1e9b70fa266c798e6ab8c8bef0f452d2

Commit: 17f9fa7d1e9b70fa266c798e6ab8c8bef0f452d2 
Author: B Tasker                            
                            
Date: 2022-08-26T09:17:02.000+01:00 

Message

Cross link labels to their timeline (websites/Gitlab-Issue-Listing-Script#44)

+9 -0 (9 lines changed)
verified

mentioned in commit 6a2429fff9f33681baeea1fc02d6827f90297521

Commit: 6a2429fff9f33681baeea1fc02d6827f90297521 
Author: B Tasker                            
                            
Date: 2022-08-26T09:18:18.000+01:00 

Message

Urldecode the label element used for display (websites/Gitlab-Issue-Listing-Script#44)

+1 -1 (2 lines changed)
verified

mentioned in commit b4e1237aa13096d286dd54162c84288b5c128dd8

Commit: b4e1237aa13096d286dd54162c84288b5c128dd8 
Author: B Tasker                            
                            
Date: 2022-08-26T09:24:41.000+01:00 

Message

Make links to issues more obvious (websites/Gitlab-Issue-Listing-Script#44)

+10 -7 (17 lines changed)
verified

mentioned in commit 6b6a4f917db635e5c8701f0e1805238222f6447e

Commit: 6b6a4f917db635e5c8701f0e1805238222f6447e 
Author: B Tasker                            
                            
Date: 2022-08-26T09:35:25.000+01:00 

Message

Collapse timeline when on small screens (websites/Gitlab-Issue-Listing-Script#44)

+34 -3 (37 lines changed)

This is the timeline collapsed in a screen width of 450px

Screenshot_20220826_093557

I'm going to close this as Done - although I'm sure we'll end up making it prettier later, I'm reasonably happy with it as is: it allows me to see what I need to be able to see.

mentioned in issue #46

mentioned in issue #48

mentioned in issue #57