#3778 Commits shown in "related artifacts" don't work

unreleased
wont-fix
nobody
42cc (432)
General
nobody
2012-09-04
2012-02-22
No

The link and description on https://sourceforge.net/p/allura/tickets/3777/ are not good. It has <a href="#">Commit: &lt;Commit 9d71562bd33a8995db4fbff706e56e4ddf3f0cdc&gt;</a><br> but the href needs to be set, and the text should not duplicate "Commit" nor have angle brackets. Using a short 6-char hash would be nice, and bonus points for including the first line of the commit message (up to 72 chars).

Example commit reference [zarkov:code:9d71562bd33a8995db4fbff706e56e4ddf3f0cdc]

Discussion

  • Dave Brondsema

    Dave Brondsema - 2012-04-26
    • labels: --> 42cc
     
  • Yaroslav Luzin - 2012-04-27

    Created #44: [3778] Change the link and description for commits in related artifacts (1cp)

     
  • Anonymous - 2012-05-05

    Originally by: vice-versa

    Cannot open ticket from description
    https://sourceforge.net/p/allura/tickets/3777/
    Error 403
    Read access required
    Please add sample commit link

     
  • Anonymous - 2012-05-05

    Originally by: vice-versa

    Sergey
    less than 1 minute ago
    Cannot open ticket from description
    https://sourceforge.net/p/allura/tickets/3777/
    Error 403
    Read access required
    Please add sample markdown commit link

     
  • Dave Brondsema

    Dave Brondsema - 2012-05-07

    Example commit reference [zarkov:code:9d71562bd33a8995db4fbff706e56e4ddf3f0cdc]

     
  • Dave Brondsema

    Dave Brondsema - 2012-05-07
    • Description has changed:

    Diff:

    --- old 
    +++ new 
    @@ -1,1 +1,3 @@
     The link and description on https://sourceforge.net/p/allura/tickets/3777/ are not good.  It has `<a href="#">Commit: &lt;Commit 9d71562bd33a8995db4fbff706e56e4ddf3f0cdc&gt;</a><br>` but the href needs to be set, and the text should not duplicate "Commit" nor have angle brackets.  Using a short 6-char hash would be nice, and bonus points for including the first line of the commit message (up to 72 chars).
    +
    +Example commit reference [zarkov:code:9d71562bd33a8995db4fbff706e56e4ddf3f0cdc]
    
     
  • Dave Brondsema

    Dave Brondsema - 2012-05-07

    I've added an example to the description text, and you can see it under the "Related" header now.

     
  • Anonymous - 2012-05-10

    Originally by: tramadolmen

    When i created ticket at first time. I got only this:
    <div class="markdown_content"><p><a href="/p/project2/code/ci/798a93b043432888301cb999dde0e17d146247d8/">[project2:code:798a93b043432888301cb999dde0e17d146247d8]</a></p></div>
    After edit ticket text:
    <div class="markdown_content"><p><a href="/p/project2/code/ci/798a93b043432888301cb999dde0e17d146247d8/">[project2:code:798a93b043432888301cb999dde0e17d146247d8]</a></p></div>&nbsp;
    <h4>Related</h4>
    <p>
    <a href="/p/project2/code/ci/798a93b043432888301cb999dde0e17d146247d8/">Commit: [798a93]</a><br>
    </p>
    It looks like what you want. What i am doing wrong?
    
     
  • Dave Brondsema

    Dave Brondsema - 2012-05-10

    That does look good, but that's not what is showing up on this very ticket. It has:

    <h4>Related</h4>
    <p>
    
      <a href="#">Commit: &lt;Commit 9d71562bd33a8995db4fbff706e56e4ddf3f0cdc&gt;</a><br>
    
    </p>
    

    I don't know what the difference is, you'll have to look around through the code to see what could case it.

     
  • Anonymous - 2012-05-11

    Originally by: tramadolmen

    Your situation was arising when Commit object can't resolve his repo property.
    In template:
    <a href="{{related.url()}}">{{related.type_s}}: {{related.link_text()}}</a><br>
    In Commit class:
    
    def shorthand_id(self):
        if self.repo is None: self.repo = self.guess_repo()
        if self.repo is None: return repr(self)
        return self.repo.shorthand_for_commit(self._id)
    
    def url(self):
        if self.repo is None: self.repo = self.guess_repo()
        if self.repo is None: return '#'
        return self.repo.url_for_commit(self.legacy)
    

    Maybe somewhere is the bug if object repo was None and it can't set it by guess_repo function.
    So i can change shorthand_id and url functions for repo=None or try to find problem, but it will be difficult for me, because in my local site everything is ok

     
  • Dave Brondsema

    Dave Brondsema - 2012-05-11

    Okay, let's leave it as-is then.

    We are working on a big backend change to repo/commit data models which might fix this. We'll see. And if it doesn't, we can revisit later after that branch is merged.

    Thanks

     
  • Dave Brondsema

    Dave Brondsema - 2012-05-11
    • status: open --> wont-fix
     
  • Yaroslav Luzin - 2012-05-14

    Closed ticket #44 as 'wont-fix'

     

Log in to post a comment.