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

[ganttchart] Dates in the Gantt chart fail to be shown if the first record's date field is not set #170

Closed
tkmry opened this issue Nov 21, 2020 · 21 comments
Labels

Comments

@tkmry
Copy link

tkmry commented Nov 21, 2020

一覧表示した際に先頭のレコードの日付欄が空値だと、
jquery.gantt がカレンダーの生成に失敗し日付欄のヘッダが NaN や undefined となる。

・問題ない例(Test1には日付が設定されている)
image

・問題ある例(Test2には日付が設定されていない)
image

原因等の調査結果はこちらに記載しております。
https://developer.cybozu.io/hc/ja/articles/203716110/comments/900001456206

@tkmry
Copy link
Author

tkmry commented Nov 21, 2020

この問題は jquery.gantt 側の問題により発生しています。

PullRequest を送っていない理由としては、
修正版 jquery.gantt ファイルを cybozu CDN 上にアップロードするか、
プラグインに同梱するか判断がつかないためです。

なお、下記フォーク版はこのissueに対処済みです。
https://github.com/tkmry/plugin-samples/tree/master/examples/ganttchart

@tkmry tkmry changed the title [ganttchart] Generation of date fields fails due to incorrect date data entry [ganttchart] 一覧ページにて1つ目のレコードの日付値が不正だった場合、ガントチャートの日付欄の生成に失敗する Nov 21, 2020
@tkmry
Copy link
Author

tkmry commented Nov 24, 2020

共有となりますが、jQuery.gantt プラグインリポジトリに本事象の解消を提案していますが、プラグインの設計通りであるとの返信をいただいておりますので、開発者側との折り合いがつくまでは実装の方針を決めるのは待った方がよいかも知れません。
taitems/jQuery.Gantt#239

@will-yama will-yama changed the title [ganttchart] 一覧ページにて1つ目のレコードの日付値が不正だった場合、ガントチャートの日付欄の生成に失敗する [ganttchart] Bug: Dates in the Gantt chart fail to be shown if the first record's date field is not set Nov 30, 2020
@will-yama
Copy link
Contributor

Excuse me for translating the title into English

@will-yama
Copy link
Contributor

Translation:

@will-yama will-yama added the bug label Nov 30, 2020
@will-yama will-yama changed the title [ganttchart] Bug: Dates in the Gantt chart fail to be shown if the first record's date field is not set [ganttchart] Dates in the Gantt chart fail to be shown if the first record's date field is not set Nov 30, 2020
@tkmry
Copy link
Author

tkmry commented Dec 1, 2020

jquery.gantt側の修正ですが、現在はコードレビューに入っており、最終的に私の修正の提案を取り入れていただけるようです。

A fix on the jquery.gantt side is currently under code review.
It looks like I'll be able to incorporate my suggested fixes eventually.

@tkmry
Copy link
Author

tkmry commented Dec 1, 2020

jqurey.Gantt プラグインのリポジトリで、提案が採択されました。 taitems/jQuery.Gantt#239
この件の解消については、jquery.ganttのjsファイル及びcssファイルをCDNに再アップロードするのが良いかと思います。

The proposal has been adopted by the repository of jqurey.Gantt plugins. taitems/jQuery.Gantt#239
To resolve this issue, I think it would be a good idea to re-upload the jQuery.gantt js and css files to CDN.

@will-yama
Copy link
Contributor

@tkmry
Hmm ok, we were actually working on this issue with PR #174 , where we made some workarounds to skip displaying records on the Gantt Chart if either Start or End date is not available.

@will-yama
Copy link
Contributor

Let me recheck this and see how we should proceed

@tkmry
Copy link
Author

tkmry commented Dec 11, 2020

Hi, @will-yama .
Thank you for your sharing.

I'll check it.

@tkmry
Copy link
Author

tkmry commented Dec 11, 2020

@phongnm-dev さん、別解案の提示とコーディングありがとうございます。

  • phongnm-dev さんの解法は一つの答えとして良いと考えています。理由としては、検証済みのデータによって処理は進めていくべきだと考えているからです。
  • ただし、私はこの方法よりも空のタスクとして行が表示される事を望みます。
    その理由として、ガントチャートを利用する目的の一つとして、タスクの全体像や残りの作業量、またその順番をパッと見て理解したいからです。
    私は時期の未定なタスクを追加しています。
    空日付の行が見えなくなる事でタスク漏れの発生を懸念しています。

Thank you @phongnm-dev for presenting and coding another solution.

  • I think phongnm-dev's solution is good as one answer. The reason is that I believe that the process should proceed according to the verified data.
  • However, I would prefer to see the rows as empty tasks rather than this method.
    The reason for this is that one of the purposes of using a Gantt chart is to quickly understand the overall picture of the tasks, the amount of work remaining, and the order of the tasks.
    I sometimes set tasks(plan) for which the date is undecided.
    I am concerned about task omissions due to not being able to see the empty date lines.

Translated with www.DeepL.com/Translator (free version)

@will-yama
Copy link
Contributor

@tkmry
Thanks for the feedback about empty dated tasks. We'll look into this.

The tricky thing at the moment about this plug-in is the policy that we use. We read in libraries that are hosted on the Cybozu CDN. If a new jQuery Gantt library version is uploaded onto the Cybozu CDN, then we are more than welcome to fix this plug-in to point towards that new library. The Cybozu CDN library though will only update if the library in question releases a new tag. The problem that lies here is that jQuery Gantt has not released a new tag in 9 years https://github.com/taitems/jQuery.Gantt/tags
Hence that basically means that it's very unlikely that a new jQuery Gantt will be hosted on the Cybozu CDN in the near future.

@tkmry
Copy link
Author

tkmry commented Dec 15, 2020

@will-yama
Thank you for sharing your concerns and other information.
I will have a conversation with them to see if we can create a release point in that repository.

(* '_`)oO(I wonder It is strange that the release tag is 9 years old (2011), but libraries of 2014 version is uploaded to the Cybozu CDN)

@will-yama
Copy link
Contributor

@tkmry
(* '_`)oO(Actually that's a really good point, I didn't notice the 20140623 version...let me check this internally)

@will-yama
Copy link
Contributor

@tkmry
It looks like the 20140623 release on the Cybozu CDN was an exception that we made in the past because we did not see jQuery.Gantt releasing any new tags. The 20140623 version was taken from the master on the date of 20140623.
I'm going to see if we can make that exception again with the latest master.

@tkmry
Copy link
Author

tkmry commented Dec 16, 2020

@will-yama
Thanks a lots. I look forward to hearing good news.

@tkmry
Copy link
Author

tkmry commented Dec 19, 2020

I am checking to see if I can contribute to this issue so that I can create a release (tag) point.
taitems/jQuery.Gantt#248

@will-yama
Copy link
Contributor

@tkmry
Closing into the end of the year, so here is how we will proceed

  1. We probably will be able to get the new CDN ready, which will be released at the begenning of next year
  2. If we can't seem to do that, we will work on solving the issue through SSR-1065: Gantchart: If either Start or End date is set to none/ is null, skip record and do not display #174 instead (thanks for the comments!)

@will-yama
Copy link
Contributor

Happy new year. Working on this one - we'll see how the CDN goes.

@will-yama
Copy link
Contributor

@tkmry
We have the new CDN running with the 2021 Jan 6th version of jQuery.Gantt.
Upon applying the library to the plug-in, we found that it caused some other bugs, so we took care of those.
The PR for this issue can be found in #178

This will

  • use the latest library so that the NaN and undefined display bug will be fixed
  • display task cells on the End date, if no Start date is present
  • display task cells on the Start date, if no End date is present
  • display no task cells where both Start date and End date are not present (the task will still be displayed on the left hand side)

We will be merging this if there are no problems :)

@will-yama
Copy link
Contributor

Merged #178
The bug has been fixed, so this issue will be closed.

Sorry for taking a long time on this task 😳

@tkmry
Copy link
Author

tkmry commented Mar 4, 2021

Thank you for your support as well! <3

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

No branches or pull requests

2 participants