Project

General

Profile

Actions

Feature #36679

closed

Export a version as changelog text

Added by Go MAEDA almost 3 years ago. Updated over 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Roadmap
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed

Description

I suggest a feature to export a version as text. One of the uses of the text is a changelog.

You will be able to get the text by clicking "Also available in: TXT" link placed in the bottom right of the version page.

If you export https://www.redmine.org/versions/5 as text, you will get the following output:

# Changelog

## 0.7.3

2008-07-06

Security+Bug fix release

* Defect #52: bulgarian language issue
* Defect #1426: User model does not allow person's first name to contain a dot '.'
* Feature #1506: Add title length note and error info when creating project or creating news
* Patch #1218: Patch for relative links to icon images in 'public/help/wiki_syntax.html'
* Patch #1425: Entourage (and some old client) fails to correctly render notification styles
* Patch #1524: back_url redirects inappropriately when blank
* Patch #1527: Add Project Name to Cross-Project Atom Feed

Files

screenshot_2022-08-26_16_38_29.png (95.5 KB) screenshot_2022-08-26_16_38_29.png Mizuki ISHIKAWA, 2022-08-26 09:39
feature-36679.patch (3.43 KB) feature-36679.patch Mizuki ISHIKAWA, 2022-08-26 09:40
feature-36679-v2.patch (3.53 KB) feature-36679-v2.patch Go MAEDA, 2022-09-07 15:44
feature-36679-v3.patch (3.52 KB) feature-36679-v3.patch Go MAEDA, 2022-09-17 10:50
feature-36679-v4.patch (5.89 KB) feature-36679-v4.patch Mizuki ISHIKAWA, 2023-04-06 09:29

Related issues

Related to Redmine - Feature #1800: Changelog creatorNew2008-08-19

Actions
Related to Redmine - Feature #7043: Give user ability to generate changelogsClosed2010-12-04

Actions
Actions #1

Updated by Go MAEDA almost 3 years ago

Actions #2

Updated by Mizuki ISHIKAWA almost 3 years ago

+1

Actions #3

Updated by Go MAEDA almost 3 years ago

  • Related to Feature #7043: Give user ability to generate changelogs added
Actions #4

Updated by Mizuki ISHIKAWA over 2 years ago

I have attached a patch to add this functionality.

Actions #5

Updated by Go MAEDA over 2 years ago

I made the following changes to the patch:

  • Add "*" at the beginning of each issue line
  • Fix the problem that the last issue line does not have trailing "\n"
Actions #6

Updated by Go MAEDA over 2 years ago

I updated the patches to use the version name instead of the id when exporting to a file.

Suppose that the id of the version is 2 and the name is "1.0". In this case, the filename of the exported text will be "version-2.txt". I think it is very confusing that the file name for exporting version "1.0" is "version-2.txt".

The new patch exports version "1.0" as "1.0.txt". This behavior is consistent with #16207.

Actions #7

Updated by Mischa The Evil over 2 years ago

Here are my thoughts based on feature-36679-v3.patch in case it is decided to add this to the Redmine core:
  • for clarity and consistency a colon should be added between the issue id and the subject (i.e. "* #{issue.tracker.name} ##{issue.id}: #{issue.subject}\n");
  • for consistency (with e.g. wiki pages) the link-text should be changed from "Text" to "TXT";
  • on a more general note: I don't think that the version_details_to_text method belongs in the Version model. I think it would be better to have it as a helper or as a method inside a dedicated 'export' module under source:/trunk/lib/redmine/export (this would also remove the need to include Redmine::I18n into the Version model).
Actions #8

Updated by Mizuki ISHIKAWA over 1 year ago

Mischa The Evil wrote in #note-7:

Here are my thoughts based on feature-36679-v3.patch in case it is decided to add this to the Redmine core:
  • for clarity and consistency a colon should be added between the issue id and the subject (i.e. "* #{issue.tracker.name} ##{issue.id}: #{issue.subject}\n");
  • for consistency (with e.g. wiki pages) the link-text should be changed from "Text" to "TXT";
  • on a more general note: I don't think that the version_details_to_text method belongs in the Version model. I think it would be better to have it as a helper or as a method inside a dedicated 'export' module under source:/trunk/lib/redmine/export (this would also remove the need to include Redmine::I18n into the Version model).

Thank you for your feedback.
I have updated the patch based on your feedback.

Actions #9

Updated by Go MAEDA over 1 year ago

  • Target version changed from Candidate for next major release to 5.1.0

Setting the target version to 5.1.0.

Actions #10

Updated by Go MAEDA over 1 year ago

  • Status changed from New to Closed
  • Assignee set to Go MAEDA
  • Resolution set to Fixed

Committed the patch in r22179. Thank you.

Actions

Also available in: Atom PDF