#390: Product wiki syntax
-------------------------+-------------------------------------------------
  Reporter:  olemis      |      Owner:  olemis
      Type:  task        |     Status:  accepted
  Priority:  major       |  Milestone:
 Component:              |    Version:
  multiproduct           |   Keywords:  product resource wiki syntax
Resolution:              |  TracLinks
-------------------------+-------------------------------------------------

Comment (by olemis):

 I'm proposing to new patches for #390 .
 [attachment:t355_r1450181_trac_test_ticket_wikisyntax.diff:ticket:355 The
 first one] is the continuation of the work made in #355 (reopened
 accordingly) . It checks for ticket wiki syntax . OTOH
 [attachment:t390_r1450181_product_wikisyntax.diff the second one]
 implements product link resolver . Thatalso includes nested expressions
 referencing product resources .

 They have been built and tested against r1452271 and should be applied in
 the following order :

 {{{
 #!sh

 $ hg qapplied
 t355/t355_r1452271_trac_test_ignore_subpkg_root.diff
 t355/t355_r1452271_trac_test_ticket_wikisyntax.diff
 t390/t390_r1452271_product_wikisyntax.diff

 }}}

 Observations :

   - If you take a look at [http://pastebin.com/PSzv0eZd this test report]
     including a relevant subset of the test suite affected by these
 modifications
     then you might notice that the only failed test cases are
     * those for `TicketQuery` , maybe related to #434
       (@jure @mathevzb could you please take a look ?)
     * ... and a few more to check for a bizarre case (unicode chars , etc
 ...)
       I'll deal with this one .
   - I have improved built-in `WikiTestCase` class to introduce the notion
 of
     product testing environments, which may be useful to assert similar
     conditions for both global and product envs by writing test code once
 .
     I'm hoping this will be used more often beyond this limited context
     so that we make use of these in a consistent manner .
   - The solution is smart when expanding nested (i.e. product: , global:)
 TracLinks
     expressions containing whitespaces . For instance the equivalent of
 this link
     `search:"foo bar"` will be `global:"search:foo bar"` or
     `product:"PREFIX:search:foo bar"` instead of `global:"search:\"foo
 bar\""` .
     More examples in the test cases.
   - I have been trying to stay consistent with established rules of
     TracLinks expansion by removing product:prefix in some link labels
     and keeping it under other circumstances . See samples test cases.
   - ... nonetheless there is a notable case I'm not comfortable with.
     See #433
   - product::realm:id will not be parsed by the link resolver without
     a few quotes , and thereby will not be supported . Scheduled in #435
   - If expanded links consist of an outermost tag having `title`
     attribute then nested links formatter (the heart of the whole
     thing ;) will decorate the title automatically using `<global>`
     or `[PREFIX]` depending on the context . See the test cases.
   - ... this leaves attachment: fragments behind (see #436)
   - I have started patches for enhanced ticket and report syntax ...
     coming soon , please be patient .
   - While working on product environments , models should be
     automatically constrained to using product prefix . This is
     also related to the duality in using both product
     prefix column as well as custom field for tickets . See #437
   - The solution should be smart enough to detect whether absolute or
     relative href(s) should be used to generate URLs . Test cases
     needed though (see #442)
   - Some product-specific extensions to the environment API have been
     developed (see #443)
   - The solution puts rendering engine in the right permissions
     context while expanding global: and product: links .

 I wanted to share what I got sooner rather than later . Please review the
 test cases for further details about how product: and global: TracLinks
 namespaces are supposed to work . Suggest modifications accordingly .
 There's another pending patch for custom wiki syntaxes . Nonetheless ,
 after the comments I received today via the [email protected] ML I'm
 switching to another task . I'll come back on this once I finish those .

-- 
Ticket URL: <https://issues.apache.org/bloodhound/ticket/390#comment:6>
Apache Bloodhound <https://issues.apache.org/bloodhound/>
The Apache Bloodhound (incubating) issue tracker

Reply via email to