Skip to content

Fix `canUpdate` console error on external issues

Tom Quirk requested to merge tomquirk/343620-make-jira-issues-unediablte into master

What does this MR do and why?

Related to #341714 (closed), this MR fixes the runtime error:

error screenshot

When setting the canUpdate provided attribute in issue_field.vue, we were referencing this, which is undefined at the time when we "provide" the data.

This MR updates Jira and ZenTao issue trackers to have canUpdate set to false, always.

It also changes the behavior of issue_field. Now, we pass a canEdit prop to determine when to make a field editable or not.

I have 2 instances of issue_field.vue - how do I make one editable and one non-editable?

You'd inject canUpdate: true into the root component. Then, you'd set one <issue-field>'s canEdit prop to true, and the other to false.

note: edit functionality is currently behind a feature flag. We are planning to remove the functionality entirely in #343620 (closed).

How to set up and validate locally

Set up the Jira integration:

  1. Select a GitLab project on your local GitLab instance.
  2. Enable and configure the Jira integration for the project. More information.
    • GitLab team members: use the Jira credentials in the shared Engineering 1Password folder.
    • Community contributors: set up your own Jira instance.
    • Ensure the Jira project you link has > 0 Jira issues.
  3. Select Jira Issues in the sidebar.
  4. Select an issue from the list
  5. Observe the console. The console error should not exist.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Tom Quirk

Merge request reports

Loading