Bug 25442 - Release dates are missing from the timeline
Summary: Release dates are missing from the timeline
Status: RESOLVED DUPLICATE of bug 26425
Alias: None
Product: Koha
Classification: Unclassified
Component: Documentation (show other bugs)
Version: Main
Hardware: All All
: P5 - low minor (vote)
Assignee: Martin Renvoize
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-05-10 11:30 UTC by Katrin Fischer
Modified: 2020-10-12 08:21 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 25442: Add release dates from the timeline (10.01 KB, patch)
2020-06-03 13:39 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 25442: Use tags to update history (136.01 KB, patch)
2020-06-05 17:08 UTC, Martin Renvoize
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Katrin Fischer 2020-05-10 11:30:44 UTC
The last entry in the history.txt on master is:

1069 1574336176      November 21 2019        Lisette Scheer becomes the 413th developer to have a patch pushed       developer

I think it probably needs a bit of updating!
Comment 1 Jonathan Druart 2020-06-02 12:35:23 UTC
The last line on master is

1084 1589278508>-May 12 2020>Slava Shishkin becomes the 428th developer to have a patch pushed>--developer
Comment 2 Jonathan Druart 2020-06-02 12:35:49 UTC
However it's missing the minor releases' dates
Comment 3 Jonathan Druart 2020-06-03 13:39:55 UTC
Created attachment 105523 [details] [review]
Bug 25442: Add release dates from the timeline

It also fixes 326th<=>327th and 393rd<=>394th dev positions
Comment 4 Jonathan Druart 2020-06-05 11:23:55 UTC
The dates are wrong, epoch must come from commit dates, and the date converted in UTC.
Comment 5 Martin Renvoize 2020-06-05 11:42:37 UTC
OK.. I think we need distinct bugs.. one for correcting the epoch date vs display date issue (I've updated bin/get_developers.pl to output a nicely formatted fix for this in the release_tools and can upload a generated patch here or on a new bug) and one to add in all the missing releases.. minor releases are hard to pick out of the commit log as they're each on their own branch.
Comment 6 Jonathan Druart 2020-06-05 12:36:57 UTC
I am doing that:
git log --tags --simplify-by-decoration --pretty="format:%at %d"|grep 'tag: v'|sort -n
Comment 7 Martin Renvoize 2020-06-05 14:29:00 UTC
Nice.. I didn't think about looking at it from the tags perspective.
Comment 8 Martin Renvoize 2020-06-05 15:10:21 UTC
get_developers now uses tags for releases.. but tags aren't entirely consistent so some manual cleaning may be required.. I'll work through that and submit a patch here including both set of changes
Comment 9 Jonathan Druart 2020-06-05 15:25:57 UTC
Please share the script in the release-tools repo.

My code was:

my $tags = `git log --tags --simplify-by-decoration --pretty="format:%at %d"|grep 'tag: v'|sort -n`;
#2014-01-23 16:08:37 -0300  (tag: v3.12.09, 3.12.X)
for my $tag ( split "\n", $tags ) { 
    if ( $tag =~ m|^(?<epoch>\d+)\s+\(tag: v(?<version>\d+\.\d+\.\d+)| ) { 
        my $version = $+{version};
        my $epoch = $+{epoch};
        $events->{$epoch} = { epoch => $epoch, description => "Koha $version released", tags => 'releases' };
    } else {
        say "$tag DOES NOT MATCH";
    }   
}
Comment 10 Martin Renvoize 2020-06-05 17:08:25 UTC
Created attachment 105594 [details] [review]
Bug 25442: Use tags to update history
Comment 11 Martin Renvoize 2020-06-05 17:09:22 UTC
see alternative patch.. mostly from the updated get_developers with some manual interaction
Comment 12 Katrin Fischer 2020-06-07 11:43:02 UTC
Is the alternative ready for testing?
Comment 13 Martin Renvoize 2020-06-08 08:36:44 UTC
Yes, please take a look at the alternative.. the script used to produce it is available here: https://gitlab.com/koha-community/release-tools/-/blob/master/bin/get_developers.pl

With the relevant code changes in the last two commits, the former of which just uncomments the Time::Moment handling to ensure we use epoch time of the commit for the display line in the history and the latter adds handling to catching versions via git tags.
Comment 14 Magnus Enger 2020-10-10 18:29:41 UTC
$ git bz apply 25442
Bug 25442 - Release dates are missing from the timeline

105594 - Bug 25442: Use tags to update history

Apply? [(y)es, (n)o, (i)nteractive] y
Applying: Bug 25442: Use tags to update history
Using index info to reconstruct a base tree...
M	docs/history.txt
Falling back to patching base and 3-way merge...
Auto-merging docs/history.txt
CONFLICT (content): Merge conflict in docs/history.txt
error: Failed to merge in the changes.
Patch failed at 0001 Bug 25442: Use tags to update history
Use 'git am --show-current-patch' to see the failed patch
When you have resolved this problem run "git bz apply --continue".
If you would prefer to skip this patch, instead run "git bz apply --skip".
To restore the original branch and stop patching run "git bz apply --abort".
Patch left in /tmp/Bug-25442-Use-tags-to-update-history-SuS8Jj.patch

The most recent entry in history.txt is now this:

1598907821      August 31 2020  Koha 20.05.03 released  releases

Not sure if the point of the patch here is to change the format or method of generating history.txt in some way, or just to update it? If it is the latter it seems to have been bypassed by other updates.
Comment 15 Jonathan Druart 2020-10-12 08:20:44 UTC
Has been fixed by bug 26425.

*** This bug has been marked as a duplicate of bug 26425 ***