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

Unavailable ticket template attributes get applied #2424

Closed
thorsteneckel opened this issue Jan 4, 2019 · 1 comment
Closed

Unavailable ticket template attributes get applied #2424

thorsteneckel opened this issue Jan 4, 2019 · 1 comment

Comments

@thorsteneckel
Copy link
Contributor

Infos:

Used Zammad version: 2.8.x
Installation method (source, package, ..): any
Operating system: any
Database + version: any
Elasticsearch version: any
Browser + version: any

Expected behavior:

  • After using a Ticket Template only available attributes are pre-filled

Actual behavior:

  • After using a Ticket Template unavailable attributes are pre-filled

Steps to reproduce the behavior:

  • Create 2 Agents
  • Create 1 Group
  • Assign permissions to created Group to Agent 1
  • Create Ticket Template with Agent 1 that contains the created Group
  • Use created Ticket Template with Agent 2
  • See that the (unavailable) Group is selected

Yes I'm sure this is a bug and no feature request or a general question.

Information that help:

The template gets loaded and applied in this area:

template = App.Template.find(params['id'])
App.Event.trigger 'ticket_create_rerender', template.attributes()

This part should be extended to limit/filter the attributes.

The available attributes can be found in the formMeta.dependencies object/hash - which can can get fetched like this:

load = (data) =>
App.Collection.loadAssets(data.assets)
@formMeta = data.form_meta
@buildScreen(params)
@bindId = App.TicketCreateCollection.one(load)

The logic to filter attributes is currently "trapped" in this file/class. The logic should get extracted to make it reuseable and then used in the "template apply" code.

This affects Ticket#1031263.

@SummerStorm
Copy link
Contributor

Unfortunately the the browser test for this issue cannot be cleanly cherry-picked into stable, so that leaves one customer on stable who is still being affected. We've offered the bump the customer's hosted instance to develop as a temporary measure until the next release.

@SummerStorm SummerStorm reopened this Jan 23, 2019
@SummerStorm SummerStorm added this to the 2.9.0 milestone Feb 12, 2019
@martini martini closed this as completed Feb 14, 2019
@SummerStorm SummerStorm moved this from Blocked to Done in OLD Workflow Feb 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
OLD Workflow
  
Done
Development

No branches or pull requests

3 participants