Uploaded image for project: 'Grouper'
  1. Grouper
  2. GRP-2574

Please add a parentStem function to PspJexlUtils.java

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Unresolved
    • Minor
    • None
    • None
    • None
    • None

    Description

      Given a string formatted as a follows:

      app:department:it:it_application or app:department:it:it_application:

      A simple function would be to return the last stem name.
      Template: function parentStem(stemDN)

      parentStem('app:department:it:it_application') returns it_application
      parentStem('app:department:it:it_application:') returns it_application

      As an optional enhancement, it should return the name of the stem at <index> from the end.

      Template: function parentStem2(stemDN, indexFromEnd)

      parentStem2('app:department:it:it_application',0) returns it_application
      parentStem2('app:department:it:it_application',1) returns it

      The function could be simple or complex depending upon how much one would handle bad index parameters or how complex you want to make the function.
      Handling or not handling trailing colons would be a choice.

      Attachments

        Activity

          People

            chris.hyzer@at.internet2.edu Chris Hyzer (upenn.edu)
            rachel.louden@at.internet2.edu Rachel Louden (uncc.edu)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: