• Will I get F/J mileage credit for my upgraded flight?
AAdvantage mileage and point credit is based on the fare originally booked, not the class of service flown, so passengers who upgrade from Discount Economy still receive mileage and point credit based on their original Discount Economy fare. There are occasional exceptions to this, such as when a passenger is rebooked onto another flight directly into the premium cabin in F or J inventory, in which case the passenger will receive mileage and point credit as if they had purchased an F or J ticket.
Wiki:
Upgrades
AA.com:
Terms and Conditions: Earning AAdvantage Miles