Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Project: OfficeJS Office.context.document.getTaskFieldAsync fails on some important fields. #938

Closed
vputsenko opened this issue Jan 15, 2020 · 14 comments
Labels
Area: Project Issue related to Project add-ins Status: under investigation Issue is being investigated

Comments

@vputsenko
Copy link

vputsenko commented Jan 15, 2020

Message from office-js bot:
We’re closing this issue because it has been inactive for a long time. We’re doing this to keep the issues list manageable and useful for everyone. If this issue is still relevant for you, please create a new issue.
Thank you for your understanding and continued feedback.

Hi guys,
I'm blocked with calling getTaskFieldAsync API to read some fields required for my solution.

Expected Behavior

getTaskFieldAsync must successfully return field value for valid task ID

Current Behavior

getTaskFieldAsync returns error:
{ code: [1,2], name: "Internal Error", message: "An internal error has occurred." }

I checked all fields in Office.ProjectTaskFields enum and found that same error happens for next fields:

  1. Office.ProjectTaskFields.Type
  2. Office.ProjectTaskFields.Status
  3. Office.ProjectTaskFields.Priority
  4. Office.ProjectTaskFields.PercentWorkComplete
  5. Office.ProjectTaskFields.PercentComplete
  6. Office.ProjectTaskFields.OutlineLevel
  7. Office.ProjectTaskFields.FixedCostAccrual
  8. Office.ProjectTaskFields.EarnedValueMethod
  9. Office.ProjectTaskFields.ConstraintType
  10. Office.ProjectTaskFields.Baseline1FixedCostAccrual

In addition Summary field always has false value, even if Task has subtasks - i can report this as separate ticket if required.

Steps to Reproduce, or Live Example

  1. Create empty project
  2. Create Task (fill subject) at 1 index and get its GUID (using VBA for instance) or call getTaskByIndexAsync
  3. Call getTaskFieldAsync with task id and one of the field id listed above.

Here is pseudo code (callbacks wrapped with promises):

  1. let id = await Office.context.document.getTaskByIndexAsync(1);
  2. let outlinelevel = await Office.context.document.getTaskFieldAsync(id, Office.ProjectTaskFields.OutlineLevel); // Error here

Note this that same sequence of calls works for other fields (not listed above).

Context

This is Office Addin Hosted by Project. Code executed in context of HTML button click handler.

Your Environment

  • Host: Microsoft Project (Desktop)
  • Office version number: Microsoft Project 2019 version 1912 (build 12325.20298 Click-to-Run) MSO 16.0.12325.20280
  • Operating System: Windows 10 (1909 build 18363.535)

Thanks.

@ghost ghost added the Needs: triage 🔍 New issue, needs PM on rotation to triage ASAP label Jan 15, 2020
@erayc-msft erayc-msft added Area: Project Issue related to Project add-ins Status: under investigation Issue is being investigated and removed Needs: triage 🔍 New issue, needs PM on rotation to triage ASAP labels Jan 15, 2020
@vputsenko
Copy link
Author

Hi, any updates here?

@lindalu-MSFT
Copy link
Contributor

Hi @vputsenko I'm not sure who is our subject matter expert on the Project area crew. @Rick-Kirkham @erayc-msft Do either of you know a Project eng who can help with this issue?

@lindalu-MSFT
Copy link
Contributor

@vputsenko Meanwhile, you can try asking your question on Stack Overflow. You might find someone in the Project developer community. Use the tags [office-js] and/or [ms-project]. I did find a few questions about getTaskFieldAsync that might help.

@lindalu-MSFT lindalu-MSFT changed the title Project OfficeJS Offce.context.document.getTaskFieldAsync fails on some important fields. Project: OfficeJS Office.context.document.getTaskFieldAsync fails on some important fields. Jan 25, 2020
@vputsenko
Copy link
Author

Ok, i'll post to Stack Overflow too. However, please don't close the ticket here since it is really still not fixed. Any update will be appreciated. I still don't have workaround.

Thank you.

@vputsenko
Copy link
Author

Added stackoverflow post too https://stackoverflow.com/questions/59924007/officejs-office-context-document-gettaskfieldasync-fails-on-some-important-field

@ragavanrajan
Copy link

same issue for us too :(

getResourceFieldAsync is not complete.

image

Version and Build Number:

image

Windows version:

image

@vputsenko
Copy link
Author

@ragavanrajan this post is not about not completed async calls. Please don't mess issues.

@aninfeel
Copy link

aninfeel commented Sep 8, 2020

same issue for me while get the value of Office.ProjectTaskFields.PercentComplete

@nnyegaard
Copy link

There is also an issue with this field Office.ProjectTaskFields.Milestone

@BeReasonable BeReasonable removed their assignment Apr 30, 2021
@girazuzta
Copy link

I also have a similar issue
In my case is with custom fields (Text30 and Number20)
The async result status resolved is "failed"
The strange thing is that it happends most of the times but not allways.

@JBoman32768
Copy link

I can confirm @vputsenko 's findings. although for me the getTaskFieldAsync callback just never fires on the following fields:

  • ConstraintType
  • OutlineLevel
  • PercentComplete
  • PercentWorkComplete
  • Priority
  • Status
  • Type
  • (And a bunch of other earned value and fixed cost accrual fields)

Additionally the following fields are always false even when they should be true:

  • Active
  • Summary
  • Milestone

I am blocked with this and really need some options.

@FelipeCostaGualberto
Copy link

FelipeCostaGualberto commented Jan 22, 2023

Hello, any update on this? We need to move away from VBA and VSTO.
We appreciate fixing this bug. Thanks.

@gergzk gergzk closed this as not planned Won't fix, can't repro, duplicate, stale Apr 11, 2024
@FelipeCostaGualberto
Copy link

The OP is asking for the essential fields, not advanced ones. With the current API, we can't do very much.
With the labeling of "not planned", my understanding is that no developer should use Office Addins for Microsoft Project.

@JBoman32768
Copy link

JBoman32768 commented Apr 12, 2024

Yeah I don't think "Not planned" is accurate - I have seen a beta release where at least some of these problems are fixed after I logged Microsoft Support call #32728393.
This appears to be same issue as #1829 and #2807

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Project Issue related to Project add-ins Status: under investigation Issue is being investigated
Projects
None yet
Development

No branches or pull requests