none
Custom manual activity forms not doing what they should RRS feed

  • Question

  • Hi all,

    My turn to ask a question now.... I’m dumbfounded as to why this is happening and wonder if anyone can spot what I am doing wrong.

    I've authored a Management Pack that adds the Support Group field to the Manual Activity class and I've edited the form to show this new field and remove some white space.
    The new form looks like this: 


    I've then extended the Manual Activity class to include the Incident Tier Queue list and have used the binding of the new form picker to the Support Group class extension.

    However,
    When I load the MP (All Successful return codes) I get the extension but not any edits to the form.
    The new tab appears with the new class value. 

    But the form customizations just don’t appear.

    There are no errors when I seal the MP and it imports without an issue.
    I've even created a new MP that just has some basic form changes for the manual activity form (resize of existing controls) and they don’t show up either.  

    I'm stumped…..

      

    Brett Moffett

    Tuesday, February 10, 2015 12:55 AM

Answers

  • Brett - Do you have any 3rd party apps installed in your environments? Especially apps that change/extend preview forms for Manual Activities like the Cireson Preview Pane app? Or did you extend preview forms for Manual Activity class by yourself?

    The same happened to me when I had custom preview forms installed. It seems that somehow if the first form found for a class is an overview form, it is not correctly skipped and the default (uncustomized) OOB form is loaded instead of your own customized form. Removing customized preview pane did it for me.

    Hope this helps!


    Blog: http://scsmlab.com  Twitter: @scsmlab

    • Marked as answer by Brett Moffett Tuesday, February 17, 2015 9:18 PM
    Tuesday, February 17, 2015 12:36 PM

All replies

  • You probably need to restart the console :D

    What happens is that the form is cached locally when opened. Changes to the form will therefore not show before the console is restarted.


    Cheers,

    Anders Spælling

    Senior Consultant

           

    Blog:Twitter:LinkedIn:

    Please remember to 'Propose as answer' if you find a reply helpful


    Tuesday, February 10, 2015 7:38 AM
  • Alas, even after a server reboot it does not work.

    I've even tried it on a totally different SCSM environment to see if it was my lab environment that was screwed up but no luck there either.

    Does anyone know of any trick that stops edits to the Manual Activity form?


    Brett Moffett

    Wednesday, February 11, 2015 6:07 AM
  • Hi,

    It's clear that you has successfully extended the class. Unfortunately it's almost impossible to figure out what happened with your form without your form. Can you upload your MPs somewhere like SkyDrive and put here the link?


    Cheers,
    Marat
    Site: www.scutils.com  Twitter: LinkedIn: Graveyard:

    Wednesday, February 11, 2015 7:43 AM
  • Very true.

    https://onedrive.live.com/redir?resid=45114B7EAD8D54B5!20093&authkey=!ALiTtUr7Zp-RO7s&ithint=file%2cxml

    This MP was created with the Authoring Toolkit so has all the usual mess in there that is not needed, but I've left it in there.

    I'm very interested in why the normal basic form editing techniques that I have used on many other forms in the past, just do not work on Manual Activities....  Really odd.

    Thanks


    Brett Moffett


    • Edited by Brett Moffett Wednesday, February 11, 2015 11:26 AM Added URL
    Wednesday, February 11, 2015 11:25 AM
  • Hi again,

    I put my results here. For the future, please avoid using unsealed MP for a class extension. It has to be sealed to let other MPs reference it. Before using my MPs, please remove your MP, then import ManualActivity.SupportGroup.mp, and then TechNet.SCUtils.managementpack.xml. All sources are there. Good luck :)


    Cheers,
    Marat
    Site: www.scutils.com  Twitter: LinkedIn: Graveyard:

    Wednesday, February 11, 2015 1:37 PM
  • I agree. The Unsealed MP that I have in the link is just for others to see if they can work out my mistake. When I put it in to my environment it is a sealed MP.

    As for your MP, after importing the ManualActivity.SupportGroup.mp I see the Support Group appear on the extension tab:

    But after importing the Technet.SCUtils.managementpack.xml there is no form change to the manual activity.

    This is exactly the same result that I am seeing when I use my management pack.

    Just to prove it was not a silly mistake, I've even tried creating a MP that just changes the size of one of the controls or changes the color of the title, but none of them ever show.

    Marat, When you import your 2 MP's do you get the form to show on manual activities?


    Brett Moffett


    Wednesday, February 11, 2015 10:57 PM
  • Well, It seems that something wrong with your SCSM lab. My MPs work pretty nice in my lab:


    Cheers,
    Marat
    Site: www.scutils.com  Twitter: LinkedIn: Graveyard:

    Thursday, February 12, 2015 1:24 AM
  • I have tried my MP on more than one SCSM environment with the same result.

    Could there be a difference in between our two environments?

    Your MP references v7.5.2905.0 of Management Packs (SCSM 2012 SP1) and my MP references v7.5.3079.0 (SCSM 2012 R2)

    Do you have an R2 environment to test on?


    Brett Moffett

    Thursday, February 12, 2015 3:17 AM
  • That screenshots were from SCSM R2. I created the MPs in SCSM 2012 SP1 AT just because the tool was installed there.

    Cheers,
    Marat
    Site: www.scutils.com  Twitter: LinkedIn: Graveyard:

    Thursday, February 12, 2015 3:53 AM
  • This is very strange then.

    Neither your MP (Which we know works in your environment) or my Management Pack (Which I have no idea if it works anywhere) do not show the form edits in both my environment and in my customers environment.

    There are no errors showing up on either the import of the MP or in the event log.

    I've tried creating the MP on two different PC's and sealing it with 2 different keys.

    I am totally out of ideas.....


    Brett Moffett

    Thursday, February 12, 2015 10:30 PM
  • As a last ditch effort to get my head around this I thought I'd try to at least hide the Extensions tab for the custom Manual Activity form that I have created.

    After doing the usual edits to the XML (http://marcelzehner.ch/2011/07/26/remove-the-extensions-tab-on-the-incident-form/) I sealed the MP and imported it.

    When I load the Manual Activity form, not only is the Support Group list picker control still missing but the Extensions tab is still visible.

    This is telling me that the custom form I am trying to load is just being ignored.

    What would cause a custom form MP to be ignored?

    What happens when there are 2 MP's that both create custom forms with the same base form? Which one wins?


    Brett Moffett

    Thursday, February 12, 2015 11:32 PM
  • The system shouldn'd allow to import the second MP with customization for the same form. If the first customization MP is sealed you have to target the second customization to the custom form instead of the original one. If the first customization is not sealed, you have to edit the first customization MP.

    Cheers,
    Marat
    Site: www.scutils.com  Twitter: LinkedIn: Graveyard:

    Friday, February 13, 2015 1:32 AM
  • Thanks Marat.

    I confirmed that by trying to import two different MP's with customisations to the Manual Activity base form and the import process will not allow me to import the second one, so I know it must not be that causing the issue.

    Why the SCSM environments I am working in are not recognising the custom forms is still a mystery.

    In an attempt to see if it is an issue with my form, I created a new one with basic changes and (after cleaning out all others) imported it.
    The dbo.Form table in the database shows the custom form and it's edits.

    And as you can see from the result below, there is the default form and the custom form that I have based on the base form.

    FormId ManagementPackId FormName FormAccessibility FormTarget FormConfiguration FormAssembly BaseForm FormTypeName TimeAdded LastModified
    0A0F845D-7A5C-5371-D567-44BD2C847D95 D7005B5D-1A68-0B59-DBBF-14D44E026516 AAAAAAMA.Form 0 86B91B1A-E295-4F3B-F6E3-F22580BD5611 <Category>Form</Category> 5DB0D44D-F54A-61FF-A30F-3E712223DD11 NULL PreviewForms.ManualActivityPreviewForm 49:48.4 49:48.4
    04EFD15B-0CF8-B87B-74A6-9FCC01DA399E E1C49C63-6E43-C066-8192-2941312F7022 CustomForm_46e2f2b0_06ee_47f2_9a5c_adef96fa6e4d 0 713F059F-40FD-44E5-C25A-8EC70954A495 <Category>Form</Category><Customization><PropertyChange
    Object="ActivityDescription"
    Property="MinHeight"><NewValue>100</NewValue></PropertyChange><PropertyChange
    Object="StackPanel25"
    Property="Margin"><NewValue>10,5,0,0</NewValue></PropertyChange></Customization>
    NULL 77F0146D-C387-47ED-636B-C529EAAACC29 Microsoft.EnterpriseManagement.ServiceManager.ActivityManagement.Forms.ManualActivityForm 36:42.5 36:42.5
    77F0146D-C387-47ED-636B-C529EAAACC29 7B8D32DB-BDB4-CABF-B947-C013C0E00BAA Microsoft.EnterpriseManagement.ServiceManager.ActivityManagement.Forms.ManualActivityForm 0 D651BF4A-9F5D-0374-3E91-EB91111865C3 <Category> Form
    </Category><FormStrings><FormString
    ID="Label_ActivityType">$MPElement[Name="Microsoft.EnterpriseManagement.ServiceManager.ActivityManagement.Forms.ManualActivityForm.Label_ActivityType"]$</FormString><FormString
    ID="Label_ActivityCreated">$MPElement[Name="Microsoft.EnterpriseManagement.ServiceManager.ActivityManagement.Forms.ManualActivityForm.Label_ActivityCreated"]$</FormString><FormString
    ID="Label_ActivityParentWorkItem">$MPElement[Name="Microsoft.EnterpriseManagement.ServiceManager.ActivityManagement.Forms.ManualActivityForm.Label_ActivityParentWorkItem"]$</FormString><FormString
    ID="Label_ActivityImplementer">$MPElement[Name="Microsoft.EnterpriseManagement.ServiceManager.ActivityManagement.Forms.ManualActivityForm.Label_ActivityImplementer"]$</FormString><FormString
    ID="Label_ImpactedConfigurationItems">$MPElement[Name="Microsoft.EnterpriseManagement.ServiceManager.ActivityManagement.Forms.ManualActivityForm.Label_ImpactedConfigurationItems"]$</FormString><FormString
    ID="TabItem_General">$MPElement[Name="Microsoft.EnterpriseManagement.ServiceManager.ActivityManagement.Forms.ManualActivityForm.TabItem_General"]$</FormString><FormString
    ID="TabItem_History">$MPElement[Name="Microsoft.EnterpriseManagement.ServiceManager.ActivityManagement.Forms.ManualActivityForm.TabItem_History"]$</FormString><FormString
    ID="Button_Open">$MPElement[Name="Microsoft.EnterpriseManagement.ServiceManager.ActivityManagement.Forms.ManualActivityForm.Button_Open"]$</FormString><FormString
    ID="Button_Add">$MPElement[Name="Microsoft.EnterpriseManagement.ServiceManager.ActivityManagement.Forms.ManualActivityForm.Button_Add"]$</FormString><FormString
    ID="Button_Delete">$MPElement[Name="Microsoft.EnterpriseManagement.ServiceManager.ActivityManagement.Forms.ManualActivityForm.Button_Delete"]$</FormString><FormString
    ID="GridViewColumn_Type">$MPElement[Name="Microsoft.EnterpriseManagement.ServiceManager.ActivityManagement.Forms.ManualActivityForm.GridViewColumn_Type"]$</FormString><FormString
    ID="GridViewColumn_ID">$MPElement[Name="Microsoft.EnterpriseManagement.ServiceManager.ActivityManagement.Forms.ManualActivityForm.GridViewColumn_ID"]$</FormString><FormString
    ID="GridViewColumn_Name">$MPElement[Name="Microsoft.EnterpriseManagement.ServiceManager.ActivityManagement.Forms.ManualActivityForm.GridViewColumn_Name"]$</FormString><FormString
    ID="GridViewColumn_Status">$MPElement[Name="Microsoft.EnterpriseManagement.ServiceManager.ActivityManagement.Forms.ManualActivityForm.GridViewColumn_Status"]$</FormString><FormString
    ID="GridViewColumn_Owner">$MPElement[Name="Microsoft.EnterpriseManagement.ServiceManager.ActivityManagement.Forms.ManualActivityForm.GridViewColumn_Owner"]$</FormString></FormStrings>
    45B568D6-C468-3352-E5AD-232AEC8558A2 NULL Microsoft.EnterpriseManagement.ServiceManager.ActivityManagement.Forms.ManualActivityForm 00:16.3 33:51.9

    The only thing that looks slightly odd is the fact that in the Category of the base form, there are lots of spaces in front of and after the Form text.
    When this is copied out and pasted in to an editor two of the characters are Carriage Returns.

    <style type="text/css">.tg {border-collapse:collapse;border-spacing:0;} .tg td{font-family:Arial, sans-serif;font-size:8px;padding:8px 5px;border-style:solid;border-width:1px;overflow:hidden;word-break:normal;} .tg th{font-family:Arial, sans-serif;font-size:12px;font-weight:normal;padding:10px 5px;border-style:solid;border-width:1px;overflow:hidden;word-break:normal;} </style>

    Brett Moffett

    Friday, February 13, 2015 4:05 AM
  • When I then run an SMTrace while creating a template from this form I get these results:

    GetForm called with params: id = 77f0146d-c387-47ed-636b-c529eaaacc29
    Scanning method - GetAutoIncrementRange.\n
    Checking for uber admin.\n
    Scanning method - IsUserAdministrator.\n
    Input string: $MPElement[Name="Microsoft.EnterpriseManagement.ServiceManager.ActivityManagement.Forms.ManualActivityForm.Label_ActivityType"]$
    Input string: $MPElement[Name="Microsoft.EnterpriseManagement.ServiceManager.ActivityManagement.Forms.ManualActivityForm.Label_ActivityCreated"]$
    Input string: $MPElement[Name="Microsoft.EnterpriseManagement.ServiceManager.ActivityManagement.Forms.ManualActivityForm.Label_ActivityParentWorkItem"]$
    Checking access within scope - 597f9d98-356f-4186-8712-4f020f2d98b4.\n
    Input string: $MPElement[Name="Microsoft.EnterpriseManagement.ServiceManager.ActivityManagement.Forms.ManualActivityForm.Label_ActivityImplementer"]$
    Input string: $MPElement[Name="Microsoft.EnterpriseManagement.ServiceManager.ActivityManagement.Forms.ManualActivityForm.Label_ImpactedConfigurationItems"]$
    Checking access within scope - 0f9d808c-3bb2-446c-8c73-aa9a583b546b.\n
    Input string: $MPElement[Name="Microsoft.EnterpriseManagement.ServiceManager.ActivityManagement.Forms.ManualActivityForm.TabItem_General"]$
    Input string: $MPElement[Name="Microsoft.EnterpriseManagement.ServiceManager.ActivityManagement.Forms.ManualActivityForm.TabItem_History"]$
    Checking access within scope - 9a98e4f8-21ca-4cd8-a0b2-bf0e815e48c7.\n
    Input string: $MPElement[Name="Microsoft.EnterpriseManagement.ServiceManager.ActivityManagement.Forms.ManualActivityForm.Button_Open"]$
    Input string: $MPElement[Name="Microsoft.EnterpriseManagement.ServiceManager.ActivityManagement.Forms.ManualActivityForm.Button_Add"]$
    Checking access within scope - e042002a-a844-49b1-a6f1-0343dfc94c66.\n
    Input string: $MPElement[Name="Microsoft.EnterpriseManagement.ServiceManager.ActivityManagement.Forms.ManualActivityForm.Button_Delete"]$
    Input string: $MPElement[Name="Microsoft.EnterpriseManagement.ServiceManager.ActivityManagement.Forms.ManualActivityForm.GridViewColumn_Type"]$
    Input string: $MPElement[Name="Microsoft.EnterpriseManagement.ServiceManager.ActivityManagement.Forms.ManualActivityForm.GridViewColumn_ID"]$
    Checking access within scope - 615ed4a6-42ed-4cb1-9674-41ef6951e521.\n
    Input string: $MPElement[Name="Microsoft.EnterpriseManagement.ServiceManager.ActivityManagement.Forms.ManualActivityForm.GridViewColumn_Name"]$
    Input string: $MPElement[Name="Microsoft.EnterpriseManagement.ServiceManager.ActivityManagement.Forms.ManualActivityForm.GridViewColumn_Status"]$
    Checking access within scope - 7ec18f11-6d26-4744-b856-f245835f67b0.\n
    Input string: $MPElement[Name="Microsoft.EnterpriseManagement.ServiceManager.ActivityManagement.Forms.ManualActivityForm.GridViewColumn_Owner"]$
    Checking access within scope - f9917c1a-d272-4cf0-ad5d-529e9fb93303.\n
    Checking access within scope - a6921721-b189-47b0-95cc-538a6f3f613a.\n
    Access granted for method:operation:instance - IsUserAdministrator : User_IsAdministrator__Check : t.EnterpriseManagement.ServiceManager.ActivityManagement.Forms.ManualActivityForm.GridViewColumn_Owner"]$.\n
    Access granted for method:operation:instance - GetAutoIncrementRange : Object__Get : trator__Check.\n
    Query definition name = GetAutoIncrementRange, command text = dbo.p_GetAutoIncrementValueRange\n

    So from this trace I can see that the console is calling the form, but it is calling the base form not the customized form.....

    (sigh)


    Brett Moffett

    Friday, February 13, 2015 4:22 AM
  • Can you include the forms target class? Because that is the only explanation I can think of. I sometimes think I extended a class, but then I realize later that I didn't.

    Cheers,

    Anders Spælling

    Senior Consultant

    Blog:   Twitter:   LinkedIn:   

    Please remember to 'Propose as answer' if you find a reply helpful

    Friday, February 13, 2015 8:10 AM
  • Brett,

    it seems to be some mess with management packs. It's especially strange that you had the same story in two SCSM envs. I think that Operations Manager log on the management server has to have some red alerts after any update for the management packs with some explanation.


    Cheers,
    Marat
    Site: www.scutils.com  Twitter: LinkedIn: Graveyard:

    Monday, February 16, 2015 8:31 AM
  • Brett - Do you have any 3rd party apps installed in your environments? Especially apps that change/extend preview forms for Manual Activities like the Cireson Preview Pane app? Or did you extend preview forms for Manual Activity class by yourself?

    The same happened to me when I had custom preview forms installed. It seems that somehow if the first form found for a class is an overview form, it is not correctly skipped and the default (uncustomized) OOB form is loaded instead of your own customized form. Removing customized preview pane did it for me.

    Hope this helps!


    Blog: http://scsmlab.com  Twitter: @scsmlab

    • Marked as answer by Brett Moffett Tuesday, February 17, 2015 9:18 PM
    Tuesday, February 17, 2015 12:36 PM
  • Hi Stefan,

    This is exactly what I was testing when you posted this!  :)

    I built a clean SCSM environment and my Management Pack worked. Then I was in the process of adding each Cireson MP one at a time to see if it broke.

    You have allowed me to short cut this and go straight to the MP in question and BINGO!

    The Cireson Preview Form for Manual activity stops the customisation of the manual form.
    Removing this one MP has fixed the issue and the form can now be modified.

    I will get in touch with Cireson and report it as a bug as the other forms are not impacted by their preview forms.

    Thanks everyone for your time and effort on this one.

    Brett


    Brett Moffett

    Tuesday, February 17, 2015 9:18 PM
  • It's a good thing there was this thread, I encountered the same issue this week where for 2 years it had been working, but suddenly last week it didn't.  There was no management pack upgrades during that time and all forms were already imported from way back.  There was no Security Role, Group, or Queue changes at all, or any UR upgrades.  Another Ticket custom form was working which was confusing, why would one work and the other not.  After troubleshooting this nigh impossible issue, it appears that when the server is restarted or some other criteria is met, the folder "C:\Program Files\Microsoft System Center 2012 R2\Service Manager\Health Service State" is refreshed and that is where the point of failure lies.

    The Health Service State folder which stores the Cache of the SCSM Server contains a huge amount of data.  It's my theory it will query the database for custom forms and if it finds more than one for a particular ticket it will simply use the first result returned, because the query isn't sorted in any particular order it adds a degree of unpredictability, the outcome isn't necessarily random but rather unstable due to unforeseen circumstances by a sub-par programmer.  It's the only way I can explain the behaviour that we've witnessed.

    A possible but unreliable solution would be continuously stopping the SCSM services on the server, deleting the folder, starting the services to rebuild the folder until the coin toss comes out in your favour, but for more and more custom form conflicts, the probability of getting them all right becomes exponentially harder.

    Ex.  Let's say you have 5 coins with 2 sides (Heads and Tails) and you need to land each one on "Heads" in one go

    Using Probability theory which is (Favourable Outcomes\Possible Outcomes):
    # of Possible Outcomes == 2^5 == 32 non-repeating combinations.
    # of Favourable Outcomes == 1 == only 1 outcome is valid (all Heads).

    1 / 32 == The likelihood that you'll get all Heads is 3.125% which is not in your favour and therefore unreliable!!!

    Needless to say this would not go over well saying I'll fix it by playing the odds over and over, boss!

    Real Solution:  Get rid of all the custom forms for a ticket except the one you require because MS made bad code and you must compromise as a result.  It may not have been their intention, but that appears to be the design and ultimately by design is how it will function.
    • Proposed as answer by C Sharp Conner Thursday, July 21, 2016 1:55 PM
    Thursday, July 21, 2016 1:48 PM