[Bps-public-commit] assets branch, links, created. 1.05-1-gec63ac8

Dustin Graves dustin at bestpractical.com
Mon Aug 17 12:52:49 EDT 2015


The branch, links has been created
        at  ec63ac8a77d7cc3ec7381ca7fd62c7bd2c4b93ac (commit)

- Log -----------------------------------------------------------------
commit ec63ac8a77d7cc3ec7381ca7fd62c7bd2c4b93ac
Author: Dustin Graves <dustin at bestpractical.com>
Date:   Mon Aug 17 16:47:32 2015 +0000

    Change asset link to save proper id and not verbatim string e.g. 1 not 001
    
    Fixes: I#30610

diff --git a/lib/RT/URI/asset.pm b/lib/RT/URI/asset.pm
index aeab115..19fefb7 100644
--- a/lib/RT/URI/asset.pm
+++ b/lib/RT/URI/asset.pm
@@ -138,7 +138,8 @@ sub ParseURI {
 
     # canonicalize "42" and "asset:42" -> asset://example.com/42
     if ($uri =~ /^(?:\Q$scheme\E:)?(\d+)$/i) {
-        $self->{'uri'} = $self->LocalURIPrefix . $1;
+        my $assetId = 0+$1; # convert asset id $1 into proper number format
+        $self->{'uri'} = $self->LocalURIPrefix . $assetId;
     }
     else {
         $self->{'uri'} = $uri;

-----------------------------------------------------------------------


More information about the Bps-public-commit mailing list