Jump to content

Attempting to update a card gives error


Gareth Cantrell

Recommended Posts

We have a process where we need to update the info on a card at various points.

At the beginning of the stage, we have a "Get Card Information" node and use this later in the "Update Card" node, however it consistently gives errors.

Prior to introducing the update card, we had a "Move Card on Board" node which always worked as expected, however, since introducing the update card immediately prior to the move card node, our users keep getting an error and I have to go into the failed workflows and change the update card to a get request information before the workflow will restart (even setting the card id to the actual id retrieved from database direct does not work).

Is this a bug with the update card automation?

Our Update Card automation looks like this:

image.thumb.png.38d5b67cb7517843c8458769127e19b0.png

and the error our users keep getting is:

image.png.4e5a5975429eeb8f58fd52c4c389ce56.png

Full error from the BPM log is:

Execution Failed: Xmlmc method invocation failed for BPM invocation node 'stage-30f66116/flowcode-9ca9f78d': <methodCallResult status="fail">
	<state>
		<code>0207</code>
		<service>apps</service>
		<operation>updateCard</operation>
		<error>/apps/com.hornbill.boardmanager/entities/Card/fc_modules/card.js(730): error X1001: Uncaught TypeError: Cannot read property &apos;record&apos; of undefined</error>
		<flowcodeError>
			<where>Execute</where>
			<filename>/apps/com.hornbill.boardmanager/entities/Card/fc_modules/card.js</filename>
			<lineNumber>730</lineNumber>
			<columnPos>81</columnPos>
			<message>Uncaught TypeError: Cannot read property &apos;record&apos; of undefined</message>
			<errorCode>1001</errorCode>
		</flowcodeError>
	</state>
</methodCallResult>

 

Link to comment
Share on other sites

Your node looks pretty much the same as mine which also updates the content.  Does the person who invokes the update have the right role (even if they don't know they're updating the card by taking the preceding action)?  My team have 'Board Manager' role which means all of our automations work even when they don't actually use the Boards themselves.

Link to comment
Share on other sites

@Sam P user has the Board User role, which should be sufficient.

I have another update card node earlier in the same stage which has been working fine.

It is only the newer update card nodes which are failing, and it makes no sense as the config the newer node is identical the one that is still working.

The only difference, other than display name, is I use "Variable" in the new node and "Manual" in the working node when setting the cardId:
Screenshot2023-11-13at17_16_30.thumb.png.40a7308c0bc0f9fddd0708a41cecde4e.png

Link to comment
Share on other sites

6 hours ago, Gareth Cantrell said:

we are still constantly getting errors on the new card update nodes

You might want to raise a support request directly with Hornbill Support. 

At the moment the only thing that I can guess at is that here it looks like you are updating the content of the card with something from the request to do with risk information and maybe the card content is not large enough to hold what you are trying to copy in.  It is difficult to say without access to your data.

image.png

 

Link to comment
Share on other sites

The content of the card is:

&[global["flowcoderefs"]["getReqInformation"]["summary"]]

'''Site''': &[global["flowcoderefs"]["getSiteInformation"]["siteCode"]]
'''Risk''': &[global["flowcoderefs"]["getReqInformation"]["customFieldC"]]
'''Service''': &[global["flowcoderefs"]["getReqInformation"]["catalogItem"]] (&[global["flowcoderefs"]["getReqInformation"]["service"]])

customFieldC is one of the following values: Extreme, High, Medium, Low.

There are nodes in the beginning of the stage that fetch Site Details and Request Details into getSiteInformation and getReqInformation respectively.

There are 2 paths to update the card, depending on whether CustomC is set or not (if it's not set, we updated the card with customA (Critical, Major, Normal, Minor) and this is a required field in the capture:

Screenshot2023-11-17at13_39_42.png.1f5851e0b7b03062d739709ebb9ab815.png

I cannot see why updating the cards here would cause an error - the following node (Move Request) has always been there and uses the same CardId variable as 2 update nodes.

Link to comment
Share on other sites

A few things I'd check which are basically "idiot-checks" so it's likely you've done this, but:

  • Was this node copied? If so does deleting it and creating a new one from scratch work?
  • Are the "getReqInformation" and "getSiteInformation" nodes valid, do they occur before the Update node, and are there any paths in the Workflow that could arrive at the Update node without passing through the Get Info nodes?
  • Did you populate the variables from the Picker, if not does replacing them in that way work?
Link to comment
Share on other sites

Hi @Steve Giller

To answer your questions:

  • These nodes were created from scratch (using "Add node between connected nodes")
  • The "Get Card/Site/Request" nodes occur at the start of the stage. Additionally, there is "Get Request Details" node immediately before the decision node in the previous screenshot above, and another "Get Site Details" a few nodes before that.
  • Yes, always the picker, for everything (and I just used it again to double-check all variables are correct)

I should also note, that when the workflows fail, I change the "Update Card" node to a "Get Card Info" so that I can restart successfully and the Move Card works flawlessly - so I'm really unsure as to why the update card nodes fail.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...