Home Analyst Portal

Change Request Primary Owner

Steve_O'ConnorSteve_O'Connor Customer IT Monkey ✭
We've been asked to add primary owner to Change Requests within our organisation.

I've followed a similar path to this: https://community.cireson.com/discussion/169/add-support-group-field-to-portal-ma-activity-form

I've added the class using the authoring tool, created it in the same way as the Incident Primary owner, edited the CR form.js

I can now see the primary owner field and I can select an analyst. However when I hit apply the field is cleared. I'm guessing I'm missing something to do with relating the field to the ticket?

Best Answer

Answers

  • Brett_MoffettBrett_Moffett Cireson PACE Super IT Monkey ✭✭✭✭✭
    Can you post your custom CR Form js?
  • Steve_O'ConnorSteve_O'Connor Customer IT Monkey ✭
    No problem, it has the custom support group as well.
  • Brett_MoffettBrett_Moffett Cireson PACE Super IT Monkey ✭✭✭✭✭
    I can see the Custom Support group on this form but not the Primary Owner.
    Not sure if I am missing something or not.....
  • Steve_O'ConnorSteve_O'Connor Customer IT Monkey ✭
    Sorry! Wrong version! Here's the correct one
  • Brett_MoffettBrett_Moffett Cireson PACE Super IT Monkey ✭✭✭✭✭
    Yep. That's better.
    The ChangeRequest.js looks fine to me.
    Let me chase up some other pieces and I'll let you know....   Stay Tuned
  • Conner_WoodConner_Wood Customer Ninja IT Monkey ✭✭✭✭
    edited July 2016

    I was unaware of the "FilterByAnalyst:TRUE" property you have included for this UserPicker, can you confirm if not having it specified will allow you to save it correctly.

    I also had to have a custom relationship called "Authorizing Manager" for CR and SR tickets and this is how I would set up the structure knowing what I learned:

    ChangeRequest.js

    {DataType: "UserPicker", PropertyDisplayName: "Authorizing Manager", PropertyName: "CRAuthorizer" },


    My.ChangeRequest.Extension

      <TypeDefinitions>
        <EntityTypes>
          <ClassTypes>
            <ClassType ID="ChangeRequest.MyExtension" Accessibility="Public" Abstract="false" Base="CoreChangeRequest!System.WorkItem.ChangeRequest" Hosted="false" Singleton="false" Extension="true">
            </ClassType>
          </ClassTypes>
          <RelationshipTypes>
            <RelationshipType ID="ChangeRequest.AuthorizedBy" Accessibility="Public" Abstract="false" Base="System!System.Reference">
              <Source ID="ChangeRequestAuthorizedBy" MinCardinality="0" MaxCardinality="2147483647" Type="CoreChangeRequest!System.WorkItem.ChangeRequest" />
              <Target ID="CRAuthorizer" MinCardinality="0" MaxCardinality="1" Type="System!System.User" />
            </RelationshipType>
          </RelationshipTypes>
        </EntityTypes>
      </TypeDefinitions>


    My.ChangeRequest.Extension.DataWarehouse

    <Warehouse>
        <Facts>
          <!--Change Request Extension Relationships to bind to our Datawarehouse-->
          <RelationshipFact ID="ChangeAuthorizedByUserFact" Accessibility="Public" Domain="DWBase!Domain.Common" TimeGrain="Hourly" SourceType="CoreChangeRequest!System.WorkItem.ChangeRequest" SourceDimension="ChangeRequestDW!ChangeRequestDim">
            <Relationships RelationshipType="MyChangeExtension!ChangeRequest.AuthorizedBy" TargetDimension="DWBase!UserDim" />
          </RelationshipFact>
        </Facts>
      </Warehouse>

    Note:  Did you notice that for the ChangeRequest.js file I had to set the PropertyName to the Custom Relationship Target ID ( CRAuthorizer ) and it must be a unique name ID so the Cireson Portal can correctly query the custom relationship.  In hindsight perhaps Cireson should consider functionality for specifying a full relationship endpoint path like so ( assuming '\' would be a valid separator character that the IDs could not have ):

    ChangeRequest.AuthorizedBy\CRAuthorizer" },{DataType: "UserPicker", PropertyDisplayName: "Authorizing Manager", PropertyName: "

    Or Perhaps another js property to ensure the correct relationship is grabbed

    CRAuthorizer", RelationshipClassID: "ChangeRequest.AuthorizedBy" },{DataType: "UserPicker", PropertyDisplayName: "Authorizing Manager", PropertyName: "

    If Cireson already has this functionality, why could I not find any documentation?  >:)

  • Brett_MoffettBrett_Moffett Cireson PACE Super IT Monkey ✭✭✭✭✭
    This KB article does talk about FilterByAnalyst: https://support.cireson.com/KnowledgeBase/View/51#/
    But it is a little buried.
  • Conner_WoodConner_Wood Customer Ninja IT Monkey ✭✭✭✭
    Good spot, but as I thought, regarding existence of RelationshipClass Property, there is not.
  • Brett_MoffettBrett_Moffett Cireson PACE Super IT Monkey ✭✭✭✭✭
    Hi Steve, After looking at you ChangeRequest.JS file closer, I can see that the User Picker seems to be trying to save the result to a property rather than a relationship. I assume the class extension you added built a relationship for the new "Primary User" with a standard User Class.
    If so, then the data being saved is with that relationship not with the property name.

    This KB article walks you through how to do what you are after:  https://support.cireson.com/KnowledgeBase/View/1174#/

    Hopefully this makes more sense.
  • Steve_O'ConnorSteve_O'Connor Customer IT Monkey ✭
    Thanks all!

    So here's my XML

    <TypeDefinitions><br>    <EntityTypes><br>      <ClassTypes><br>        <ClassType ID="ClassType_Cireson.ChangeRequest.SupportGroupExtension" Accessibility="Public" Abstract="false" Base="Alias_0ec4e8d1_a5a2_46fe_8542_ca69c67d2dcb!System.WorkItem.ChangeRequest" Hosted="false" Singleton="false" Extension="true"><br>          <Property ID="SupportGroup" Type="enum" AutoIncrement="false" Key="false" CaseSensitive="false" MaxLength="256" MinLength="0" Required="false" Scale="0" EnumType="ChangeRequestSupportGroupEnum" /><br>        </ClassType><br>      </ClassTypes><br>      <RelationshipTypes><br>        <RelationshipType ID="PrimaryOwner" Accessibility="Public" Abstract="false" Base="System!System.Reference"><br>          <Source ID="Source_1a3d6ee0_bd97_4e30_bfa9_b986ba7c4474" MinCardinality="0" MaxCardinality="2147483647" Type="Alias_0ec4e8d1_a5a2_46fe_8542_ca69c67d2dcb!System.WorkItem.ChangeRequest" /><br>          <Target ID="Target_7abf49a8_b76d_4246_ab75_e46fc9d35fd5" MinCardinality="0" MaxCardinality="1" Type="System!System.User" /><br>        </RelationshipType><br>      </RelationshipTypes><br>      <EnumerationTypes><br>        <EnumerationValue ID="ChangeRequestSupportGroupEnum" Accessibility="Public" /><br>        <EnumerationValue ID="ChangeRequestPrimaryOwner" Accessibility="Public" /><br>      </EnumerationTypes><br>    </EntityTypes><br>  </TypeDefinitions>


    I'm using the Cireson Change Request Support group extension and adding to it as it already extends the CR class

    So following @Conner_Wood example, i have tried:

    { DataType: "UserPicker", PropertyDisplayName: "Primary Owner", PropertyName: "Target_7abf49a8_b76d_4246_ab75_e46fc9d35fd5", RelationshipClassID:="PrimaryOwner", FilterByAnalyst: true},

    Still missing something though :( The CR just hangs on opening.

    Filter by analyst makes no difference with or without, same result.

    Thanks for all the help so far everyone! Really appreciate it.


  • Steve_O'ConnorSteve_O'Connor Customer IT Monkey ✭
    Thanks @Conner_Wood was hoping to avoid type projections :( I'll get stuck in at some point and see how I get on.
Sign In or Register to comment.