Having difficulty updating the parent for all PortfolioItem/Feature that were copied for a specific PortfolioItem/MMF

I'm facing a challenge in setting the parent for multiple features that I've copied for a specific MMF. However, only the parent of the last feature is being set.

Below is the code snippet responsible for setting the parent: Record represents the new feature object _newParent refers to the MMF object where the issue occurs

record.set("Parent", _newParent.get("_ref")),

I could really use some help here. Any suggestions?

The entire method looks like this:

           _genericInnerCopy: function(_childObj) {
                that = this;
                model = that.model;
                var record = Ext.create(model, {
                    Name: _childObj.get('Name'),
                    //Parent: _newParent.get("_ref");,
                });
                record.save({
                    callback: function(result, operation) {
                        if(operation.wasSuccessful()) {
                            console.log("Done");
                            //that._copyChild();
                        } else {
                            console.log("error");
                        }
                    }
                })
                that._all_pis.push(record);
                console.log("all pis values", that._all_pis);
                var store = Ext.create('Rally.data.custom.Store', {
                    data: that._all_pis,
                    listeners: {
                        load: that._updateAll,
                        scope: that
                    },     
                });
                //console.log("record values", that._all_pis);
            },  
            _updateAll: function(store,data) {
                console.log("store values", store);
                console.log("data values", data);
                Rally.data.BulkRecordUpdater.updateRecords({
                    records: data,
                    propertiesToUpdate: {
                        Parent: _newParent.get("_ref")
                    },
                    success: function(readOnlyRecords){
                        //all updates finished, except for given read only records
                    },
                    scope: that
                });
                //that._createNewItems(that._all_pis);
            },

Answer №1

It appears that the issue in your initial inquiry stemmed from your code not displaying the errors within the callback function. To view the errors, you can utilize console.log(operation.getError()) or console.log(operation) and analyze the results.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

A guide to integrating Material-UI with your Meteor/React application

I encountered an issue while trying to implement the LeftNav Menu from the Material-UI example. The error message I received is as follows: While building for web.browser: imports/ui/App.jsx:14:2: /imports/ui/App.jsx: Missing class properties transf ...

The issue persists where Chrome WebAPI's chrome.webRequest.onBeforeSendHeaders is failing to modify the parameters in the outbound requests

I have been attempting to include an IP address in the X-Forwarded-For parameter within the requestHeader, but my code does not seem to be working based on the examples provided in the Chrome API. Below is the code snippet I am currently using: var reque ...

Updating the content with HTML and JavaScript

Hello everyone, I am currently working on a project to change the content of a div using JavaScript for educational purposes. Here is what I have done so far - <div id="navbar"> ... <ul> <li> <text onclick="getWordProcessing() ...

Tips for storing data from a table using a button

I have implemented a data table to display information from a database. I am looking for a way to save user information whenever they export data in Excel, CSV, or PDF format from the table. I have already created a function to handle saving user data, but ...

Using the getElementById function in javascript to modify CSS properties

Here is the setup I am working with: <div id="admin"> This element has the following style applied to it: display: none; I am attempting to change the display property when a button is pressed by defining and utilizing the following JavaScript co ...

Transmit the JSON Data file through an AJAX request

I am encountering an issue where the HttpPostedFileBase is null when trying to send an image file to a Controller. I have attempted entering image: image outside of JSON.stringify({}), but it did not work. Additionally, I tried changing the contentType f ...

Enhancing Donut Chart with d3.js

After working for several hours, I'm having trouble getting my d3.js donut graph to update with new data. Here's my HTML: <body> <div id="pie"></div> <script src="pie.js"></script> </body> And he ...

When the Ionic framework is initialized, it automatically redirects users to the home

I'm currently developing a mobile app using Ionic, and I've encountered an unusual issue. Whenever I refresh the page (pressing F5) from a specific route like "/tabs/connected/channel/edit", I always get redirected to "/tabs/home" after the state ...

Changing a numeric string into a number within an Angular 2 application

Looking for advice on comparing Angular 2 expressions. I have an array of data stored as numeric strings in my database and I need to convert them to numbers before applying a condition with ngClass for styling purposes. Any suggestions on how to perform ...

What is the method with the greatest specificity for applying styles: CSS or JS?

When writing code like the example below: document.querySelector('input[type=text]').addEventListener('focus', function() { document.querySelector('#deletebutton').style.display = 'none' }) input[type=text]:focu ...

The potential issue of undefined objects in TypeScript when utilizing computed properties in Vue3

I've attempted adding a ? after each word and also experimented with the following code: const totalNameLenght = computed(() => { if (userFirstnameLenght.value && userLastnameLenght.value){ return userFirstnameLenght.value + u ...

Sort the inner array within an outer array

const dataArray = [ { id: 1, title: "stuffed chicken is tasty as anything", picture: "./img/chicken.jpg", tags: ["oooo", "tasty", "stuffed"] }, { id: 2, title: "noodles with shrimp and salad", ...

Conditionally displaying an input model in Vue.js using v-if

Just starting to learn vue.js and I'm looking to display table data. My idea is that when the table is in display mode, it should only show the data. However, when I click on the edit button of a table row, I want that specific row to switch to edit m ...

Is it possible to utilize mathematical operators such as multiplication, division, addition, subtraction, and exponentiation to transform a non-zero numerical value into

I am currently working with Oracle Siebel software which supports JavaScript expressions using only specific operators such as multiply, divide, subtract, add, and XOR (*, /, -, +, ^). Unfortunately, other operators like ! or ? : are not available for use. ...

Frontend utilizing the Next-auth Github Provider for Profile Consumption

After following the official documentation for implementing SSO with the Next-auth Github provider in my App, I encountered an issue where the Client API documentation suggested using useSession() to retrieve session information, but it was not returning t ...

Using Node.js and MongoDB to filter a sub array within an array of objects

Hello everyone, I currently have an array of objects containing some populated fields. Below is the product schema: import mongoose, { Schema } from 'mongoose'; const productSchema = new mongoose.Schema( { name: String, description: S ...

Nextjs style import function properly on the development server, but faces issues when deployed to production environments

import "../styles.css"; import styles from "react-responsive-carousel/lib/styles/carousel.min.css"; import "react-owl-carousel2/lib/styles.css"; import { Provider } from "react-redux"; import store from "../store/store" function App({ Component, pageProps ...

Classify the JavaScript objects according to the array of object lists

Struggling to find a solution for converting this list of objects based on the group array. The challenge lies in iterating through the group Array and applying the object to multiple places when there are several groups. Additionally, trying to disregard ...

Encountering an internal/modules/cjs/loader.js:892 error when attempting to install the newest version of node.js on Windows 10

After recently updating my node.js to the latest version using chocolatey, I encountered a problem with my command prompt displaying the following error: internal/modules/cjs/loader.js:892 throw err; ^ Error: Cannot find module 'C:\Users&bso ...

Updating the state on a click event triggered by a MenuItem in React using Material UI

I'm currently working on implementing state changes based on dropdown selections using Material UI. However, I've encountered an issue where the code snippet below (simplified) only returns the list item, and I'm unsure what steps to take n ...