Feature #36679
closed
Export a version as changelog text
Added by Go MAEDA almost 3 years ago.
Updated over 1 year ago.
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
- Related to Feature #7043: Give user ability to generate changelogs added
I have attached a patch to add this functionality.
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"
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.
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).
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.
- Target version changed from Candidate for next major release to 5.1.0
Setting the target version to 5.1.0.
- Status changed from New to Closed
- Assignee set to Go MAEDA
- Resolution set to Fixed
Committed the patch in r22179. Thank you.
Also available in: Atom
PDF