Bug 999578

Summary: abilityRFC: Allow add_revision the abilty to scan for the last revision number, not just the first
Product: [Community] Publican Reporter: Norman Dunbar <norman>
Component: publicanAssignee: Jeff Fearn 🐞 <jfearn>
Status: CLOSED CURRENTRELEASE QA Contact: tools-bugs <tools-bugs>
Severity: low Docs Contact:
Priority: unspecified    
Version: futureCC: aigao, rlandman
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: 4.0.0 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-12-19 02:46:51 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Norman Dunbar 2013-08-21 15:25:21 UTC
Description of problem:

In Publican 3.2 using the add_revision command requires that the first revision in the revisionhistory, has a revnumber in the format 1.0-1, for example. This is fine, but my books have their revision history in ascending order.

I would like, if possible, an option for the add_revision command, so that it scans to the last revision in the revisionhistory, and adds the new revision after it, rather than before the first revision.

Bug raised on request from Jeff on the mailing list.


Version-Release number of selected component (if applicable):

3.2.0. May affect previous versions with the add_revision command.


How reproducible:

Always. Tested on Linux Mint 13 KDE on x86-64 laptop. Probably affects all hardware and OSs.


Steps to Reproduce:

1. In a document, which has revision history in oldest first, newest last order, run the command to add_revision. If the revnumber is defaulted, it will increment the revnumber of the very first revision in the history, even if/when more recent revnumbers exist.



Actual results:

For example, revision history :

0.1-0
0.2-0
0.3-0
0.5-0
0.5-1
...
3.2-1

Adding a new revision, which the revnumber autogenerated, results in this:

0.1-1  << Added
0.1-0
...
...
3.2-1

The new revision is incorrect, in theory, it should be 3.2-2 and added at the end.



Expected results:


Adding a new revision, which the revnumber autogenerated, results in this:

0.1-0
0.2-0
...
...
3.2-1
3.2-2  << Should be added here please.

The new revision should be 3.2-2 and added at the end.


Additional info:

I don't know how possible it is to change, but my preference would be for the command to be specified as it is currently and allow it to find the most up to date revision and increment that as opposed to incrementing the first one found. Thanks.

Comment 2 HSS Product Manager 2013-09-18 05:28:06 UTC
HSS-QE has reviewed and declined this request. QE for this bug will be handled by IED.

Comment 3 Jeff Fearn 🐞 2013-09-20 04:47:39 UTC
Added rev_dir parameter, which can be set at the book or brand level, set it to 'asc' or 'ascending' to get publican to reverse it's sorting.

To ssh://git.fedorahosted.org/git/publican.git
   675614f..291b3cd  HEAD -> devel

Comment 4 Ruediger Landmann 2013-10-11 03:03:59 UTC
Verified with publican-3.9.9-0.fc19.t4.noarch -- works with both "asc" and "ascending"