활동이 없어 이 대화는 잠겼습니다. 새 게시물을 작성해 주세요.
활동이 없어 이 대화는 잠겼습니다. 새 게시물을 작성해 주세요.
I have created an API Custom API Call to update the predecessor of a task. I have received an error on the module below.
I am wondering if I am just missing some commas or quotes in the body or if I am completely off. The error says "[422] APIModel INTERNAL does not support field data (Task)" so I am wondering if updating nested fields is not even possible.
Any help is greatly appreciated!
토픽은 커뮤니티 콘텐츠를 분류하여 관련성 있는 콘텐츠를 찾는 데 도움이 됩니다.
This is a fantastic question.
Predecessors are one of the curiosities of the Workfront API. You can not PUT/POST directly to the predecessor object either through the task or directly. Instead WF engineered a READ-ONLY field into the API called predecessorExpression. In effect here you would literally place the same string you would when entering a predecessor into the UI. Take a look at the attached example on how to do this. Note in my example it is a cross project predecessor, but the idea is the same. Instead of the reference number of a different project, just put your "Task Number" + the secondary elements like ff or such.
@Andy Hess‚ This works!! Thank you so much! 🙂
조회 수
답글
좋아요 수
@AndyHess Where is the example? I am looking to do the same thing.
조회 수
답글
좋아요 수
Hmm.... sorry about that. It looks like the attachment may have been lost when we converted content in the Adobe Experience.
Here you go. this is a pretty simple API call. In the example, you see the 'referenceNumber' is being applied because this is a cross project predecessor to the 1st task of that project.
Let's say this were to a task #15 in the same project, then it would not need a 'referenceNumber:TaskNumber' and could just be TaskNumber ff'. Basically this is the string that you would type into the UI to create a predecessor.
Thanks Andy! That worked. I really appreciate your help!
조회 수
답글
좋아요 수
@AndyHess, one more question. Is there a way I can add new predecessors without overwriting what is existing on the task?
조회 수
답글
좋아요 수
Sorry to bother you again @AndyHess
I am hoping to resolve this issue soon.
I found a way to do it but unfortunately, this way does not allow me to do cross-project predecessor.
In the example below, I am finding the previous predecessor (I only have one) then adding it to the list. I tried to add parentID, projectID, nothing worked to get to add cross-project predecessors with this way.
{predecessors:[
{predecessorID:"631788ca0018ab869860976cb13c74d9",predecessorType:"fs"},{predecessorID:"previuosPredecessorID",predecessorType:"fs"}
]}
조회 수
답글
좋아요 수
I believe using the method I provided, using the predecessorExpresession will add a predecessor without overwriting existing ones. Otherwise you could go the JSON route but you are missing some fields. First try just adding another predecessorExpression.
조회 수
답글
좋아요 수
Thanks @AndyHess! Unfortunately, the expression method overwrites existing predecessors.
You're right, one expression works
{"predecessorExpression":"3,{{23.referenceNumber}}:{{14.taskNumber}}"}
Note for others trying: I had tried these options and they didn't work.
Option 1 - only keeps the last one
{"predecessorExpression":"{{23.referenceNumber}}:1","predecessorExpression":"3"}
Option 2 - only keeps the first one
{"predecessorExpression":"{{23.referenceNumber}}:1"},{"predecessorExpression":"3"}
조회 수
답글
좋아요 수
@Andy Hess‚ Is there a way to add a predecessor in addition to the existing one using Fusion? Say if task A has a predecessor B already and after the Fusion run I want the task A to have both predecessor B and C. Thanks
조회 수
답글
좋아요 수
조회 수
답글
좋아요 수
조회 수
Likes
답글