Maven Changes Plugin
  1. Maven Changes Plugin
  2. MCHANGES-245

Custom mapping of IMS issue types to action types for announcements

    Details

    • Type: New Feature New Feature
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.4
    • Fix Version/s: 2.6
    • Component/s: announcement
    • Labels:
      None
    • Number of attachments :
      1

      Description

      The current version only maps "Bug", "New Feature" and "Improvement" issues types to "fix", "add" and "update" actions. If the issue type from the IMS isn't recognized the default action type is blank and this leads to the issue not being included within the announcement when using the default template.

      This set of supported issue types can be limiting with a modern JIRA installation as is it has a greater range of issue types and can be extended with additional types. The most flexible solution for JIRA and other IMSes would be to allow the the mapping of issue types to action types.

        Issue Links

          Activity

          Hide
          Alan Parkinson added a comment -

          I have created a possible solution to the ticket based on adding a new configuration parameter "issueTypes". The parameter is a map that takes the action type as the key and the value as a comma separated string of issue types e.g.
          <issueTypes>
          <add>New Feature, Story, Epic</add>
          </issueTypes>

          If action type is not defined in the map (The example doesn't defined "fix" or "update") the default issue types are used for the undefined action types.

          Show
          Alan Parkinson added a comment - I have created a possible solution to the ticket based on adding a new configuration parameter "issueTypes". The parameter is a map that takes the action type as the key and the value as a comma separated string of issue types e.g. <issueTypes> <add>New Feature, Story, Epic</add> </issueTypes> If action type is not defined in the map (The example doesn't defined "fix" or "update") the default issue types are used for the undefined action types.
          Hide
          Benson Margulies added a comment - - edited

          Patch applied rev 1131456. Thanks.

          r1131456 | bimargulies | 2011-06-04 14:13:08 -0400 (Sat, 04 Jun 2011) | 1 line

          MCHANGES-245: customization of issue types (from Alan Parkinson)

          Show
          Benson Margulies added a comment - - edited Patch applied rev 1131456. Thanks. r1131456 | bimargulies | 2011-06-04 14:13:08 -0400 (Sat, 04 Jun 2011) | 1 line MCHANGES-245 : customization of issue types (from Alan Parkinson)
          Hide
          Dennis Lundberg added a comment -

          Alan and Benson,

          I'm not feeling comfortable with the patch that was applied for a couple of reasons.

          • The new parameter in AnnouncementMojo.java needs an example of how one would configure the plugin to add mappings.
          • The changes to IssueAdapter is not the right way to go. We need to figure out a way to extract the mapping (default values and such) to a class for a specific IMS. This patch exposes the current (not so good) implementation, by adding new public methods. Instead we should create a JIRAAdapter or something similar that can create a mapping Map, which can be used as an input parameter for the IssueAdapter class.

          For the last two releases of the plugin I've been working to try to abstract away the IMS implementation details as much as possible into helper classes and adapters. The goal is to eventually create an IMS API. Therefor I review every change with that in mind.

          Show
          Dennis Lundberg added a comment - Alan and Benson, I'm not feeling comfortable with the patch that was applied for a couple of reasons. The new parameter in AnnouncementMojo.java needs an example of how one would configure the plugin to add mappings. The changes to IssueAdapter is not the right way to go. We need to figure out a way to extract the mapping (default values and such) to a class for a specific IMS. This patch exposes the current (not so good) implementation, by adding new public methods. Instead we should create a JIRAAdapter or something similar that can create a mapping Map, which can be used as an input parameter for the IssueAdapter class. For the last two releases of the plugin I've been working to try to abstract away the IMS implementation details as much as possible into helper classes and adapters. The goal is to eventually create an IMS API. Therefor I review every change with that in mind.
          Hide
          Benson Margulies added a comment -

          Dennis,

          As the code currently stands, it's impossible to even use the plugin with a copy of JIRA that has some mild customization, let alone other IMSes. I think that the end-user value of this functionality is valuable enough to keep this and then fix the modularity. After all, 'public' doesn't mean very much in a plugin.

          I'm happy to go take a run at the modularity and see if I can do some abstraction along those lines.

          --benson

          Show
          Benson Margulies added a comment - Dennis, As the code currently stands, it's impossible to even use the plugin with a copy of JIRA that has some mild customization, let alone other IMSes. I think that the end-user value of this functionality is valuable enough to keep this and then fix the modularity. After all, 'public' doesn't mean very much in a plugin. I'm happy to go take a run at the modularity and see if I can do some abstraction along those lines. --benson
          Hide
          Benson Margulies added a comment -

          Dennis asks me to make the modularity better.

          Show
          Benson Margulies added a comment - Dennis asks me to make the modularity better.
          Hide
          Benson Margulies added a comment - - edited

          r1131497 | bimargulies | 2011-06-04 17:59:16 -0400 (Sat, 04 Jun 2011) | 1 line

          MCHANGES-245: fix stale @since from patch

          Show
          Benson Margulies added a comment - - edited r1131497 | bimargulies | 2011-06-04 17:59:16 -0400 (Sat, 04 Jun 2011) | 1 line MCHANGES-245 : fix stale @since from patch
          Hide
          Benson Margulies added a comment -

          r1132453 | bimargulies | 2011-06-05 12:36:50 -0400 (Sun, 05 Jun 2011) | 1 line

          MCHANGES-245: add more documwntation for new issueTypes parameter on announcements
          ------------------------------------------------------------------------

          Show
          Benson Margulies added a comment - r1132453 | bimargulies | 2011-06-05 12:36:50 -0400 (Sun, 05 Jun 2011) | 1 line MCHANGES-245 : add more documwntation for new issueTypes parameter on announcements ------------------------------------------------------------------------
          Hide
          Dennis Lundberg added a comment -

          Now that the modularity and documentation is in place I think we can close this issue.

          Show
          Dennis Lundberg added a comment - Now that the modularity and documentation is in place I think we can close this issue.
          Hide
          Benson Margulies added a comment -

          Modularity a-la-Dennis done.

          Show
          Benson Margulies added a comment - Modularity a-la-Dennis done.

            People

            • Assignee:
              Benson Margulies
              Reporter:
              Alan Parkinson
            • Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: