BCApps icon indicating copy to clipboard operation
BCApps copied to clipboard

[Bug]: Suggest no series copilot: why does it populates Last Used No and Last used date fields for new entries

Open Aleyenda opened this issue 1 year ago • 4 comments

Describe the issue

in TIE open No serties and choose copilot. Asked to generate "create number series for non-inventory items"

Image

Accept results (though description is wrong, it says "Catalog item" but i wanted "Non-inventory") Explore - notice that LAst used no and date are populated. Which is wrong.

Image

Expected behavior

Last used no and date should not be populated.

Steps to reproduce

See description

Additional context

See description

I will provide a fix for a bug

  • [x] I will provide a fix for a bug

Aleyenda avatar May 19 '25 10:05 Aleyenda

@DmitryKatson would you be able to pick this up?

Aleyenda avatar May 19 '25 10:05 Aleyenda

Hi @Aleyenda this is not the bug fix. I'd say that this is a scenario that is not supported for now. Let me explain.

  1. If you want to create new Number Series - Copilot looks at the fields on the Numbering FastTab on the related setup page. For example, for Inventory, it looks at the FastTab on the Inventory Setup page and create Number Series for the fields that are empty.
  2. In Cronus DB the inventory Setup looks like this

Image

  1. Item Nos and Catalog Item Nos. are filled in - means that already configured
  2. When you ask to create no. series and copilot "see" that it's already being created it does not generate new no. series, to eliminate possible duplications.
  3. You probably saw this output screen

Image

  1. This screen shows that for your request non-inventory items, copilot found most probable matching Catalog Items but it's already existing, so it's greyed out and not editable. If you scroll right you will see the warning message

Image

  1. You thought, however that it was generated by Copilot and clicked the Keep it.
  2. In this case copilot didn't do anything, just closed. But as you thought, that Catalog Items No. Series was generated, you loked in the 'Last No. Used' and 'Last Date Used' and saw the values.

Image

  1. However these values are there, bacause this No. Series was already existing and used before.

Long story short, Number Series Copilot can't generate Relationships No. Series - only the no. series that presents in the setup tables.

DmitryKatson avatar May 21 '25 03:05 DmitryKatson

@JesperSchulz I looked in the No. Series Copilot documentation and found wrong statement there.

Image

It don't look into the related entities.

https://github.com/microsoft/BCApps/blob/d31434908850507aebc8aca40b7e7fc402b917ce/src/Business%20Foundation/App/NoSeriesCopilot/src/Copilot/Tools/NoSeriesCopAddIntent.Codeunit.al#L100

It searchs first in the relevant Setup Tables and then in relevant No. Series fields there. Maybe adding Relationships support is a nice adea, but this would be a new feature.

DmitryKatson avatar May 21 '25 03:05 DmitryKatson

Thanks for the detailed analysis and reply, @DmitryKatson 🚀 We will resolve the bug as "By Design" and maybe add a feature to our backlog which adds this support - however, it doesn't seem too pressing to me, so probably we'll just leave things as they are for now.

JesperSchulz avatar May 21 '25 11:05 JesperSchulz