Class CopyTree.ScriptCopyTreeResultBean

  • All Implemented Interfaces:
    mks.frame.triggers.ScriptExposableBean
    Enclosing class:
    CopyTree

    public static class CopyTree.ScriptCopyTreeResultBean
    extends LocalTriggerManager.ScriptIMBaseBean
    implements mks.frame.triggers.ScriptExposableBean
    The Copy Tree Result Bean (imCopyTreeResultBean).

    This bean is available when the copytree post trigger is fired.

    The post copytree trigger is fired after the copytree operation has committed. At this point, it has completed. Both this bean, and the imCopyTreeArgsBean (see CopyTree.ScriptCopyTreeArgsBean) are available.

    The purpose of this bean is to determine the set of mappings of old issues to new issues.

    • Constructor Detail

      • ScriptCopyTreeResultBean

        public ScriptCopyTreeResultBean​(java.util.Map<java.lang.Integer,​java.util.List<java.lang.Integer>> result,
                                        int userId,
                                        java.sql.Connection c)
    • Method Detail

      • getResultMapV2

        public java.util.Map<java.lang.Integer,​java.util.List<java.lang.Integer>> getResultMapV2()
        Retrieve the map from the source issue id to the target issue id(s). There are cases where multiple items are related to the same item within the context of a copy, that one same item will be copied multiple times, thus requiring a List of resulting Integers to be returned.
        Returns:
        a Map where the key is an Integer and the value is a list of Integers. The key is the source issue id, and the associated value are the resulting issue id(s).
      • getResultMap

        @Deprecated
        public java.util.Map<java.lang.Integer,​java.lang.Integer> getResultMap()
        Deprecated.
        This method may return invalid results. Please use getResultMapV2() in the future.
        Retrieve the map from the source issue id to the target issue id. Warning! There are cases where multiple items are related to the same item within the context of a copy, that one same item will be copied multiple times. This method will return an incorrect Map object which only contains one of those created items in that case. If this case is not encountered, the returning Map object will be correct. If the aforementioned case could be encountered, please use getResultMapV2().
        Returns:
        a Map where both key and value are Integer objects. The key is the source issue id, and the associated value is the resulting issue id.
      • getResultingIssues

        public java.util.List<java.lang.Integer> getResultingIssues​(int source)
        Retrieve new specific new issue id(s) corresponding to a specific old issue id.
        Returns:
        the integer issue id(s) in a List, or null if the source issue was not one of the issues that was copied.
      • getResultingIssue

        @Deprecated
        public java.lang.Integer getResultingIssue​(int source)
        Deprecated.
        This method may return invalid results. Please use getResultingIssues in the future.
        Retrieve an specific new issue id corresponding to a specific old issue id. Warning! There are cases where multiple items are related to the same item within the context of a copy, that one same item will be copied multiple times. This method will return only one Integer of those created items in that case. If this case is not encountered, the returning Integer will be correct. If the aforementioned case could be encountered, please use getResultingIssues().
        Returns:
        the integer issue id, or null if the source issue was not one of the issues that was copied.
      • getExposedName

        public java.lang.String getExposedName()
        The name of this bean: imCopyTreeResultBean
        Specified by:
        getExposedName in interface mks.frame.triggers.ScriptExposableBean
        Specified by:
        getExposedName in class ScriptBaseBean
        Returns:
        the bean name: siMemberBean.