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

setDepend function #377

Open
JeremyHornet900 opened this issue Apr 5, 2024 · 0 comments
Open

setDepend function #377

JeremyHornet900 opened this issue Apr 5, 2024 · 0 comments

Comments

@JeremyHornet900
Copy link

First, thank you for this great library, it's all what is necessary.

Is your feature request related to a problem? Please describe.
When modifying a task, it's actually possible to change quite every field individually via the setXXXXXX functions, however, even though a getDepend exist, a setDepend function doesn't, or I couldn't find one.

Describe the solution you'd like
I've tried myself to implement one function in the taskItem:

this.setDepend = function (pDepend) {pDepend = pDepend} but whatever I do it doesn't work. I've tried to go through vDepend by writting one in the way for test: this.setDepend = function (pDepend) {vDepend[0]= pDepend} and in this case, it correctly writes the value I set in index 0 of the vDepend array, however it stays to 0 in the pDepend and thus doesn't update the tasks with a link.

Describe alternatives you've considered
I guess I could store the values of the task in a buffer, delete it and recreate it with the new Depends list but it makes quite a huge thing just to update one field.

Additional context
Add any other context or screenshots about the feature request here.
Just as remark I can't really understand why a vID is somehow used to reference the task, I've seen another topic on this, I've modified the GetAllData function, to get the pID instead of the vID created with the hashKey function as vID isn't really usefull when we have to grab the data. But does this vID is used somehow inside the system to perform some actions? Couldn't the pID having be used for this purpose? From my side I use the Date().getTime() to generate the ID of the task, so, it's quite unlikely that 2 tasks could have the same ID if this is what this vID was meant for, but maybe someone can explained what is the purpose of this vID and to which extend this one is used in other functions.
I also think that maybe it would have been easier to request an array of JSON objects [{pDependID:01234568, type:FS}, ...] in the pDepend that would avoid to pass through the conversion from string to array with splitting etc in the vDepend. Maybe it would create other issues, but in my case at least it would have make sens.

Anyway, again, great job and thank you for your time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant