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

Support removing fields in Sub-Table. #25

Open
mantaroh opened this issue Nov 13, 2019 · 6 comments
Open

Support removing fields in Sub-Table. #25

mantaroh opened this issue Nov 13, 2019 · 6 comments

Comments

@mantaroh
Copy link

mantaroh commented Nov 13, 2019

@the-red
@thered

At the moment, ginue doesn't support removing fields.
E.g.,

  1. We have the two environment. (i.e., development and production)
  2. We removed the field A in the development environment.
  3. We run the ginue push development:production.

If we run above command, ginue stopped due to doesn't support removing fields.
The ginue will need to call the /k/v1/preview/app/form/layout with DELETE method.

If you have the any idea of this, could you please tell us?

@the-red
Copy link
Member

the-red commented Nov 13, 2019

Thank you for your feedback.

In latest version, Ginue can delete fields interactively when layout.json fails.

const deleteField = async (ktn, kintoneInfo, message) => {

In your environment, There are no prompt shown?
Please tell me ginue -v result.

@mantaroh
Copy link
Author

mantaroh commented Nov 14, 2019

@the-red
Thanks!

I checked the ginue version, as far as I can see, ginue version is the latest.

$ ginue -v
Ginue 2.1.3

I investigated deeper, it seems that kintone will return unexpected error code when updating the nil table field. In my environment, kintone returned the following error.

{ StatusCodeError: 400 - {"code":"CB_VA01","id":"b0FRYW6QCTRAOhnfKs49","message":"入力内容が正しくありません。","errors":{"layout[9].fields":{"messages":["フォームの更新に失敗しました。テーブル「Table_XXXX」の指定が正しくありません。指定するフィールドに不足がある、またはテーブルにないフィールドを指定しています。"]}}}

AFAIK, the ginue doesn't hook an above error code and doesn't support the error messages array(i.e., messages).

@mantaroh mantaroh changed the title Support removing fields. Support removing fields in Table. Nov 14, 2019
@mantaroh
Copy link
Author

I prepared the sub-table[1], then I removed the fields in table[2].

[1] Original Table (Table_XXXX)

Field Type
Job Title SINGLE_LINE_TEXT
Division SINGLE_LINE_TEXT
Name SINGLE_LINE_TEXT
Mobile SINGLE_LINE_TEXT
E-Mail SINGLE_LINE_TEXT
ID SINGLE_LINE_TEXT
ID_NAME SINGLE_LINE_TEXT

[2] Table after removing the ID and ID_NAME field

Field Type
Job Title SINGLE_LINE_TEXT
Division SINGLE_LINE_TEXT
Name SINGLE_LINE_TEXT
Mobile SINGLE_LINE_TEXT
E-Mail SINGLE_LINE_TEXT

@the-red
Copy link
Member

the-red commented Nov 14, 2019

@mantaroh
I see. v2.1.3 is latest version.

You seem to have deleted a field in the subtable.
Currently, Ginue cannot delete fields in the subtable 😫

It is difficult because the error message does not contain the field codes in subtable.
I would like to implement it in the near future!

@mantaroh
Copy link
Author

It is difficult because the error message does not contain the field codes in subtable.

I think that we need to distinguish the remove fields from development application layout and deploy application layout. In any case, I'll wait this features!

Cheers!

@mantaroh mantaroh changed the title Support removing fields in Table. Support removing fields in Sub-Table. Nov 14, 2019
@the-red
Copy link
Member

the-red commented Feb 28, 2021

@mantaroh
Thank you very much for your patience.

Deleting fields in sub-tables is now supported.
And adding fields in sub-tables is also supported!

It is still in beta, so you can install it with the following command. Please try it out! 🚀

npm install ginue@next

In v3.0, there are other changes as follows. There are many breaking changes, so please be careful.

  • Support for reports.json
  • End of support for form.json
  • Node.js version requires v12 or later

Please let me know if you have any feedback 😄

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

2 participants